@cloudbase/cloudbase-mcp 2.25.7 → 2.25.9

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/dist/index.cjs CHANGED
@@ -139372,7 +139372,7 @@ class TelemetryReporter {
139372
139372
  const nodeVersion = process.version; // Node.js版本
139373
139373
  const arch = os_1.default.arch(); // 系统架构
139374
139374
  // 从构建时注入的版本号获取MCP版本信息
139375
- const mcpVersion = process.env.npm_package_version || "2.25.7" || 0;
139375
+ const mcpVersion = process.env.npm_package_version || "2.25.9" || 0;
139376
139376
  return {
139377
139377
  userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
139378
139378
  deviceId: this.deviceId,
@@ -202226,6 +202226,7 @@ async function registerRagTools(server) {
202226
202226
  强烈推荐始终优先使用固定技能文档 (skill)、OpenAPI 文档 (openapi) 或 CloudBase 官方文档 (docs) 模式进行检索,仅当固定文档无法覆盖你的问题时,再使用向量查询 (vector) 模式。
202227
202227
 
202228
202228
  ⚠️ 重要:当 CloudBase skills 处于禁用状态或当前 IDE 不支持 skill 文件读取时,必须使用 searchKnowledgeBase(mode=skill, skillName=...) 来获取 CloudBase 技能文档内容,而不是尝试直接读取 skill 文件。直接读取可能返回 400 错误。示例:
202229
+ - 需要最小 Web+数据库 Demo 路径时:searchKnowledgeBase(mode=skill, skillName=minimal-web-baas-demo)
202229
202230
  - 需要 auth-tool 指南时:searchKnowledgeBase(mode=skill, skillName=auth-tool)
202230
202231
  - 需要 auth-web 指南时:searchKnowledgeBase(mode=skill, skillName=auth-web)
202231
202232
  - 需要 cloudbase-agent 指南时:searchKnowledgeBase(mode=skill, skillName=cloudbase-agent)
@@ -215267,7 +215268,7 @@ ${envIdSection}
215267
215268
  ## 环境信息
215268
215269
  - 操作系统: ${os_1.default.type()} ${os_1.default.release()}
215269
215270
  - Node.js版本: ${process.version}
215270
- - MCP 版本:${process.env.npm_package_version || "2.25.7" || 0}
215271
+ - MCP 版本:${process.env.npm_package_version || "2.25.9" || 0}
215271
215272
  - 系统架构: ${os_1.default.arch()}
215272
215273
  - 时间: ${new Date().toISOString()}
215273
215274
  - 请求ID: ${requestId}
@@ -215348,7 +215349,7 @@ function createWrappedHandler(name, handler, server) {
215348
215349
  requestId: (typeof error === 'object' && error && 'requestId' in error) ? error.requestId : '',
215349
215350
  ide: server.ide || process.env.INTEGRATION_IDE || ''
215350
215351
  });
215351
- const mcpVersion = true ? "2.25.7" : 0;
215352
+ const mcpVersion = true ? "2.25.9" : 0;
215352
215353
  const requestIdSuffix = requestId ? `\n🆔 RequestId: ${requestId}` : '';
215353
215354
  const enhancedErrorMessage = `${errorMessage}${requestIdSuffix}\n\n📦 CloudBase MCP v${mcpVersion}\n🔗 遇到问题?请复制以下链接到浏览器打开\n即可自动携带错误详情快速创建 GitHub Issue:\n${issueLink}`;
215354
215355
  // 创建新的错误对象,保持原有的错误类型但更新消息
@@ -232232,7 +232233,7 @@ function registerSetupTools(server) {
232232
232233
  server.registerTool("downloadTemplate", {
232233
232234
  title: "下载项目模板",
232234
232235
  description: `自动下载并部署CloudBase项目模板。
232235
- **Note**: Call this tool when the user requests to create a new project using a CloudBase template.\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- 其他IDE类型见下方列表\n\n注意:如果未传入 ide 参数且无法从环境变量检测到 IDE,将提示错误并要求传入 ide 参数\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- qoder: Qoder AI编辑器\n- antigravity: Google Antigravity AI编辑器\n- vscode: Visual Studio Code\n- kiro: Kiro AI编辑器\n- aider: Aider AI编辑器\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.25.7" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
232236
+ **Note**: Call this tool when the user requests to create a new project using a CloudBase template.\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- 其他IDE类型见下方列表\n\n注意:如果未传入 ide 参数且无法从环境变量检测到 IDE,将提示错误并要求传入 ide 参数\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- qoder: Qoder AI编辑器\n- antigravity: Google Antigravity AI编辑器\n- vscode: Visual Studio Code\n- kiro: Kiro AI编辑器\n- aider: Aider AI编辑器\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.25.9" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
232236
232237
  inputSchema: {
232237
232238
  template: zod_1.z
232238
232239
  .enum(["react", "vue", "miniprogram", "uniapp", "rules"])
@@ -259387,7 +259388,7 @@ module.exports = {
259387
259388
  /***/ }),
259388
259389
 
259389
259390
  /***/ 89684:
259390
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
259391
+ /***/ ((__unused_webpack_module, exports) => {
259391
259392
 
259392
259393
  "use strict";
259393
259394
 
@@ -259396,13 +259397,16 @@ exports.isCloudMode = isCloudMode;
259396
259397
  exports.enableCloudMode = enableCloudMode;
259397
259398
  exports.getCloudModeStatus = getCloudModeStatus;
259398
259399
  exports.shouldRegisterTool = shouldRegisterTool;
259399
- const logger_js_1 = __webpack_require__(13039);
259400
259400
  /**
259401
259401
  * Check if MCP is running in cloud mode
259402
259402
  * Cloud mode is enabled by:
259403
259403
  * 1. Command line argument --cloud-mode
259404
259404
  * 2. Environment variable CLOUDBASE_MCP_CLOUD_MODE=true
259405
259405
  * 3. Environment variable MCP_CLOUD_MODE=true
259406
+ *
259407
+ * Intentionally does not import logger: logger.ts calls isCloudMode() during
259408
+ * module init, so importing logger here creates a circular dependency that
259409
+ * crashes `node dist/cli.cjs --cloud-mode` with `debug is not a function`.
259406
259410
  */
259407
259411
  function isCloudMode() {
259408
259412
  // Check for CLI argument first
@@ -259410,21 +259414,13 @@ function isCloudMode() {
259410
259414
  // Check environment variables
259411
259415
  const cloudModeEnabled = process.env.CLOUDBASE_MCP_CLOUD_MODE === 'true' ||
259412
259416
  process.env.MCP_CLOUD_MODE === 'true';
259413
- const isEnabled = hasCloudModeArg || cloudModeEnabled;
259414
- if (isEnabled) {
259415
- (0, logger_js_1.debug)('Cloud mode is enabled', {
259416
- source: hasCloudModeArg ? 'CLI_ARG' : 'ENV_VAR',
259417
- envVar: process.env.CLOUDBASE_MCP_CLOUD_MODE || process.env.MCP_CLOUD_MODE
259418
- });
259419
- }
259420
- return isEnabled;
259417
+ return hasCloudModeArg || cloudModeEnabled;
259421
259418
  }
259422
259419
  /**
259423
259420
  * Enable cloud mode by setting environment variable
259424
259421
  */
259425
259422
  function enableCloudMode() {
259426
259423
  process.env.CLOUDBASE_MCP_CLOUD_MODE = 'true';
259427
- (0, logger_js_1.debug)('Cloud mode enabled via API call');
259428
259424
  }
259429
259425
  /**
259430
259426
  * Get cloud mode status for logging/debugging
@@ -259472,11 +259468,7 @@ function shouldRegisterTool(toolName) {
259472
259468
  // Download tools - local file downloads
259473
259469
  'manageStorage',
259474
259470
  ];
259475
- const shouldRegister = !cloudIncompatibleTools.includes(toolName);
259476
- if (!shouldRegister) {
259477
- (0, logger_js_1.debug)(`Cloud mode: skipping registration of incompatible tool: ${toolName}`);
259478
- }
259479
- return shouldRegister;
259471
+ return !cloudIncompatibleTools.includes(toolName);
259480
259472
  }
259481
259473
 
259482
259474
 
package/dist/index.d.ts CHANGED
@@ -302,6 +302,10 @@ declare class InteractiveServer {
302
302
  * 1. Command line argument --cloud-mode
303
303
  * 2. Environment variable CLOUDBASE_MCP_CLOUD_MODE=true
304
304
  * 3. Environment variable MCP_CLOUD_MODE=true
305
+ *
306
+ * Intentionally does not import logger: logger.ts calls isCloudMode() during
307
+ * module init, so importing logger here creates a circular dependency that
308
+ * crashes `node dist/cli.cjs --cloud-mode` with `debug is not a function`.
305
309
  */
306
310
  export declare function isCloudMode(): boolean;
307
311
 
package/dist/index.js CHANGED
@@ -2772,7 +2772,7 @@ ${envIdSection}
2772
2772
  ## 环境信息
2773
2773
  - 操作系统: ${os_1.default.type()} ${os_1.default.release()}
2774
2774
  - Node.js版本: ${process.version}
2775
- - MCP 版本:${process.env.npm_package_version || "2.25.7" || 0}
2775
+ - MCP 版本:${process.env.npm_package_version || "2.25.9" || 0}
2776
2776
  - 系统架构: ${os_1.default.arch()}
2777
2777
  - 时间: ${new Date().toISOString()}
2778
2778
  - 请求ID: ${requestId}
@@ -2853,7 +2853,7 @@ function createWrappedHandler(name, handler, server) {
2853
2853
  requestId: (typeof error === 'object' && error && 'requestId' in error) ? error.requestId : '',
2854
2854
  ide: server.ide || process.env.INTEGRATION_IDE || ''
2855
2855
  });
2856
- const mcpVersion = true ? "2.25.7" : 0;
2856
+ const mcpVersion = true ? "2.25.9" : 0;
2857
2857
  const requestIdSuffix = requestId ? `\n🆔 RequestId: ${requestId}` : '';
2858
2858
  const enhancedErrorMessage = `${errorMessage}${requestIdSuffix}\n\n📦 CloudBase MCP v${mcpVersion}\n🔗 遇到问题?请复制以下链接到浏览器打开\n即可自动携带错误详情快速创建 GitHub Issue:\n${issueLink}`;
2859
2859
  // 创建新的错误对象,保持原有的错误类型但更新消息
@@ -7576,6 +7576,7 @@ async function registerRagTools(server) {
7576
7576
  强烈推荐始终优先使用固定技能文档 (skill)、OpenAPI 文档 (openapi) 或 CloudBase 官方文档 (docs) 模式进行检索,仅当固定文档无法覆盖你的问题时,再使用向量查询 (vector) 模式。
7577
7577
 
7578
7578
  ⚠️ 重要:当 CloudBase skills 处于禁用状态或当前 IDE 不支持 skill 文件读取时,必须使用 searchKnowledgeBase(mode=skill, skillName=...) 来获取 CloudBase 技能文档内容,而不是尝试直接读取 skill 文件。直接读取可能返回 400 错误。示例:
7579
+ - 需要最小 Web+数据库 Demo 路径时:searchKnowledgeBase(mode=skill, skillName=minimal-web-baas-demo)
7579
7580
  - 需要 auth-tool 指南时:searchKnowledgeBase(mode=skill, skillName=auth-tool)
7580
7581
  - 需要 auth-web 指南时:searchKnowledgeBase(mode=skill, skillName=auth-web)
7581
7582
  - 需要 cloudbase-agent 指南时:searchKnowledgeBase(mode=skill, skillName=cloudbase-agent)
@@ -11208,7 +11209,7 @@ class TelemetryReporter {
11208
11209
  const nodeVersion = process.version; // Node.js版本
11209
11210
  const arch = os_1.default.arch(); // 系统架构
11210
11211
  // 从构建时注入的版本号获取MCP版本信息
11211
- const mcpVersion = process.env.npm_package_version || "2.25.7" || 0;
11212
+ const mcpVersion = process.env.npm_package_version || "2.25.9" || 0;
11212
11213
  return {
11213
11214
  userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
11214
11215
  deviceId: this.deviceId,
@@ -16743,7 +16744,7 @@ function registerSetupTools(server) {
16743
16744
  server.registerTool("downloadTemplate", {
16744
16745
  title: "下载项目模板",
16745
16746
  description: `自动下载并部署CloudBase项目模板。
16746
- **Note**: Call this tool when the user requests to create a new project using a CloudBase template.\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- 其他IDE类型见下方列表\n\n注意:如果未传入 ide 参数且无法从环境变量检测到 IDE,将提示错误并要求传入 ide 参数\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- qoder: Qoder AI编辑器\n- antigravity: Google Antigravity AI编辑器\n- vscode: Visual Studio Code\n- kiro: Kiro AI编辑器\n- aider: Aider AI编辑器\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.25.7" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
16747
+ **Note**: Call this tool when the user requests to create a new project using a CloudBase template.\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- 其他IDE类型见下方列表\n\n注意:如果未传入 ide 参数且无法从环境变量检测到 IDE,将提示错误并要求传入 ide 参数\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- qoder: Qoder AI编辑器\n- antigravity: Google Antigravity AI编辑器\n- vscode: Visual Studio Code\n- kiro: Kiro AI编辑器\n- aider: Aider AI编辑器\n\n特别说明:\n- rules 模板会自动包含当前 mcp 版本号信息(版本号:${ true ? "2.25.9" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
16747
16748
  inputSchema: {
16748
16749
  template: zod_1.z
16749
16750
  .enum(["react", "vue", "miniprogram", "uniapp", "rules"])
@@ -20473,7 +20474,7 @@ function registerAgentTools(server) {
20473
20474
  /***/ }),
20474
20475
 
20475
20476
  /***/ 9684:
20476
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
20477
+ /***/ ((__unused_webpack_module, exports) => {
20477
20478
 
20478
20479
 
20479
20480
  Object.defineProperty(exports, "__esModule", ({ value: true }));
@@ -20481,13 +20482,16 @@ exports.isCloudMode = isCloudMode;
20481
20482
  exports.enableCloudMode = enableCloudMode;
20482
20483
  exports.getCloudModeStatus = getCloudModeStatus;
20483
20484
  exports.shouldRegisterTool = shouldRegisterTool;
20484
- const logger_js_1 = __webpack_require__(3039);
20485
20485
  /**
20486
20486
  * Check if MCP is running in cloud mode
20487
20487
  * Cloud mode is enabled by:
20488
20488
  * 1. Command line argument --cloud-mode
20489
20489
  * 2. Environment variable CLOUDBASE_MCP_CLOUD_MODE=true
20490
20490
  * 3. Environment variable MCP_CLOUD_MODE=true
20491
+ *
20492
+ * Intentionally does not import logger: logger.ts calls isCloudMode() during
20493
+ * module init, so importing logger here creates a circular dependency that
20494
+ * crashes `node dist/cli.cjs --cloud-mode` with `debug is not a function`.
20491
20495
  */
20492
20496
  function isCloudMode() {
20493
20497
  // Check for CLI argument first
@@ -20495,21 +20499,13 @@ function isCloudMode() {
20495
20499
  // Check environment variables
20496
20500
  const cloudModeEnabled = process.env.CLOUDBASE_MCP_CLOUD_MODE === 'true' ||
20497
20501
  process.env.MCP_CLOUD_MODE === 'true';
20498
- const isEnabled = hasCloudModeArg || cloudModeEnabled;
20499
- if (isEnabled) {
20500
- (0, logger_js_1.debug)('Cloud mode is enabled', {
20501
- source: hasCloudModeArg ? 'CLI_ARG' : 'ENV_VAR',
20502
- envVar: process.env.CLOUDBASE_MCP_CLOUD_MODE || process.env.MCP_CLOUD_MODE
20503
- });
20504
- }
20505
- return isEnabled;
20502
+ return hasCloudModeArg || cloudModeEnabled;
20506
20503
  }
20507
20504
  /**
20508
20505
  * Enable cloud mode by setting environment variable
20509
20506
  */
20510
20507
  function enableCloudMode() {
20511
20508
  process.env.CLOUDBASE_MCP_CLOUD_MODE = 'true';
20512
- (0, logger_js_1.debug)('Cloud mode enabled via API call');
20513
20509
  }
20514
20510
  /**
20515
20511
  * Get cloud mode status for logging/debugging
@@ -20557,11 +20553,7 @@ function shouldRegisterTool(toolName) {
20557
20553
  // Download tools - local file downloads
20558
20554
  'manageStorage',
20559
20555
  ];
20560
- const shouldRegister = !cloudIncompatibleTools.includes(toolName);
20561
- if (!shouldRegister) {
20562
- (0, logger_js_1.debug)(`Cloud mode: skipping registration of incompatible tool: ${toolName}`);
20563
- }
20564
- return shouldRegister;
20556
+ return !cloudIncompatibleTools.includes(toolName);
20565
20557
  }
20566
20558
 
20567
20559
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cloudbase-mcp",
3
- "version": "2.25.7",
3
+ "version": "2.25.9",
4
4
  "packageManager": "pnpm@10.8.0",
5
5
  "description": "CloudBase MCP Server — operate Tencent CloudBase (database, auth, functions, storage, hosting) from AI coding tools via the Model Context Protocol. Part of CloudBase AI Toolkit.",
6
6
  "main": "./dist/index.cjs",
@@ -48,6 +48,8 @@
48
48
  "test:watch": "npm run build && vitest",
49
49
  "test:coverage": "npm run build && vitest run --coverage",
50
50
  "test:pg:cloud": "npm run build && node ./scripts/verify-pg-cloud-smoke.mjs",
51
+ "test:cli:cloud-mode": "node ./scripts/verify-cli-cloud-mode-smoke.mjs",
52
+ "test:npm:tarball-smoke": "node ./scripts/verify-npm-tarball-smoke.mjs",
51
53
  "test:inspector": "npm run build && npx @modelcontextprotocol/inspector node ./dist/cli.js",
52
54
  "prepublishOnly": "npm run build && node scripts/prepare-publish.cjs",
53
55
  "postpublish": "node scripts/restore-deps.cjs"