@cloudbase/cloudbase-mcp 2.0.5 → 2.0.6

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
@@ -29,7 +29,7 @@
29
29
 
30
30
  <sup>从 AI 提示词到应用上线的最短路径</sup>
31
31
 
32
- [![][github-trending-shield]][github-trending-url]
32
+ [![][github-trending-shield]](https://github.com/TencentCloudBase/CloudBase-AI-ToolKit)
33
33
 
34
34
  [<img width="791" height="592" alt="Clipboard_Screenshot_1763724670" src="https://github.com/user-attachments/assets/f769beb7-5710-4397-8854-af2b7e452f70" />](https://docs.cloudbase.net/ai/cloudbase-ai-toolkit/tutorials)
35
35
 
@@ -85,10 +85,6 @@ AI 编程工具(如 Cursor、Copilot)解决了**代码生成**的难题。
85
85
  > 一键安装,自动配置,支持多种 AI 编程工具:
86
86
  >
87
87
  > ```bash
88
- > # Mac/Linux/WSL
89
- > curl https://static.cloudbase.net/cli/install/install.sh -fsS | bash
90
- >
91
- > # Windows PowerShell
92
88
  > npm install @cloudbase/cli@latest -g
93
89
  > ```
94
90
  >
package/dist/cli.cjs CHANGED
@@ -134865,7 +134865,7 @@ class TelemetryReporter {
134865
134865
  const nodeVersion = process.version; // Node.js版本
134866
134866
  const arch = os_1.default.arch(); // 系统架构
134867
134867
  // 从构建时注入的版本号获取MCP版本信息
134868
- const mcpVersion = process.env.npm_package_version || "2.0.5" || 0;
134868
+ const mcpVersion = process.env.npm_package_version || "2.0.6" || 0;
134869
134869
  return {
134870
134870
  userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
134871
134871
  deviceId: this.deviceId,
@@ -200510,7 +200510,7 @@ ${envIdSection}
200510
200510
  ## 环境信息
200511
200511
  - 操作系统: ${os_1.default.type()} ${os_1.default.release()}
200512
200512
  - Node.js版本: ${process.version}
200513
- - MCP 版本:${process.env.npm_package_version || "2.0.5" || 0}
200513
+ - MCP 版本:${process.env.npm_package_version || "2.0.6" || 0}
200514
200514
  - 系统架构: ${os_1.default.arch()}
200515
200515
  - 时间: ${new Date().toISOString()}
200516
200516
  - 请求ID: ${requestId}
@@ -208791,12 +208791,15 @@ deleteCollection: 删除数据`),
208791
208791
  collectionName: zod_1.z.string().describe("集合名称"),
208792
208792
  documents: zod_1.z
208793
208793
  .array(zod_1.z.object({}).passthrough())
208794
+ .optional()
208794
208795
  .describe("要插入的文档对象数组,每个文档都是对象(insert 操作必填)"),
208795
208796
  query: zod_1.z
208796
208797
  .union([zod_1.z.object({}).passthrough(), zod_1.z.string()])
208798
+ .optional()
208797
208799
  .describe("查询条件(对象或字符串,推荐对象)(update/delete 操作必填)"),
208798
208800
  update: zod_1.z
208799
208801
  .union([zod_1.z.object({}).passthrough(), zod_1.z.string()])
208802
+ .optional()
208800
208803
  .describe("更新内容(对象或字符串,推荐对象)(update 操作必填)"),
208801
208804
  isMulti: zod_1.z
208802
208805
  .boolean()
@@ -208816,6 +208819,9 @@ deleteCollection: 删除数据`),
208816
208819
  },
208817
208820
  }, async ({ action, collectionName, documents, query, update, isMulti, upsert, }) => {
208818
208821
  if (action === "insert") {
208822
+ if (!documents) {
208823
+ throw new Error("insert 操作时必须提供 documents");
208824
+ }
208819
208825
  const text = await insertDocuments({
208820
208826
  collectionName,
208821
208827
  documents,
@@ -208831,6 +208837,12 @@ deleteCollection: 删除数据`),
208831
208837
  };
208832
208838
  }
208833
208839
  if (action === "update") {
208840
+ if (!query) {
208841
+ throw new Error("update 操作时必须提供 query");
208842
+ }
208843
+ if (!update) {
208844
+ throw new Error("update 操作时必须提供 update");
208845
+ }
208834
208846
  const text = await updateDocuments({
208835
208847
  collectionName,
208836
208848
  query,
@@ -208849,6 +208861,9 @@ deleteCollection: 删除数据`),
208849
208861
  };
208850
208862
  }
208851
208863
  if (action === "delete") {
208864
+ if (!query) {
208865
+ throw new Error("delete 操作时必须提供 query");
208866
+ }
208852
208867
  const text = await deleteDocuments({
208853
208868
  collectionName,
208854
208869
  query,
@@ -215087,7 +215102,7 @@ function registerSetupTools(server) {
215087
215102
  title: "下载项目模板",
215088
215103
  description: `自动下载并部署CloudBase项目模板。⚠️ **MANDATORY FOR NEW PROJECTS** ⚠️
215089
215104
 
215090
- **CRITICAL**: This tool MUST be called FIRST when starting a new project.\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置(默认)\n- cursor: Cursor AI编辑器\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- vscode: Visual Studio Code\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.0.5" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
215105
+ **CRITICAL**: This tool MUST be called FIRST when starting a new project.\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置(默认)\n- cursor: Cursor AI编辑器\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- vscode: Visual Studio Code\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.0.6" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
215091
215106
  inputSchema: {
215092
215107
  template: zod_1.z.enum(["react", "vue", "miniprogram", "uniapp", "rules"]).describe("要下载的模板类型"),
215093
215108
  ide: zod_1.z.enum(IDE_TYPES).optional().default("all").describe("指定要下载的IDE类型,默认为all(下载所有IDE配置)"),
package/dist/index.cjs CHANGED
@@ -134714,7 +134714,7 @@ class TelemetryReporter {
134714
134714
  const nodeVersion = process.version; // Node.js版本
134715
134715
  const arch = os_1.default.arch(); // 系统架构
134716
134716
  // 从构建时注入的版本号获取MCP版本信息
134717
- const mcpVersion = process.env.npm_package_version || "2.0.5" || 0;
134717
+ const mcpVersion = process.env.npm_package_version || "2.0.6" || 0;
134718
134718
  return {
134719
134719
  userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
134720
134720
  deviceId: this.deviceId,
@@ -200359,7 +200359,7 @@ ${envIdSection}
200359
200359
  ## 环境信息
200360
200360
  - 操作系统: ${os_1.default.type()} ${os_1.default.release()}
200361
200361
  - Node.js版本: ${process.version}
200362
- - MCP 版本:${process.env.npm_package_version || "2.0.5" || 0}
200362
+ - MCP 版本:${process.env.npm_package_version || "2.0.6" || 0}
200363
200363
  - 系统架构: ${os_1.default.arch()}
200364
200364
  - 时间: ${new Date().toISOString()}
200365
200365
  - 请求ID: ${requestId}
@@ -208640,12 +208640,15 @@ deleteCollection: 删除数据`),
208640
208640
  collectionName: zod_1.z.string().describe("集合名称"),
208641
208641
  documents: zod_1.z
208642
208642
  .array(zod_1.z.object({}).passthrough())
208643
+ .optional()
208643
208644
  .describe("要插入的文档对象数组,每个文档都是对象(insert 操作必填)"),
208644
208645
  query: zod_1.z
208645
208646
  .union([zod_1.z.object({}).passthrough(), zod_1.z.string()])
208647
+ .optional()
208646
208648
  .describe("查询条件(对象或字符串,推荐对象)(update/delete 操作必填)"),
208647
208649
  update: zod_1.z
208648
208650
  .union([zod_1.z.object({}).passthrough(), zod_1.z.string()])
208651
+ .optional()
208649
208652
  .describe("更新内容(对象或字符串,推荐对象)(update 操作必填)"),
208650
208653
  isMulti: zod_1.z
208651
208654
  .boolean()
@@ -208665,6 +208668,9 @@ deleteCollection: 删除数据`),
208665
208668
  },
208666
208669
  }, async ({ action, collectionName, documents, query, update, isMulti, upsert, }) => {
208667
208670
  if (action === "insert") {
208671
+ if (!documents) {
208672
+ throw new Error("insert 操作时必须提供 documents");
208673
+ }
208668
208674
  const text = await insertDocuments({
208669
208675
  collectionName,
208670
208676
  documents,
@@ -208680,6 +208686,12 @@ deleteCollection: 删除数据`),
208680
208686
  };
208681
208687
  }
208682
208688
  if (action === "update") {
208689
+ if (!query) {
208690
+ throw new Error("update 操作时必须提供 query");
208691
+ }
208692
+ if (!update) {
208693
+ throw new Error("update 操作时必须提供 update");
208694
+ }
208683
208695
  const text = await updateDocuments({
208684
208696
  collectionName,
208685
208697
  query,
@@ -208698,6 +208710,9 @@ deleteCollection: 删除数据`),
208698
208710
  };
208699
208711
  }
208700
208712
  if (action === "delete") {
208713
+ if (!query) {
208714
+ throw new Error("delete 操作时必须提供 query");
208715
+ }
208701
208716
  const text = await deleteDocuments({
208702
208717
  collectionName,
208703
208718
  query,
@@ -214936,7 +214951,7 @@ function registerSetupTools(server) {
214936
214951
  title: "下载项目模板",
214937
214952
  description: `自动下载并部署CloudBase项目模板。⚠️ **MANDATORY FOR NEW PROJECTS** ⚠️
214938
214953
 
214939
- **CRITICAL**: This tool MUST be called FIRST when starting a new project.\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置(默认)\n- cursor: Cursor AI编辑器\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- vscode: Visual Studio Code\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.0.5" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
214954
+ **CRITICAL**: This tool MUST be called FIRST when starting a new project.\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置(默认)\n- cursor: Cursor AI编辑器\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- vscode: Visual Studio Code\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.0.6" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
214940
214955
  inputSchema: {
214941
214956
  template: zod_1.z.enum(["react", "vue", "miniprogram", "uniapp", "rules"]).describe("要下载的模板类型"),
214942
214957
  ide: zod_1.z.enum(IDE_TYPES).optional().default("all").describe("指定要下载的IDE类型,默认为all(下载所有IDE配置)"),
package/dist/index.js CHANGED
@@ -6021,7 +6021,7 @@ ${envIdSection}
6021
6021
  ## 环境信息
6022
6022
  - 操作系统: ${os_1.default.type()} ${os_1.default.release()}
6023
6023
  - Node.js版本: ${process.version}
6024
- - MCP 版本:${process.env.npm_package_version || "2.0.5" || 0}
6024
+ - MCP 版本:${process.env.npm_package_version || "2.0.6" || 0}
6025
6025
  - 系统架构: ${os_1.default.arch()}
6026
6026
  - 时间: ${new Date().toISOString()}
6027
6027
  - 请求ID: ${requestId}
@@ -7211,7 +7211,7 @@ function registerSetupTools(server) {
7211
7211
  title: "下载项目模板",
7212
7212
  description: `自动下载并部署CloudBase项目模板。⚠️ **MANDATORY FOR NEW PROJECTS** ⚠️
7213
7213
 
7214
- **CRITICAL**: This tool MUST be called FIRST when starting a new project.\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置(默认)\n- cursor: Cursor AI编辑器\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- vscode: Visual Studio Code\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.0.5" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
7214
+ **CRITICAL**: This tool MUST be called FIRST when starting a new project.\n\n支持的模板:\n- react: React + CloudBase 全栈应用模板\n- vue: Vue + CloudBase 全栈应用模板\n- miniprogram: 微信小程序 + 云开发模板 \n- uniapp: UniApp + CloudBase 跨端应用模板\n- rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置\n\n支持的IDE类型:\n- all: 下载所有IDE配置(默认)\n- cursor: Cursor AI编辑器\n- windsurf: WindSurf AI编辑器\n- codebuddy: CodeBuddy AI编辑器\n- claude-code: Claude Code AI编辑器\n- cline: Cline AI编辑器\n- gemini-cli: Gemini CLI\n- opencode: OpenCode AI编辑器\n- qwen-code: 通义灵码\n- baidu-comate: 百度Comate\n- openai-codex-cli: OpenAI Codex CLI\n- augment-code: Augment Code\n- github-copilot: GitHub Copilot\n- roocode: RooCode AI编辑器\n- tongyi-lingma: 通义灵码\n- trae: Trae AI编辑器\n- vscode: Visual Studio Code\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.0.6" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
7215
7215
  inputSchema: {
7216
7216
  template: zod_1.z.enum(["react", "vue", "miniprogram", "uniapp", "rules"]).describe("要下载的模板类型"),
7217
7217
  ide: zod_1.z.enum(IDE_TYPES).optional().default("all").describe("指定要下载的IDE类型,默认为all(下载所有IDE配置)"),
@@ -8253,7 +8253,7 @@ class TelemetryReporter {
8253
8253
  const nodeVersion = process.version; // Node.js版本
8254
8254
  const arch = os_1.default.arch(); // 系统架构
8255
8255
  // 从构建时注入的版本号获取MCP版本信息
8256
- const mcpVersion = process.env.npm_package_version || "2.0.5" || 0;
8256
+ const mcpVersion = process.env.npm_package_version || "2.0.6" || 0;
8257
8257
  return {
8258
8258
  userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
8259
8259
  deviceId: this.deviceId,
@@ -8844,12 +8844,15 @@ deleteCollection: 删除数据`),
8844
8844
  collectionName: zod_1.z.string().describe("集合名称"),
8845
8845
  documents: zod_1.z
8846
8846
  .array(zod_1.z.object({}).passthrough())
8847
+ .optional()
8847
8848
  .describe("要插入的文档对象数组,每个文档都是对象(insert 操作必填)"),
8848
8849
  query: zod_1.z
8849
8850
  .union([zod_1.z.object({}).passthrough(), zod_1.z.string()])
8851
+ .optional()
8850
8852
  .describe("查询条件(对象或字符串,推荐对象)(update/delete 操作必填)"),
8851
8853
  update: zod_1.z
8852
8854
  .union([zod_1.z.object({}).passthrough(), zod_1.z.string()])
8855
+ .optional()
8853
8856
  .describe("更新内容(对象或字符串,推荐对象)(update 操作必填)"),
8854
8857
  isMulti: zod_1.z
8855
8858
  .boolean()
@@ -8869,6 +8872,9 @@ deleteCollection: 删除数据`),
8869
8872
  },
8870
8873
  }, async ({ action, collectionName, documents, query, update, isMulti, upsert, }) => {
8871
8874
  if (action === "insert") {
8875
+ if (!documents) {
8876
+ throw new Error("insert 操作时必须提供 documents");
8877
+ }
8872
8878
  const text = await insertDocuments({
8873
8879
  collectionName,
8874
8880
  documents,
@@ -8884,6 +8890,12 @@ deleteCollection: 删除数据`),
8884
8890
  };
8885
8891
  }
8886
8892
  if (action === "update") {
8893
+ if (!query) {
8894
+ throw new Error("update 操作时必须提供 query");
8895
+ }
8896
+ if (!update) {
8897
+ throw new Error("update 操作时必须提供 update");
8898
+ }
8887
8899
  const text = await updateDocuments({
8888
8900
  collectionName,
8889
8901
  query,
@@ -8902,6 +8914,9 @@ deleteCollection: 删除数据`),
8902
8914
  };
8903
8915
  }
8904
8916
  if (action === "delete") {
8917
+ if (!query) {
8918
+ throw new Error("delete 操作时必须提供 query");
8919
+ }
8905
8920
  const text = await deleteDocuments({
8906
8921
  collectionName,
8907
8922
  query,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cloudbase-mcp",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "腾讯云开发 MCP Server,通过AI提示词和MCP协议+云开发,让开发更智能、更高效,当你在Cursor/ VSCode GitHub Copilot/WinSurf/CodeBuddy/Augment Code/Claude Code等AI编程工具里写代码时,它能自动帮你生成可直接部署的前后端应用+小程序,并一键发布到腾讯云开发 CloudBase。",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",