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 on the domestic site can start with a free trial.


Client

This client ships CloudBase built in. Setup follows its own marketplace or connectors, and the site follows your login state — nothing to pick here.

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

Step 1: Install / Configure CloudBase

Use the built-in plugin (recommended, ZCode ≥ 3.4.1)

1. Open ZCode Settings → Plugins 2. Under Developer Tools, find cloudbase-skills and enable it

Manual MCP config (optional)

1. Open Settings → MCP Servers → Add → New MCP server 2. Fill in: name `cloudbase`, scope "User", type stdio, timeout `30000`, command `npx`, args `-y @cloudbase/cloudbase-mcp@latest`, env `INTEGRATION_IDE=ZCode` 3. Save and go back to the list

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 PG 应用的数据库连接和权限配置问题

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

相关资源