CloudBase — Claude Code MCP server: what it does, how to install
CloudBase lets an AI coding client work with Tencent CloudBase databases, functions, storage, and hosting. Use it to build and deploy apps from prompts.
claude mcp add mcp -- npx -y @cloudbase/cloudbase-mcpWhat CloudBase does
CloudBase gives the agent tools for PostgreSQL and document databases, data models, CRUD operations, and permissions. It can author, deploy, invoke, and debug cloud functions and Cloud Run services, handle login methods and object storage, publish static hosting or a Mini Program, inspect logs, and redeploy.
The MCP server runs locally with npx or connects through a remote HTTP endpoint. Remote OAuth opens browser authorization, while clients without OAuth and CI/CD can use static credentials. Local mode requires Node.js v18.15.0+; without that version, the local server will not start. Remote mode cannot upload local files or download templates, and the international site does not expose NoSQL tools.
You need a CloudBase environment before using the server, and critical actions should be confirmed before execution. Deleting functions, collections, documents, or stored files needs a deliberate check.
What it helps with
- create database models and set permissions
- deploy and invoke a cloud function
- connect user login with object storage
- publish static hosting and inspect logs
- redeploy an application to CloudBase
Example prompts for the agent
- Connect to CloudBase and list the available environments.
- Build a todo app with login, a database, and permissions, then deploy it through CloudBase.
- Inspect the latest deployment logs and explain the error.
How to install CloudBase
1Platform CLI
claude mcp add mcp -- npx -y @cloudbase/cloudbase-mcp2Platform CLI: remote server
claude mcp add --transport http cloudbase-mcp 'https://tcb-api.cloud.tencent.com/mcp/v1?env_id={env_id}'1Platform CLI
codex mcp add mcp -- npx -y @cloudbase/cloudbase-mcp2Platform CLI: remote server
codex mcp add mcp --url 'https://tcb-api.cloud.tencent.com/mcp/v1?env_id={env_id}'1Config file
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@cloudbase/cloudbase-mcp"
]
}
}
}2Config file
{
"mcpServers": {
"mcp": {
"url": "https://tcb-api.cloud.tencent.com/mcp/v1?env_id={env_id}"
}
}
}1Config file
{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cloudbase/cloudbase-mcp"
]
}
}
}2Config file
{
"servers": {
"mcp": {
"type": "http",
"url": "https://tcb-api.cloud.tencent.com/mcp/v1?env_id={env_id}"
}
}
}1Platform CLI
gemini mcp add mcp npx -y @cloudbase/cloudbase-mcp2Platform CLI: remote server
gemini mcp add -t http mcp 'https://tcb-api.cloud.tencent.com/mcp/v1?env_id={env_id}'Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about CloudBase
How do I install CloudBase in Claude Code?
Run claude mcp add mcp -- npx -y @cloudbase/cloudbase-mcp.
What does CloudBase do?
CloudBase connects an AI coding agent to Tencent CloudBase databases, functions, storage, hosting, and logs through MCP.
What is the difference between local and remote CloudBase mode?
Local mode runs through npx and supports local file operations. Remote mode uses HTTP and can use OAuth, but local-file uploads and template downloads are unavailable there.