Skip to main content

Connect to CloudBase MCP

After connecting via the Model Context Protocol (MCP), you can operate CloudBase services directly in your AI chat—no need to switch between your IDE and the console.

CloudBase MCP supports Local Mode (run via npx on your machine) and Hosted Mode (connect to the cloud over HTTP). In Local Mode you can configure environment variables; in Hosted Mode you can control plugins via a URL.

See Connection Modes: Local vs Hosted.

Fastest start: Copy the AI Prompt below into your AI IDE.

Help me get set up with CloudBase. Do the following:
1. Open https://docs.cloudbase.net/skill.md and follow the instructions.
2. When done, tell me you're ready and suggest the most relevant next steps.

Prerequisites​

Before you start, make sure you have:

Node.js and a CloudBase environment ready

Node.js: Install Node.js v18.15.0 or later:

node --version

If you don’t have it installed, download it from the Node.js website.

CloudBase environment: Follow the doc Create a CloudBase environment. New users can start for free.

Connect Your AI Tool​

Pick your AI development tool and follow the setup guide:

Client

Configure your AI tool to connect with CloudBase capabilities. Supports local and hosted connection. See connection modes.

Step 1: Install / Configure CloudBase

Use project template (recommended) - Template includes MCP configuration and AI rulesView templates

Install in one click:

Add to Cursor

Or manual configuration:

Or add this configuration to .cursor/mcp.json:

json
1{
2 "mcpServers": {
3 "cloudbase": {
4 "command": "npx",
5 "args": ["@cloudbase/cloudbase-mcp@latest"],
6 "env": {
7 "INTEGRATION_IDE": "Cursor"
8 }
9 }
10 }
11}

Step 2: Chat with AI

Enter the following in your AI chat in order:

prompt
Read https://docs.cloudbase.net/skill.md and tell me what it can do
Use CloudBase Skills: 在 Web 应用中使用 CloudBase 文档数据库实现分页查询和复杂查询功能

Manually Confirm Tool Calls​

Most MCP clients (e.g. Cursor) will ask you to manually confirm every tool call. We recommend keeping this enabled and carefully reviewing the tool call details before execution.

Start Using It​

After setup, type in your AI chat:

Log in to CloudBase

Your AI will guide you through login and environment selection. Then you can start describing requirements in natural language and let the AI build your app.

🌏 International site users: if your environment is in the Tencent Cloud international site, declare the site first (TCB_SITE=intl); otherwise login goes through the China-site path and your international-site environment won't be visible. For all the ways to set it (MCP env, --site startup flag, specifying it in the conversation, CLI), see Connection Modes - International site users.

For the case where a China-site environment in the ap-singapore region is misdetected as international, see FAQ.

Examples​

End-to-end example:

Build a todo app with phone-number login using CloudBase, and deploy it

The AI can automatically: generate frontend and backend code, configure auth and the database, deploy cloud functions and static hosting, and return an access link.

Step-by-step examples:

  • "Build a WeChat Mini Program ordering system with CloudBase" — AI scaffolds pages, creates the cloud database, writes cloud functions, and guides preview
  • "Build a reservation management system that lets users place orders and admins update status" — AI models it with CloudBase PostgreSQL, configures permissions, and wires up frontend and backend
  • "Add phone-number login to a Web app" — AI enables the auth method and integrates the CloudBase SDK

Detailed requirement example:

Build a coffee reservation Mini Program with CloudBase that includes:
- Menu browsing and ordering
- Writing orders to the cloud database
- Cloud functions to handle order status
- Preview in WeChat DevTools

AI Skill Scenarios​

Video Tutorials​

Want to learn CloudBase MCP via videos? See tutorials and practical cases.