CL
OfficialDatabase

CloudBase MCP Server for WeChat Mini-Programs

Build WeChat Mini-Programs and full-stack apps with Tencent CloudBase's MCP server, using serverless cloud functions and databases for one-stop backend servi...

Overview

CloudBase MCP (Model Context Protocol) is a lightweight server component that connects AI-assisted development tools (AI IDEs, code assistants) to Tencent CloudBase backend services. It acts as a bridge that automates the deployment and runtime configuration steps required to turn AI-generated code into a running application: provisioning cloud functions, databases, hosting, storage, security rules and related infrastructure — all without manual DevOps work.

For developers building WeChat Mini-Programs or full-stack apps, MCP removes the gap between “generate code” and “publish app”. AI IDEs such as Cursor, OpenClaw or CodeBuddy can call an MCP endpoint (local or hosted) to manage environment login, create cloud resources, deploy serverless functions, seed databases, and return live URLs or Mini-Program cloud environment IDs.

Features

  • Serverless-first deployment of AI-generated apps (cloud functions, hosting)
  • Database provisioning and CRUD setup for fast app scaffolding
  • Storage and file management (uploads/downloads when using local MCP)
  • Environment management: CloudBase environment login and selection
  • Plugin-based architecture: enable/disable features like RAG, env, functions, database, hosting, storage, gateway
  • Two operation modes: Local (npx-run) and Hosted (HTTP) to suit dev or CI environments
  • Integration-friendly: designed to be consumed by AI IDEs and CLI tools
  • Minimal DevOps: no YAML authoring or manual cloud console navigation required

Installation / Configuration

Two common ways to run MCP are local (recommended for full capabilities) and hosted (for zero local setup).

Local mode (recommended)

  • Runs MCP on your machine via npx. Supports local filesystem features such as uploading files and installing templates.

Example configuration for an AI IDE that supports mcpServers:

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

Start manually with:

npx @cloudbase/cloudbase-mcp@latest

Hosted mode (cloud-run)

  • MCP runs in Tencent Cloud; the IDE communicates over HTTP. This requires providing Tencent Cloud API credentials via headers. Hosted mode is convenient when you cannot run Node locally, but local-file operations are limited.

Example configuration (replace placeholders):

{
  "mcpServers": {
    "cloudbase": {
      "type": "http",
      "url": "https://tcb-api.cloud.tencent.com/mcp/v1?env_id=<ENV_ID>",
      "headers": {
        "X-TencentCloud-SecretId": "<SECRET_ID>",
        "X-TencentCloud-SecretKey": "<SECRET_KEY>"
      }
    }
  }
}

Disable specific plugins via URL query parameters (example disables rag and env):

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

Security note: When using hosted mode, avoid embedding long-lived secrets in shared configs. Prefer scoped credentials or temporary keys where possible.

Recommended quick-install

npm install -g @cloudbase/cli@latest
# then
tcb ai

The CloudBase AI CLI offers one-step setup and works with multiple AI IDEs.

Available Tools / Resources

  • GitHub repo: https://github.com/TencentCloudBase/CloudBase-AI-ToolKit
  • Documentation & tutorials: https://docs.cloudbase.net/ai/cloudbase-ai-toolkit
  • Issues & feedback: use the GitHub Issues page in the repository
  • Changelog and release notes available in the repo

Supported AI IDEs and integrations (examples):

ToolPlatform
CloudBase AI CLICommand-line
CursorIndependent AI IDE
OpenClawCLI / IDE integration
WindSurfVSCode/JetBrains & standalone IDEs
CodeBuddy / other MCP-capable IDEsVarious AI IDEs

Use Cases

  • WeChat Mini-Program backend: scaffold a Mini-Program and deploy cloud functions, database rules, and hosting in a few prompts. MCP returns the environment ID and hosting URLs for the Mini-Program to connect.
  • Rapid prototyping from AI-generated code: an AI IDE generates game logic or a CRUD app; MCP provisions functions and a database, deploys services, and provides a live endpoint.
  • Teaching and demos: use local MCP to let students iterate code and immediately deploy; instructors can demonstrate full-stack deployment without manual console steps.
  • CI/CD for AI-assisted development: run hosted MCP in a controlled cloud environment to let automated workflows publish test instances without local dependencies.
  • RAG-enhanced apps: enable retrieval-augmented generation (RAG) plugins so AI assistants can create document-indexing flows backed by CloudBase storage and DB.

Getting Started (first run)

  1. Configure your AI IDE to use an MCP server (local or hosted).
  2. Start MCP locally via npx or point your IDE to the hosted URL.
  3. Use the IDE to “log in to CloudBase” — the MCP will open a login flow and let you pick an environment.
  4. Ask the AI assistant to scaffold or deploy an app (for example: “Create and deploy a two-player online Gomoku game”). MCP will provision resources and return a deployment link when finished.

CloudBase MCP reduces manual cloud configuration and lets developers focus on application logic rather than deployment plumbing. For implementation details and advanced configuration, consult the GitHub repository and CloudBase docs.