@cloudbase/cloudbase-mcp 2.24.0 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -515
- package/README.zh-CN.md +175 -0
- package/dist/cli.cjs +3 -3
- package/dist/index.cjs +1545 -501
- package/dist/index.d.ts +9 -0
- package/dist/index.js +431 -298
- package/package.json +13 -6
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
<div align="center"><a name="readme-top"></a>
|
|
2
|
+
|
|
3
|
+
<img src="https://raw.githubusercontent.com/TencentCloudBase/CloudBase-AI-Toolkit/main/mcp/icon.png" width="96" height="96" alt="CloudBase AI Toolkit" />
|
|
4
|
+
|
|
5
|
+
# @cloudbase/cloudbase-mcp
|
|
6
|
+
|
|
7
|
+
**腾讯云开发 CloudBase 的 MCP Server。** 属于 [CloudBase AI Toolkit](https://github.com/TencentCloudBase/CloudBase-AI-Toolkit)。
|
|
8
|
+
|
|
9
|
+
在 AI 编程工具里通过 Model Context Protocol 操作 CloudBase:登录、数据库、云函数、存储、托管与日志。
|
|
10
|
+
|
|
11
|
+
**简体中文** · [English](./README.md) · [Toolkit 总览](../README.zh-CN.md) · [文档][docs] · [更新日志][changelog] · [Issues][github-issues-link]
|
|
12
|
+
|
|
13
|
+
[![][npm-version-shield]][npm-link]
|
|
14
|
+
[![][npm-downloads-shield]][npm-link]
|
|
15
|
+
[![][github-stars-shield]][github-stars-link]
|
|
16
|
+
![][github-license-shield]
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
## 这个包是什么
|
|
21
|
+
|
|
22
|
+
`@cloudbase/cloudbase-mcp` 是 CloudBase MCP Server 的 npm 发行包,是 Toolkit 中的一块:
|
|
23
|
+
|
|
24
|
+
| 组件 | 作用 |
|
|
25
|
+
|------|------|
|
|
26
|
+
| **Plugin** | 一次安装 MCP + Skills + Hooks |
|
|
27
|
+
| **Agent Skills** | 场景化技能,约束可落地的 CloudBase 实践 |
|
|
28
|
+
| **MCP**(本包) | Agent 调用的工具,作用于你的云开发环境 |
|
|
29
|
+
|
|
30
|
+
IDE 支持时优先用 Plugin;只需 MCP 配置时用本包即可。
|
|
31
|
+
|
|
32
|
+
完整 Toolkit 叙事、相关仓库与 IDE 列表见 [仓库 README](../README.zh-CN.md)。
|
|
33
|
+
|
|
34
|
+
## 快速开始
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"mcpServers": {
|
|
39
|
+
"cloudbase": {
|
|
40
|
+
"command": "npx",
|
|
41
|
+
"args": ["@cloudbase/cloudbase-mcp@latest"]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
首次提示:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
登录云开发
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
用 CloudBase Skills 做一个带登录、数据库和权限的待办应用,然后部署
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
需要已开通 [云开发环境](https://tcb.cloud.tencent.com/dev),并对 AI 发起的敏感操作自行确认。
|
|
58
|
+
|
|
59
|
+
### 其他安装路径
|
|
60
|
+
|
|
61
|
+
| 路径 | 适用 |
|
|
62
|
+
|------|------|
|
|
63
|
+
| `npx plugins add TencentCloudBase/cloudbase-plugin` | 支持 Open Plugin Spec 的工具 |
|
|
64
|
+
| `npm i -g @cloudbase/cli && tcb ai` | [CloudBase AI CLI](https://docs.cloudbase.net/cli-v1/ai/introduce) 统一配置多种 IDE |
|
|
65
|
+
| Marketplace / 内置插件 | Claude Code、Codex、CodeBuddy、WorkBuddy、ZCode 等 |
|
|
66
|
+
|
|
67
|
+
## 连接方式
|
|
68
|
+
|
|
69
|
+
**本地**(默认):本机 `npx`,功能最全(含本地文件上传/模板)。需 Node.js v18.15.0+。
|
|
70
|
+
|
|
71
|
+
**托管**:IDE 通过 HTTP 连接腾讯云 MCP,无需本机 Node。部分依赖本地文件的能力不可用。
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"mcpServers": {
|
|
76
|
+
"cloudbase": {
|
|
77
|
+
"type": "http",
|
|
78
|
+
"url": "https://tcb-api.cloud.tencent.com/mcp/v1?env_id=<env_id>",
|
|
79
|
+
"headers": {
|
|
80
|
+
"X-TencentCloud-SecretId": "<腾讯云 Secret ID>",
|
|
81
|
+
"X-TencentCloud-SecretKey": "<腾讯云 Secret Key>"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
托管 URL 可用 `enable_plugins` / `disable_plugins`(逗号分隔)。插件名见本包 `src/server.ts`(如 `env`、`database`、`functions`、`hosting`、`storage`、`pg_database`、`cloudrun`、`logs`)。
|
|
89
|
+
|
|
90
|
+
**自建 Cloud Mode**:设置 `CLOUDBASE_MCP_CLOUD_MODE=true`(或 `MCP_CLOUD_MODE=true`),禁用面向远程调用方的本地文件/进程类工具。
|
|
91
|
+
|
|
92
|
+
| 场景 | 建议 |
|
|
93
|
+
|------|------|
|
|
94
|
+
| 个人开发 | 本地 `npx` |
|
|
95
|
+
| 团队 / 免运维 | 托管 HTTP |
|
|
96
|
+
| 自建 MCP | 必须开 Cloud Mode |
|
|
97
|
+
|
|
98
|
+
## 能力
|
|
99
|
+
|
|
100
|
+
在你的环境中完成常见后端工作(关键步骤请确认):
|
|
101
|
+
|
|
102
|
+
- **数据库**:PostgreSQL 与文档型数据库、数据模型、CRUD、权限
|
|
103
|
+
- **计算**:云函数 / 云托管——编写、部署、调用、排障
|
|
104
|
+
- **认证与存储**:登录方式、对象存储、与数据权限联动
|
|
105
|
+
- **发布与运维**:静态托管 / 小程序发布;日志与重新部署
|
|
106
|
+
|
|
107
|
+
工具目录:[MCP 工具](../doc/mcp-tools.md) · [tools.json](../scripts/tools.json)
|
|
108
|
+
|
|
109
|
+
## IDE 配置片段
|
|
110
|
+
|
|
111
|
+
<details>
|
|
112
|
+
<summary>Cursor (.cursor/mcp.json)</summary>
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"mcpServers": {
|
|
117
|
+
"cloudbase": {
|
|
118
|
+
"command": "npx",
|
|
119
|
+
"args": ["@cloudbase/cloudbase-mcp@latest"]
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
</details>
|
|
126
|
+
|
|
127
|
+
<details>
|
|
128
|
+
<summary>WindSurf (.windsurf/settings.json)</summary>
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"mcpServers": {
|
|
133
|
+
"cloudbase": {
|
|
134
|
+
"command": "npx",
|
|
135
|
+
"args": ["@cloudbase/cloudbase-mcp@latest"]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
</details>
|
|
142
|
+
|
|
143
|
+
<details>
|
|
144
|
+
<summary>CodeBuddy</summary>
|
|
145
|
+
|
|
146
|
+
已内置 CloudBase,通常无需手动配置 MCP。
|
|
147
|
+
|
|
148
|
+
</details>
|
|
149
|
+
|
|
150
|
+
其他:[IDE 配置指南](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/ide-setup/)。
|
|
151
|
+
|
|
152
|
+
## 文档
|
|
153
|
+
|
|
154
|
+
- [Toolkit 总览](../README.zh-CN.md)
|
|
155
|
+
- [快速开始](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/getting-started)
|
|
156
|
+
- [AI 插件](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/ai-agent-plugins)
|
|
157
|
+
- [常见问题](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/faq)
|
|
158
|
+
- [更新日志][changelog]
|
|
159
|
+
|
|
160
|
+
## 许可证
|
|
161
|
+
|
|
162
|
+
[MIT](../LICENSE) · [TencentCloudBase](https://github.com/TencentCloudBase)
|
|
163
|
+
|
|
164
|
+
<!-- Links -->
|
|
165
|
+
[docs]: https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/
|
|
166
|
+
[changelog]: https://github.com/TencentCloudBase/CloudBase-AI-Toolkit/releases
|
|
167
|
+
[github-issues-link]: https://github.com/TencentCloudBase/CloudBase-AI-Toolkit/issues
|
|
168
|
+
[github-stars-link]: https://github.com/TencentCloudBase/CloudBase-AI-Toolkit/stargazers
|
|
169
|
+
[npm-link]: https://www.npmjs.com/package/@cloudbase/cloudbase-mcp
|
|
170
|
+
|
|
171
|
+
<!-- Shields -->
|
|
172
|
+
[npm-version-shield]: https://img.shields.io/npm/v/@cloudbase/cloudbase-mcp?color=3B82F6&label=npm&logo=npm&style=flat-square
|
|
173
|
+
[npm-downloads-shield]: https://img.shields.io/npm/dw/@cloudbase/cloudbase-mcp?color=10B981&label=downloads&logo=npm&style=flat-square
|
|
174
|
+
[github-stars-shield]: https://img.shields.io/github/stars/TencentCloudBase/CloudBase-AI-Toolkit?color=F59E0B&label=stars&logo=github&style=flat-square
|
|
175
|
+
[github-license-shield]: https://img.shields.io/badge/license-MIT-6366F1?logo=github&style=flat-square
|