Skip to main content

Connection Modes: Local and Hosted

CloudBase MCP supports two connection modes: Local mode (MCP service runs on your machine via npx) and Hosted mode (MCP service runs on Tencent Cloud, IDE connects via HTTP). Choose one as needed.


Meaning and use cases

  • Meaning: The MCP service is started on your machine via npx and runs on the same machine as your IDE.
  • Advantages: Full feature set, including upload/download and template installation that depend on the local file system.
  • Requirements: Node.js installed on your machine and able to run npx.

Configuration example

Add the following to your IDE's MCP configuration (e.g. Cursor / WindSurf):

{
"mcpServers": {
"cloudbase": {
"command": "npx",
"args": ["@cloudbase/cloudbase-mcp@latest"]
}
}
}

Optional environment variables (local mode)

In local mode, you can adjust behavior via environment variables without changing code. All of the following are optional; defaults apply when not set.

VariableDescriptionDefault / notes
CLOUDBASE_ENV_IDCloudBase environment ID (optional)When unset, first invocation will prompt login and environment selection
TENCENTCLOUD_SECRETIDTencent Cloud SecretId (optional)When unset, obtained via login flow; Get Tencent Cloud API keys
TENCENTCLOUD_SECRETKEYTencent Cloud SecretKey (optional)Same as above
TENCENTCLOUD_SESSIONTOKENTencent Cloud temporary key token (optional)Only when using temporary keys; obtain via STS
TCB_REGIONTencent Cloud region, e.g. ap-shanghai (optional)When unset, SDK default is used
INTEGRATION_IDECurrent IDE identifier (e.g. Cursor, CodeBuddy) (optional)For logging and capability adaptation
CLOUDBASE_MCP_PLUGINS_ENABLEDComma-separated list of enabled plugins (optional)When unset, default plugin set is used
CLOUDBASE_MCP_PLUGINS_DISABLEDComma-separated list of disabled plugins (optional)Same effect as URL parameter disable_plugins
WORKSPACE_FOLDER_PATHS / PROJECT_ROOTProject root (for template download, remote files, etc.) (optional)When unset, current working directory; in CI you can use GITHUB_WORKSPACE etc.
CLOUDBASE_MCP_TELEMETRY_DISABLEDSet to true to disable telemetry (optional)Enabled by default
CLOUDBASE_LOG_DIRLog directory (optional)Default ~/.cloudbase-mcp/logs
CLOUDBASE_GUIDE_PROMPTSet to false to disable some guide prompts (optional)Reduces prompts in some IDEs

Hosted mode

Meaning and use cases

  • Meaning: The MCP service runs on Tencent Cloud; the IDE connects to it via HTTP. You do not need to install or run Node locally.
  • Advantages: No dependency on local environment; configure credentials and use.
  • Limitations: Some capabilities that depend on the local file system are not available (e.g. local file upload, template download to your machine).

Configuration example

Replace <env_id>, <Tencent Cloud Secret ID>, and <Tencent Cloud Secret Key> with your environment ID and Tencent Cloud API credentials:

{
"mcpServers": {
"cloudbase": {
"type": "http",
"url": "https://tcb-api.cloud.tencent.com/mcp/v1?env_id=<env_id>",
"headers": {
"X-TencentCloud-SecretId": "<Tencent Cloud Secret ID>",
"X-TencentCloud-SecretKey": "<Tencent Cloud Secret Key>"
}
}
}
}

Controlling enabled plugins via URL (hosted mode only)

You can disable specific plugins with the disable_plugins query parameter in the url, e.g. to disable rag and env:

https://tcb-api.cloud.tencent.com/mcp/v1?env_id=YOUR_ENV_ID&disable_plugins=rag&disable_plugins=env

Configurable plugin names: env, database, functions, hosting, storage, setup, interactive, rag, cloudrun, gateway, download, security-rule, invite-code, capi.

Hosted mode environment variables

In hosted mode, the MCP service runs in the cloud; environment variables are configured on the server. If you self-host, refer to the optional environment variables table in MCP Tools - Cloud MCP configuration (e.g. TENCENTCLOUD_SECRETID, TENCENTCLOUD_SECRETKEY, CLOUDBASE_ENV_ID).

When using Tencent Cloud’s hosted MCP, passing env_id and credentials via the URL and headers above is sufficient; no server-side environment variables are required.


Supported plugins

PluginDescription
envEnvironment: login/logout, environment query, security domain management
databaseDatabase: NoSQL / SQL structure and read/write, data models
functionsCloud functions: list, create, update, invoke, logs, triggers, HTTP access
hostingStatic hosting: upload/delete/search files, domain management
storageCloud storage: query, upload/download/delete files
setupConfig and rules: download templates, IDE rules and config files
interactiveInteraction: requirement clarification, operation confirmation dialogs
ragKnowledge base and web: knowledge base retrieval, web search
downloadDownload: project templates, remote files to local
gatewayGateway: cloud function HTTP access
security-ruleSecurity rules: read/write rules for NoSQL/SQL/cloud function/storage bucket
invite-codeInvite code: AI programming incentive activation
cloudrunCloud Run: service query, init/deploy/delete, etc.
capiCloud API: generic Tencent Cloud API calls

By default all of the above plugins are enabled. You can disable some via environment variables or URL parameters; see Local and Hosted mode sections above.

Supported tools

There are 38 MCP tools in total, grouped by plugin below. For full parameters and descriptions see MCP Tools.

PluginTool names
envlogin, logout, envQuery, envDomainManagement
databasereadNoSqlDatabaseStructure, writeNoSqlDatabaseStructure, readNoSqlDatabaseContent, writeNoSqlDatabaseContent, executeReadOnlySQL, executeWriteSQL, manageDataModel, modifyDataModel
functionsgetFunctionList, createFunction, updateFunctionCode, updateFunctionConfig, invokeFunction, getFunctionLogs, getFunctionLogDetail, manageFunctionTriggers
hostinguploadFiles, deleteFiles, findFiles, domainManagement
storagequeryStorage, manageStorage
setupdownloadTemplate, downloadRemoteFile
interactiveinteractiveDialog
ragsearchWeb, searchKnowledgeBase
gatewaycreateFunctionHTTPAccess
cloudrunqueryCloudRun, manageCloudRun
security-rulereadSecurityRule, writeSecurityRule
invite-codeactivateInviteCode
capicallCloudApi