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.
Local mode (recommended)
Meaning and use cases
- Meaning: The MCP service is started on your machine via
npxand 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.
| Variable | Description | Default / notes |
|---|---|---|
CLOUDBASE_ENV_ID | CloudBase environment ID (optional) | When unset, first invocation will prompt login and environment selection |
TENCENTCLOUD_SECRETID | Tencent Cloud SecretId (optional) | When unset, obtained via login flow; Get Tencent Cloud API keys |
TENCENTCLOUD_SECRETKEY | Tencent Cloud SecretKey (optional) | Same as above |
TENCENTCLOUD_SESSIONTOKEN | Tencent Cloud temporary key token (optional) | Only when using temporary keys; obtain via STS |
TCB_REGION | Tencent Cloud region, e.g. ap-shanghai (optional) | When unset, SDK default is used |
INTEGRATION_IDE | Current IDE identifier (e.g. Cursor, CodeBuddy) (optional) | For logging and capability adaptation |
CLOUDBASE_MCP_PLUGINS_ENABLED | Comma-separated list of enabled plugins (optional) | When unset, default plugin set is used |
CLOUDBASE_MCP_PLUGINS_DISABLED | Comma-separated list of disabled plugins (optional) | Same effect as URL parameter disable_plugins |
WORKSPACE_FOLDER_PATHS / PROJECT_ROOT | Project root (for template download, remote files, etc.) (optional) | When unset, current working directory; in CI you can use GITHUB_WORKSPACE etc. |
CLOUDBASE_MCP_TELEMETRY_DISABLED | Set to true to disable telemetry (optional) | Enabled by default |
CLOUDBASE_LOG_DIR | Log directory (optional) | Default ~/.cloudbase-mcp/logs |
CLOUDBASE_GUIDE_PROMPT | Set 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>"
}
}
}
}
- Environment ID: See CloudBase Console.
- SecretId / SecretKey: Create or view at Tencent Cloud API Keys.
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
| Plugin | Description |
|---|---|
env | Environment: login/logout, environment query, security domain management |
database | Database: NoSQL / SQL structure and read/write, data models |
functions | Cloud functions: list, create, update, invoke, logs, triggers, HTTP access |
hosting | Static hosting: upload/delete/search files, domain management |
storage | Cloud storage: query, upload/download/delete files |
setup | Config and rules: download templates, IDE rules and config files |
interactive | Interaction: requirement clarification, operation confirmation dialogs |
rag | Knowledge base and web: knowledge base retrieval, web search |
download | Download: project templates, remote files to local |
gateway | Gateway: cloud function HTTP access |
security-rule | Security rules: read/write rules for NoSQL/SQL/cloud function/storage bucket |
invite-code | Invite code: AI programming incentive activation |
cloudrun | Cloud Run: service query, init/deploy/delete, etc. |
capi | Cloud 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.
| Plugin | Tool names |
|---|---|
| env | login, logout, envQuery, envDomainManagement |
| database | readNoSqlDatabaseStructure, writeNoSqlDatabaseStructure, readNoSqlDatabaseContent, writeNoSqlDatabaseContent, executeReadOnlySQL, executeWriteSQL, manageDataModel, modifyDataModel |
| functions | getFunctionList, createFunction, updateFunctionCode, updateFunctionConfig, invokeFunction, getFunctionLogs, getFunctionLogDetail, manageFunctionTriggers |
| hosting | uploadFiles, deleteFiles, findFiles, domainManagement |
| storage | queryStorage, manageStorage |
| setup | downloadTemplate, downloadRemoteFile |
| interactive | interactiveDialog |
| rag | searchWeb, searchKnowledgeBase |
| gateway | createFunctionHTTPAccess |
| cloudrun | queryCloudRun, manageCloudRun |
| security-rule | readSecurityRule, writeSecurityRule |
| invite-code | activateInviteCode |
| capi | callCloudApi |