Skip to main content

ZCode Setup Guide

ZCode is Zhipu AI’s coding client. It supports plugins, Skills, and MCP. This page explains how to enable CloudBase in ZCode (≥ 3.4.1).

After setup, you can operate CloudBase services directly in ZCode AI conversations.

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

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.


Client

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. 保存后返回列表

Need help?View ZCode docs

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: 帮我巡检一下 CloudBase 环境的健康状况

ZCode ships with the CloudBase plugin (cloudbase-skills). Enable it in Settings:

  1. Open ZCode Settings
  2. Go to Plugins on the left
  3. Under Developer Tools, find cloudbase-skills (Tencent CloudBase skills and MCP integration)
  4. 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:

  1. Open ZCode Settings → MCP Servers
  2. Click Add → New MCP Server
  3. Fill in the form below, save, then return to the list

Form fields​

FieldValue
Namecloudbase
ScopeUser
Typestdio (local command)
Timeout (ms)30000
Commandnpx
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

相关资源