Skip to main content

CodeBuddy Code Configuration Guide

After configuration, you can directly operate CloudBase services in CodeBuddy Code command line conversations.

For example:

  • "Create user table" - AI automatically creates database collection
  • "Deploy this function" - AI automatically uploads and configures cloud function
  • "Deploy frontend to CDN" - AI automatically uploads files and configures hosting

No need to switch to cloud console, all operations can be completed in command line using natural language.

Prerequisites

Before starting configuration, please ensure the following conditions are met:

Node.js environment and CloudBase environment are ready

Node.js Environment: Ensure Node.js v18.15.0 or higher is installed:

node --version

If not installed, please download and install from Node.js official website.

CloudBase Environment: Please refer to the documentation Create CloudBase Environment. New users can sign up for free.


Client

Configure your MCP client to connect with your CloudBase environment

Step 1: Installation

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

CLI command:

codebuddy mcp add --scope project cloudbase --env INTEGRATION_IDE=CodeBuddyCode -- npx @cloudbase/cloudbase-mcp@latest

Alternatively, add this configuration to .mcp.json:

Or manual configuration:

Alternatively, add this configuration to .mcp.json:

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

Step 2: Verify connection

After configuration, enter the following in your AI chat to verify:

prompt
检查 CloudBase 工具是否可用, 下载 CloudBase AI 开发规则到当前项目

Common Questions

Q: MCP connection failed? A: Check if .mcp.json file format is correct, confirm npx command is available, restart CodeBuddy Code.

Q: Tool count shows 0? A: Please refer to FAQ.

More questions please check: Complete FAQ

相关资源