ZCode Setup Guide
After setup, you can operate CloudBase services directly in ZCode AI conversations.
For example:
- "Create a users table" — AI creates the database collection
- "Deploy this function" — AI uploads and configures the cloud function
- "Deploy the frontend to CDN" — AI uploads files and configures hosting
No need to switch to the cloud console — everything can be done in ZCode with natural language.
Prerequisites
Before you start, make sure the following are ready:
Node.js and a CloudBase environment are ready
ZCode version: Use ZCode 3.4.1 or later.
Node.js: Install Node.js v18.15.0 or later:
node --version
If it is not installed, download it from the Node.js website.
CloudBase environment: See Create a CloudBase environment. New users can start with a free trial.
Configure your AI tool to connect with CloudBase capabilities. Supports local and hosted connection. See connection modes.
Step 1: Install / Configure CloudBase
使用内置插件(推荐,ZCode ≥ 3.4.1)
1. 打开 ZCode 设置 → 插件 2. 在 开发者工具 中找到 cloudbase-skills 并启用
手动配置 MCP(可选)
1. 打开 设置 → MCP 服务器 → 添加 → 新建 MCP 服务器 2. 填写:名称 `cloudbase`,作用域「用户」,类型 stdio,超时 `30000`,命令 `npx`,参数 `-y @cloudbase/cloudbase-mcp@latest`,环境变量 `INTEGRATION_IDE=ZCode` 3. 保存后返回列表
Step 2: Chat with AI
Enter the following in your AI chat in order:
Install CloudBase Skills: run npx skills add tencentcloudbase/cloudbase-skills -yUse CloudBase Skills: 在 CloudBase 中启用邮箱验证码登录Use the built-in plugin (recommended)
ZCode ships with the CloudBase plugin (cloudbase-skills). Enable it in Settings:
- Open ZCode Settings
- Go to Plugins on the left
- Under Developer Tools, find cloudbase-skills (Tencent CloudBase skills and MCP integration)
- Enable the plugin
After enabling, you can use CloudBase capabilities directly in chat.
Configure MCP manually (optional)
If you are not using the built-in plugin, add a CloudBase MCP server in ZCode:
- Open ZCode Settings → MCP Servers
- Click Add → New MCP Server
- Fill in the form below, save, then return to the list
Form fields
| Field | Value |
|---|---|
| Name | cloudbase |
| Scope | User |
| Type | stdio (local command) |
| Timeout (ms) | 30000 |
| Command | npx |
| Args (space-separated) | -y @cloudbase/cloudbase-mcp@latest |
| Env (optional) | INTEGRATION_IDE=ZCode |
JSON configuration
In JSON mode, you can use:
{
"mcpServers": {
"cloudbase": {
"command": "npx",
"args": ["-y", "@cloudbase/cloudbase-mcp@latest"],
"env": {
"INTEGRATION_IDE": "ZCode"
}
}
}
}
FAQ
Q: I can't find cloudbase-skills in the plugin list? A: Confirm ZCode ≥ 3.4.1, and look under Plugins → Developer Tools. You can also use manual MCP setup above.
Q: MCP connection failed? A: Check the command and args, ensure Node.js works locally, restart ZCode, and verify network access.
Q: Tool count shows 0? A: See FAQ.
More: Full FAQ