@cloudbase/cloudbase-mcp 1.4.0 → 1.4.2

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 CHANGED
@@ -8,6 +8,8 @@
8
8
 
9
9
  **通过AI提示词和MCP协议+云开发,让开发更智能、更高效**
10
10
 
11
+ **🌍 Languages:** **中文** | [English](README-EN.md)
12
+
11
13
 
12
14
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
13
15
  [![npm version](https://badge.fury.io/js/%40cloudbase%2Fcloudbase-mcp.svg)](https://badge.fury.io/js/%40cloudbase%2Fcloudbase-mcp)
@@ -22,6 +24,9 @@
22
24
 
23
25
  当你在**Cursor/ VSCode GitHub Copilot/WinSurf/CodeBuddy**等AI编程工具里写代码时,它能自动帮你生成可直接部署的前后端应用+小程序,并一键发布到腾讯云开发 CloudBase。
24
26
 
27
+ <a href="https://www.producthunt.com/posts/cloudbase-ai-tookit?embed=true&utm_source=badge-featured&utm_medium=badge&utm_source=badge-cloudbase&#0045;ai&#0045;tookit" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=971451&theme=light&t=1748519563832" alt="CloudBase&#0032;AI&#0032;Tookit - Prompt&#0032;to&#0032;Production&#0058;&#0032;Full&#0045;stack&#0044;&#0032;DB&#0032;&#0038;&#0032;functions—zero&#0032;setup&#0046; | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
28
+
29
+
25
30
 
26
31
  ### 🚀 三大核心能力
27
32
 
@@ -30,6 +35,11 @@
30
35
 
31
36
  **Web应用**: 现代化前端 + 静态托管<br>**微信小程序**: 云开发小程序解决方案<br>**后端服务**: 云数据库 + 无服务器函数+云托管
32
37
 
38
+
39
+
40
+ **完整视频演示**
41
+
42
+ https://github.com/user-attachments/assets/2b402fa6-c5c4-495a-b85b-f5d4a25daa4a
33
43
  </div>
34
44
 
35
45
  ## ✨ 核心特性
@@ -48,13 +58,10 @@
48
58
 
49
59
  ### 0.前置条件
50
60
 
51
- #### 1. 安装 AI 开发工具
52
- 例如:
53
- - [Cursor](https://www.cursor.com/)
54
- - [WindSurf](https://windsurf.com/editor)
55
- - [CodeBuddy](https://copilot.tencent.com/)
61
+ #### 安装 AI 开发工具
62
+ 例如 [Cursor](https://www.cursor.com/) | [WindSurf](https://windsurf.com/editor) | [CodeBuddy](https://copilot.tencent.com/) 等
56
63
 
57
- #### 2. 开通云开发环境
64
+ #### 开通云开发环境并获取环境 ID
58
65
  1. 访问 [腾讯云开发控制台](https://tcb.cloud.tencent.com/dev)开通环境,新用户可以免费开通体验
59
66
  2. 在控制台「概览」页面右侧获取 **环境ID**
60
67
  (后续部署需要此 ID)
@@ -65,15 +72,35 @@
65
72
 
66
73
  建议选择适合你的项目模板快速开始:
67
74
 
68
- - React Web应用+云开发模板:[下载代码包](https://static.cloudbase.net/cloudbase-examples/web-cloudbase-react-template.zip) | [开源代码地址](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/web/cloudbase-react-template)
69
- - 小程序+云开发模板:[下载代码包](https://static.cloudbase.net/cloudbase-examples/miniprogram-cloudbase-miniprogram-template.zip) | [开源代码地址](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/miniprogram/cloudbase-miniprogram-template)
75
+ - React Web应用+云开发模板:[下载代码包](https://static.cloudbase.net/cloudbase-examples/web-cloudbase-react-template.zip?v=2025053001) | [开源代码地址](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/web/cloudbase-react-template)
76
+ - 小程序+云开发模板:[下载代码包](https://static.cloudbase.net/cloudbase-examples/miniprogram-cloudbase-miniprogram-template.zip?v=2025053001) | [开源代码地址](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/miniprogram/cloudbase-miniprogram-template)
70
77
 
71
78
  ### 2. 配置你的 AI IDE
72
79
 
80
+ 以下工具均支持 CloudBase AI ToolKit,可根据你的开发环境选择合适的工具:
81
+
82
+ | 工具 | 支持平台 |
83
+ |------|----------|
84
+ | [Cursor](https://cursor.com/) | 独立 IDE|
85
+ | [WindSurf](https://windsurf.com/editor) | 独立 IDE,VSCode、JetBrains 插件 |
86
+ | [CodeBuddy](https://copilot.tencent.com/) | VS Code, JetBrains、微信开发者工具插件 |
87
+ | [CLINE](https://cline.so/) | VS Code 插件 |
88
+ | [GitHub Copilot](https://github.com/features/copilot) | VS Code 插件 |
89
+ | [Trae](https://www.trae.ai/) | 独立 IDE |
90
+ | [通义灵码](https://tongyi.aliyun.com/lingma) | 独立 IDE,VS Code, JetBrains插件 |
91
+ | [RooCode](https://roocode.com/) | VS Code插件 |
92
+
93
+ 选择工具后,请按照下方对应的配置说明进行设置。每个工具都需要配置云开发环境 ID 才能使用 MCP 功能。如果你还没有云开发环境,请先[开通云开发环境](#0前置条件)。
94
+
73
95
  <details>
74
96
  <summary><strong>🔧 Cursor 配置</strong></summary>
75
97
 
76
- #### 步骤1:配置 MCP
98
+
99
+ #### 步骤1:自动应用 AI 规则
100
+
101
+ 模板中已包含 `.cursor/rules/` 目录,AI 会自动识别云开发最佳实践。
102
+
103
+ #### 步骤2:配置 MCP
77
104
 
78
105
  1. 请修改项目中的 `.cursor/mcp.json` ,填写你的云开发环境 ID
79
106
 
@@ -95,16 +122,20 @@
95
122
 
96
123
  点击 Cursor 客户端右上角的 ⚙️ 图标,点击进入之后,选择"MCP",在 MCP Server 页面,找到 cloudbase 右边的开关按钮,点击启用
97
124
 
98
- #### 步骤2:添加 AI 规则
125
+ #### 步骤3:切换到 Agent 模式
99
126
 
100
- 模板中已包含 `.cursor/rules/` 目录,AI 会自动识别云开发最佳实践。
127
+ 对话窗口中使用 Agent 进行代码生成和自动化操作
101
128
 
102
129
  </details>
103
130
 
104
131
  <details>
105
- <summary><strong>🌊 WindSurf 配置</strong></summary>
132
+ <summary><strong>🌊 Codeium/WindSurf 配置</strong></summary>
106
133
 
107
- #### 步骤1:配置 MCP
134
+ #### 步骤1:自动应用 AI 规则
135
+
136
+ 模板中的 `.windsurf/` 目录包含专为 WindSurf 优化的配置。
137
+
138
+ #### 步骤2:配置 MCP
108
139
 
109
140
  点击 windsurf 的 Plugins icon,点击"View raw config",在其中加入 clodubase-mcp,同时设置环境 id
110
141
 
@@ -122,25 +153,39 @@
122
153
  }
123
154
  ```
124
155
 
125
- #### 步骤2:AI 规则配置
156
+ #### 步骤3:切换到 Write 模式
157
+
158
+ 在对话中切换到 Write 模式,这样可以智能进行生成
126
159
 
127
- 模板中的 `.windsurf/` 目录包含专为 WindSurf 优化的配置。
128
160
 
129
161
  </details>
130
162
 
131
163
  <details>
132
- <summary><strong>🤖 CLINE 配置</strong></summary>
133
164
 
134
- #### MCP 配置
165
+ <summary><strong>👥 CodeBuddy 配置</strong></summary>
166
+
167
+
168
+ #### 步骤1:自动应用 AI 规则
169
+
170
+ 模板中已包含 `.rules/` 目录,CodeBuddy 会自动识别云开发最佳实践
171
+
172
+ #### 步骤 2:配置 MCP
173
+
174
+ **配置云开发 MCP Server**
175
+
176
+ 点击 CodeBuddy 右上角的 MCP 图标
177
+
178
+ 点击进入之后,点击右侧的 + 号,在打开的文件中修改 MCP 配置
179
+
180
+ 其中 CLOUDBASE_ENV_ID 填写你的云开发环境 ID
181
+
135
182
  ```json
136
183
  {
137
184
  "mcpServers": {
138
185
  "cloudbase-mcp": {
139
- "command": "npx",
186
+ "command": "npx",
140
187
  "args": ["@cloudbase/cloudbase-mcp@latest"],
141
188
  "env": {
142
- "TENCENTCLOUD_SECRETID": "你的腾讯云SecretId",
143
- "TENCENTCLOUD_SECRETKEY": "你的腾讯云SecretKey",
144
189
  "CLOUDBASE_ENV_ID": "你的云开发环境ID"
145
190
  }
146
191
  }
@@ -148,35 +193,113 @@
148
193
  }
149
194
  ```
150
195
 
151
- 使用模板中的 `.clinerules/` 目录配置。
196
+ #### 步骤 3:切换到 Craft 智能体
197
+
198
+ 在对话窗口中切换到 Craft 模式,这样可以智能生成项目
199
+
200
+ 注意,在 CodeBuddy 的 Craft 中使用时,需要在右侧的设置按钮中,关闭确认计划功能,这样可以更好的执行工具。
152
201
 
153
202
  </details>
154
203
 
204
+
155
205
  <details>
156
- <summary><strong>👥 CodeBuddy 配置</strong></summary>
206
+ <summary><strong>🤖 CLINE 配置</strong></summary>
207
+
208
+
209
+ #### 步骤1:自动应用 AI 规则
210
+
211
+ 模板中已包含 `.clinerules/` 目录,AI 会自动识别云开发最佳实践
212
+
213
+ #### 步骤 2:配置 MCP
214
+
215
+ **配置云开发 MCP Server**
216
+
217
+ 在 Cline 的面板中找到 MCP Server 图标,点击进入,点击 ⚙️ 设置图标,然后点击 Configure MCP Servers
218
+
219
+ 加入以下内容,其中 CLOUDBASE_ENV_ID 填写你的云开发环境 ID
220
+
221
+ ```json
222
+ {
223
+ "mcpServers": {
224
+ "cloudbase": {
225
+ "autoApprove": [],
226
+ "timeout": 60,
227
+ "command": "npx",
228
+ "args": [
229
+ "@cloudbase/cloudbase-mcp@latest"
230
+ ],
231
+ "env": {
232
+ "CLOUDBASE_ENV_ID": "你的云开发环境ID"
233
+ },
234
+ "transportType": "stdio",
235
+ "disabled": false
236
+ }
237
+ }
238
+ }
239
+ ```
240
+
241
+ #### 步骤 3:使用 AI 对话
242
+
243
+ 回到对话界面,建议使用代码生成能力较好和支持 function call 的模型
157
244
 
158
- #### 配置说明
159
- CodeBuddy 需要手动添加规则文件:
160
245
 
161
- 1. 使用模板中的 `.common_rules/` 目录
162
- 2. 在对话时使用 `@` 选择相应的云开发规则
163
- 3. MCP 配置同其他工具
164
246
 
165
247
  </details>
166
248
 
249
+
167
250
  <details>
168
251
  <summary><strong>🐙 GitHub Copilot 配置</strong></summary>
169
252
 
170
253
  #### GitHub Copilot Chat 配置
171
254
 
255
+ #### 步骤1:自动应用 AI 规则
256
+
172
257
  模板中的 `.github/` 目录包含 Copilot 优化配置。
173
258
 
259
+ #### 步骤2:启用云开发 MCP
260
+
261
+ 模板中的 `.vscode/mcp.json` 目录已经包含云开发 MCP 配置
262
+
263
+ 请修改其中的环境 Id 为你的云开发环境 Id
264
+
265
+ ```json
266
+ {
267
+ "servers": {
268
+ "cloudbase": {
269
+ "command": "npx",
270
+ "args": [
271
+ "@cloudbase/cloudbase-mcp@latest"
272
+ ],
273
+ "env": {
274
+ "CLOUDBASE_ENV_ID": "你的云开发环境ID"
275
+ }
276
+ }
277
+ }
278
+ }
279
+ ```
280
+
281
+ #### 步骤 3:切换到 Agent 模式
282
+
283
+ 在对话窗口左下角切换到 Agent 模式,进行对话
284
+
285
+
174
286
  </details>
175
287
 
176
288
  <details>
177
289
  <summary><strong>🎯 Trae 配置</strong></summary>
178
290
 
179
- #### 配置步骤
291
+ 本操作指引支持 Trae 国际版和 Trae CN 版本,建议使用 Claude/DeepSeek V3 0324 等模型进行测试
292
+
293
+ #### 步骤1:自动应用 AI 规则
294
+
295
+ 模板中的 `.trae/rules` 目录包含面向 Trae 的云开发规则配置,AI 会自动应用,无需修改。
296
+
297
+ #### 步骤2:启用云开发 MCP
298
+
299
+ 在 Trae 右上角点击 ⚙️设置图标,点击进入 MCP,点击设置中的手动配置,粘贴如下配置
300
+
301
+ 其中 CLOUDBASE_ENV_ID 填写你的云开发环境 ID
302
+
180
303
  ```json
181
304
  {
182
305
  "mcpServers": {
@@ -190,17 +313,104 @@ CodeBuddy 需要手动添加规则文件:
190
313
  }
191
314
  }
192
315
  ```
316
+ #### 步骤3:使用 Builder with MCP 对话
317
+
318
+ 回到对话窗口,在智能体中选择使用 Builder with MCP 对话
319
+
320
+
321
+ </details>
322
+
323
+ <details>
324
+ <summary><strong>🧩 通义灵码 配置</strong></summary>
325
+
326
+
327
+ #### 步骤1:自动应用 AI 规则
328
+
329
+ 模板中已包含 `.lingma/` 通义灵码会自动识别云开发最佳实践
330
+
331
+ #### 步骤 2:配置 MCP
332
+
333
+ **配置云开发 MCP Server**
334
+
335
+ 点击通义灵码右上角的昵称,然后选择个人设置,点击进入 MCP 设置
336
+
337
+
338
+
339
+ 点击进入之后,点击右侧的打开配置文件按钮,在打开的文件中修改 MCP 配置
340
+
341
+ 其中 CLOUDBASE_ENV_ID 填写你的云开发环境 ID
342
+
343
+ ```json
344
+ {
345
+ "mcpServers": {
346
+ "cloudbase-mcp": {
347
+ "command": "npx",
348
+ "args": ["@cloudbase/cloudbase-mcp@latest"],
349
+ "env": {
350
+ "CLOUDBASE_ENV_ID": "你的云开发环境ID"
351
+ }
352
+ }
353
+ }
354
+ }
355
+ ```
356
+
357
+ #### 步骤 3:切换到智能体模式
358
+
359
+ 在对话窗口左下角中切换到智能体模式,这样可以智能生成项目
360
+
361
+
362
+ </details>
363
+
364
+ <details>
365
+ <summary><strong>🤖 RooCode 配置</strong></summary>
366
+
367
+ #### 步骤1:自动应用 AI 规则
368
+
369
+ 模板中已包含 `.roo/rules` 目录,RooCode 会自动识别云开发最佳实践
370
+
371
+ #### 步骤2:配置 MCP
372
+
373
+ **配置云开发 MCP Server**
374
+
375
+ 点击 RooCode 右上角的设置图标,选择 MCP 配置,在打开的文件中修改 MCP 配置
376
+
377
+ 其中 CLOUDBASE_ENV_ID 填写你的云开发环境 ID
378
+
379
+ ```json
380
+ {
381
+ "mcpServers": {
382
+ "cloudbase": {
383
+ "command": "npx",
384
+ "args": [
385
+ "@cloudbase/cloudbase-mcp@latest"
386
+ ],
387
+ "env": {
388
+ "CLOUDBASE_ENV_ID": "你的云开发环境ID"
389
+ },
390
+ "disabled": false
391
+ }
392
+ }
393
+ }
394
+ ```
193
395
 
194
- 使用模板中的 `.trae/rules/` 配置。
396
+ #### 步骤3:使用 AI 对话
397
+
398
+ 在对话窗口中使用 AI 进行代码生成和自动化操作
195
399
 
196
400
  </details>
197
401
 
198
402
  ### 3. 开始开发
199
403
 
200
- AI 描述你的需求:
404
+ 确认 AI 已经连接到云开发
405
+
406
+ ```
407
+ 查询当前云开发环境信息
408
+ ```
409
+
410
+ 向 AI 描述你的需求,进行开发:
201
411
 
202
412
  ```
203
- 做一个双人在线对战五子棋网站,支持联机对战
413
+ 做一个双人在线对战五子棋网站,支持联机对战,最后进行部署
204
414
  ```
205
415
 
206
416
  AI 会自动:
@@ -208,6 +418,21 @@ AI 会自动:
208
418
  - 🚀 部署到云开发
209
419
  - 🔗 返回在线访问链接
210
420
 
421
+ 开发过程中如果遇到报错,可以把错误信息发给 AI 来进行排障
422
+
423
+ ```
424
+ 报错了,错误是xxxx
425
+ ```
426
+
427
+
428
+ 也可以让 AI 结合云函数日志进行调试和修改代码
429
+
430
+ ```
431
+ 云函数代码运行不符合需求,需求是 xxx,请查看日志和数据进行调试,并进行修复
432
+ ```
433
+
434
+
435
+
211
436
  ## 🎯 使用案例
212
437
 
213
438
  ### 案例1:双人在线对战五子棋
@@ -280,6 +505,49 @@ AI 会自动:
280
505
 
281
506
  ---
282
507
 
508
+ ## 🛠️ 云开发 MCP 工具一览
509
+
510
+ | 工具名称 | 功能简介 |
511
+ |----------|----------|
512
+ | logout | 登出当前云开发账户 |
513
+ | listEnvs | 获取所有云开发环境信息 |
514
+ | getEnvAuthDomains | 获取云开发环境的合法域名列表 |
515
+ | createEnvDomain | 为云开发环境添加安全域名 |
516
+ | deleteEnvDomain | 删除云开发环境的指定安全域名 |
517
+ | getEnvInfo | 获取当前云开发环境信息 |
518
+ | updateEnvInfo | 修改云开发环境别名 |
519
+ | createCollection | 创建一个新的云开发数据库集合 |
520
+ | checkCollectionExists | 检查云开发数据库集合是否存在 |
521
+ | updateCollection | 更新云开发数据库集合配置(创建或删除索引) |
522
+ | describeCollection | 获取云开发数据库集合的详细信息 |
523
+ | listCollections | 获取云开发数据库集合列表 |
524
+ | checkIndexExists | 检查索引是否存在 |
525
+ | distribution | 查询数据库中集合的数据分布情况 |
526
+ | insertDocuments | 向集合中插入文档 |
527
+ | queryDocuments | 查询集合中的文档 |
528
+ | updateDocuments | 更新集合中的文档 |
529
+ | deleteDocuments | 删除集合中的文档 |
530
+ | uploadFiles | 上传文件到静态网站托管 |
531
+ | listFiles | 获取静态网站托管的文件列表 |
532
+ | deleteFiles | 删除静态网站托管的文件或文件夹 |
533
+ | findFiles | 搜索静态网站托管的文件 |
534
+ | createHostingDomain | 绑定自定义域名 |
535
+ | deleteHostingDomain | 解绑自定义域名 |
536
+ | getWebsiteConfig | 获取静态网站配置 |
537
+ | tcbCheckResource | 获取域名配置 |
538
+ | tcbModifyAttribute | 修改域名配置 |
539
+ | getFunctionList | 获取云函数列表 |
540
+ | createFunction | 创建云函数 |
541
+ | updateFunctionCode | 更新云函数代码 |
542
+ | updateFunctionConfig | 更新云函数配置 |
543
+ | getFunctionDetail | 获取云函数详情 |
544
+ | invokeFunction | 调用云函数 |
545
+ | getFunctionLogs | 获取云函数日志 |
546
+ | createFunctionTriggers | 创建云函数触发器 |
547
+ | deleteFunctionTrigger | 删除云函数触发器 |
548
+ | downloadRemoteFile | 下载远程文件到本地临时文件 |
549
+ | uploadFile | 上传文件到云存储(适合存储业务数据文件) |
550
+ | search_knowledge_base | 智能检索云开发知识库(支持云开发与云函数),通过向量搜索快速获取专业文档与答案。|
283
551
 
284
552
  ## 🏗️ 架构原理
285
553
 
@@ -337,17 +605,9 @@ graph TD
337
605
  - **问题答疑**:腾讯云开发团队成员在线答疑
338
606
  - **新功能预览**:第一时间体验最新功能
339
607
 
340
- > 💡 **提示**:加群时请备注 "CloudBase AI",方便快速通过验证
341
-
342
608
  ## 🤝 贡献指南
343
609
 
344
- 欢迎提交 Issue 和 Pull Request
345
-
346
- 1. Fork 本仓库
347
- 2. 创建你的特性分支 (`git checkout -b feature/AmazingFeature`)
348
- 3. 提交你的改动 (`git commit -m 'Add some AmazingFeature'`)
349
- 4. 推送到分支 (`git push origin feature/AmazingFeature`)
350
- 5. 打开一个 Pull Request
610
+ 欢迎提交 Issue 和 Pull Request!请查看我们的[贡献指南](CONTRIBUTING.md)了解如何参与项目开发。
351
611
 
352
612
  ## 📄 开源协议
353
613
 
@@ -356,3 +616,7 @@ graph TD
356
616
  ---
357
617
 
358
618
  ⭐ 如果这个项目对你有帮助,请给我们一个 Star!
619
+
620
+ ## 📋 [常见问题 FAQ](./FAQ.md)
621
+
622
+ 如有迁移、集成等常见疑问,请查阅 [FAQ 常见问题](./FAQ.md)。
@@ -28,7 +28,7 @@ export function registerFunctionTools(server) {
28
28
  subnetId: z.string()
29
29
  }).optional().describe("私有网络配置"),
30
30
  runtime: z.string().optional().describe("运行时环境"),
31
- installDependency: z.boolean().optional().describe("是否安装依赖"),
31
+ installDependency: z.boolean().optional().describe("是否安装依赖,建议传 true"),
32
32
  triggers: z.array(z.object({
33
33
  name: z.string(),
34
34
  type: z.string(),
@@ -43,17 +43,13 @@ export function registerFunctionTools(server) {
43
43
  })).optional().describe("Layer配置")
44
44
  }).describe("函数配置"),
45
45
  functionRootPath: z.string().optional().describe("函数根目录(云函数目录的父目录),这里需要传操作系统上文件的绝对路径,指定之后可以自动上传这部分的文件作为代码"),
46
- force: z.boolean().describe("是否覆盖"),
47
- base64Code: z.string().optional().describe("base64编码的代码,一般不采用这种方式"),
48
- codeSecret: z.string().optional().describe("代码保护密钥,一般无需配置")
49
- }, async ({ func, functionRootPath, force, base64Code, codeSecret }) => {
46
+ force: z.boolean().describe("是否覆盖")
47
+ }, async ({ func, functionRootPath, force }) => {
50
48
  const cloudbase = await getCloudBaseManager();
51
49
  const result = await cloudbase.functions.createFunction({
52
50
  func,
53
51
  functionRootPath,
54
- force,
55
- base64Code,
56
- codeSecret
52
+ force
57
53
  });
58
54
  return {
59
55
  content: [
@@ -69,16 +65,15 @@ export function registerFunctionTools(server) {
69
65
  func: z.object({
70
66
  name: z.string().describe("函数名称")
71
67
  }).describe("函数配置"),
72
- functionRootPath: z.string().optional().describe("函数根目录(云函数目录的父目录),这里需要传操作系统上文件的绝对路径,指定之后可以自动上传这部分的文件作为代码"),
73
- base64Code: z.string().optional().describe("base64编码的代码,这种方式也可以更新代码,不推荐使用"),
74
- codeSecret: z.string().optional().describe("代码保护密钥,一般无需配置")
75
- }, async ({ func, functionRootPath, base64Code, codeSecret }) => {
68
+ functionRootPath: z.string().optional().describe("函数根目录(云函数目录的父目录),这里需要传操作系统上文件的绝对路径,指定之后可以自动上传这部分的文件作为代码")
69
+ }, async ({ func, functionRootPath }) => {
76
70
  const cloudbase = await getCloudBaseManager();
77
71
  const result = await cloudbase.functions.updateFunctionCode({
78
- func,
72
+ func: {
73
+ ...func,
74
+ installDependency: true // 默认安装依赖
75
+ },
79
76
  functionRootPath,
80
- base64Code,
81
- codeSecret
82
77
  });
83
78
  return {
84
79
  content: [
package/package.json CHANGED
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "name": "@cloudbase/cloudbase-mcp",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "腾讯云开发 MCP Server,支持静态托管/环境查询/",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "bin": {
8
8
  "cloudbase-mcp": "./dist/index.js"
9
9
  },
10
+ "homepage": "https://github.com/TencentCloudBase/CloudBase-AI-ToolKit",
11
+ "bugs": {
12
+ "url": "https://github.com/TencentCloudBase/CloudBase-AI-ToolKit/issues",
13
+ "email": "bookerzhao@tencent.com"
14
+ },
10
15
  "scripts": {
11
16
  "clean": "rm -rf dist",
12
17
  "prebuild": "npm run clean",