CloudBase AI 插件
一键把 CloudBase 接入 AI 编程助手:同时捆绑 MCP Server 与 Agent Skills,安装后即可查库、管云函数、部署托管等,无需再分别配置。
相比单独装 Skills,插件还带上 Hooks 等能力,Skill 激活更稳定,推荐优先用插件。
最快上手: 复制下面的 AI Prompt,粘贴到你的 AI IDE。
帮我把 CloudBase 接好,按下面做:
1. 打开 https://docs.cloudbase.net/skill.md,按说明完成接入。
2. 接入完成后告诉我,并建议最相关的下一步。
安装
方式 1:一键安装(推荐)
通过兼容 Open Plugin Specification 的 plugins CLI 安装,会自动检测本机 AI 工具。优先用这条路径,不要手写 MCP JSON。
默认 --scope user(全局):
npx plugins add TencentCloudBase/cloudbase-plugin -y --scope user
# Sites 插件(可选)
npx plugins add TencentCloudBase/cloudbase-sites-plugin -y --scope user
支持的 AI IDE(npx plugins targets)
--target ID | AI IDE | 说明 |
|---|---|---|
claude-code | Claude Code | ~/.claude |
cursor | Cursor | ~/.cursor |
codex | Codex | ~/.codex |
grok | Grok Build | ~/.grok(仅 per-user) |
kimi | Kimi Code | ~/.kimi-code(仅 per-user) |
github-copilot | GitHub Copilot CLI | ~/.copilot(独立 copilot CLI,不是 gh copilot) |
vscode | Visual Studio Code | Agent plugins(Preview,仅 per-user) |
不写 --target 时,会安装到本机所有已检测到的上述目标。查看检测结果:
npx plugins targets
只装某一个工具时:
npx plugins add TencentCloudBase/cloudbase-plugin -y --scope user --target cursor
安装后重启 / reload 对应工具即可。
GitHub 不可达时(CNB 镜像)
owner/repo 短名会固定解析到 GitHub。若 git clone GitHub 失败,改用 完整 CNB URL(由 CI 从 OPS 产物同步,不含 marketplace 元数据):
npx plugins add https://cnb.cool/tencent/cloud/cloudbase/cloudbase-plugin.git -y --scope user
# Sites 插件(可选)
npx plugins add https://cnb.cool/tencent/cloud/cloudbase/cloudbase-sites-plugin.git -y --scope user
不要用 monorepo 镜像
CloudBase-AI-ToolKit做npx plugins add:其 marketplace 结构与 OPS 专用仓不同,CLI 可能装不上。
若插件仍无法安装,可退回 Skills CNB 或 npm MCP,见 skill.md。
没有 git(或装不上 git)
plugins CLI 对 owner/repo 和 https:// 地址一律执行 git clone,CNB 地址也是 git。机器上没有 git 时,改用 HTTPS 下载 tarball,解包后按本地目录安装:
# 插件:下载 → 解包 → 从本地目录安装
curl -L https://codeload.github.com/TencentCloudBase/cloudbase-plugin/tar.gz/refs/heads/main -o cloudbase-plugin.tgz
tar xzf cloudbase-plugin.tgz
npx plugins add ./cloudbase-plugin-main -y --scope user --target <target>
# Skills:归档地址直接下载解包,同样不需要 git
npx skills add https://codeload.github.com/TencentCloudBase/cloudbase-skills/tar.gz/refs/heads/main -y
三点差异,装之前先知道:
--target必须显式指定 —— 检测不到客户端时会报No supported targets detected- 市场名注册成目录名
cloudbase-plugin-main,不是tencent-cloudbase - 背后没有 git 仓库,自动更新失效,升级要重新下载再装一次
Windows 10+ 自带 curl 和 tar。能装 Git for Windows 的话仍建议装,后续升级省事。
方式 2:按客户端安装
不在上面 targets 列表里的工具,在这里选 —— 有插件市场的优先走插件市场,其余按 MCP 配置连接:
该客户端已内置 CloudBase,接入方式以官方市场 / 连接器为准,站点跟随你的登录态,无需在此选择。
配置你的 AI 工具以连接 CloudBase 能力 支持本地与远端两种连接方式,详见 连接方式。
步骤 1:安装 / 配置 CloudBase
通过插件市场安装(推荐)
1. 在 Codex App 中点击右上角的 `+` 按钮 2. 选择 添加插件市场 3. 填写来源 `TencentCloudBase/CloudBase-MCP`,Git 引用 `main`,稀疏路径留空 4. 添加成功后,在 Tencent CloudBase 市场中安装 `cloudbase` 插件 5. 新开一个 Codex 线程,让插件、技能和 MCP 工具完整加载
完整步骤见 Codex 配置指南。
步骤 2:和 AI 对话
在 AI 对话中依次输入以下内容:
阅读 https://docs.cloudbase.net/skill.md,帮我介绍可以做什么使用 CloudBase Skills: 用 CloudBase 给我搭一套最小可用前后端 demo 项目插件里有什么
| 能力 | 说明 |
|---|---|
| MCP Server | 环境、数据库、云函数、托管、存储、云托管、认证、权限、日志等,详见 MCP 工具 |
| Agent Skills | 平台、Web / 小程序、云函数、认证、数据库、AI 模型、UI 等专业知识,详见 如何使用 Skill |