@cloudbase/cloudbase-mcp 2.12.0 → 2.13.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/dist/cli.cjs +2 -2
- package/dist/index.cjs +18 -5
- package/dist/index.js +18 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -35735,7 +35735,7 @@ function registerSecurityRuleTools(server) {
|
|
|
35735
35735
|
.describe("资源类型:noSqlDatabase=noSQL 数据库,sqlDatabase=SQL 数据库,function=云函数,storage=存储桶"),
|
|
35736
35736
|
resourceId: zod_1.z
|
|
35737
35737
|
.string()
|
|
35738
|
-
.describe("资源唯一标识。noSQL 数据库为集合名,SQL
|
|
35738
|
+
.describe("资源唯一标识。noSQL 数据库为集合名,SQL 数据库为表名,云函数为函数名,存储为桶名(完整格式如 '6169-xxx-1257473911',可通过 envQuery action=info 获取 EnvInfo.Storages[].Bucket)。"),
|
|
35739
35739
|
},
|
|
35740
35740
|
annotations: {
|
|
35741
35741
|
readOnlyHint: true,
|
|
@@ -35800,6 +35800,8 @@ function registerSecurityRuleTools(server) {
|
|
|
35800
35800
|
type: "text",
|
|
35801
35801
|
text: JSON.stringify({
|
|
35802
35802
|
success: true,
|
|
35803
|
+
resourceType,
|
|
35804
|
+
resourceId,
|
|
35803
35805
|
aclTag: result.AclTag,
|
|
35804
35806
|
rule: result.Rule ?? null,
|
|
35805
35807
|
raw: result,
|
|
@@ -35819,7 +35821,7 @@ function registerSecurityRuleTools(server) {
|
|
|
35819
35821
|
.describe("资源类型:sqlDatabase=SQL 数据库,noSqlDatabase=noSQL 数据库,function=云函数,storage=存储桶"),
|
|
35820
35822
|
resourceId: zod_1.z
|
|
35821
35823
|
.string()
|
|
35822
|
-
.describe("资源唯一标识。sqlDatabase=表名,noSqlDatabase
|
|
35824
|
+
.describe("资源唯一标识。sqlDatabase=表名,noSqlDatabase=集合名,云函数为函数名,存储为桶名(完整格式如 '6169-xxx-1257473911',可通过 envQuery action=info 获取 EnvInfo.Storages[].Bucket)。"),
|
|
35823
35825
|
aclTag: zod_1.z
|
|
35824
35826
|
.enum(["READONLY", "PRIVATE", "ADMINWRITE", "ADMINONLY", "CUSTOM"])
|
|
35825
35827
|
.describe("权限类别"),
|
|
@@ -125904,6 +125906,17 @@ function registerCapiTools(server) {
|
|
|
125904
125906
|
throw new Error(`Service ${service} is not allowed. Allowed services: ${ALLOWED_SERVICES.join(", ")}`);
|
|
125905
125907
|
}
|
|
125906
125908
|
const cloudbase = await getManager();
|
|
125909
|
+
if (['1', 'true'].includes(process.env.CLOUDBASE_EVALUATE_MODE ?? '')) {
|
|
125910
|
+
if (service === 'lowcode') {
|
|
125911
|
+
throw new Error(`${service}/${action} Cloud API is not exposed or does not exist. Please use another API.`);
|
|
125912
|
+
}
|
|
125913
|
+
if (service === 'tcb') {
|
|
125914
|
+
const tcbCapiForbidList = ['DescribeStorageACL', 'ModifyStorageACL', 'DescribeSecurityRule'];
|
|
125915
|
+
if (tcbCapiForbidList.includes(action)) {
|
|
125916
|
+
throw new Error(`${service}/${action} Cloud API is not exposed or does not exist. Please use another API.`);
|
|
125917
|
+
}
|
|
125918
|
+
}
|
|
125919
|
+
}
|
|
125907
125920
|
const result = await cloudbase.commonService(service).call({
|
|
125908
125921
|
Action: action,
|
|
125909
125922
|
Param: params ?? {},
|
|
@@ -137509,7 +137522,7 @@ class TelemetryReporter {
|
|
|
137509
137522
|
const nodeVersion = process.version; // Node.js版本
|
|
137510
137523
|
const arch = os_1.default.arch(); // 系统架构
|
|
137511
137524
|
// 从构建时注入的版本号获取MCP版本信息
|
|
137512
|
-
const mcpVersion = process.env.npm_package_version || "2.
|
|
137525
|
+
const mcpVersion = process.env.npm_package_version || "2.13.0" || 0;
|
|
137513
137526
|
return {
|
|
137514
137527
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
137515
137528
|
deviceId: this.deviceId,
|
|
@@ -204208,7 +204221,7 @@ ${envIdSection}
|
|
|
204208
204221
|
## 环境信息
|
|
204209
204222
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
204210
204223
|
- Node.js版本: ${process.version}
|
|
204211
|
-
- MCP 版本:${process.env.npm_package_version || "2.
|
|
204224
|
+
- MCP 版本:${process.env.npm_package_version || "2.13.0" || 0}
|
|
204212
204225
|
- 系统架构: ${os_1.default.arch()}
|
|
204213
204226
|
- 时间: ${new Date().toISOString()}
|
|
204214
204227
|
- 请求ID: ${requestId}
|
|
@@ -218968,7 +218981,7 @@ function registerSetupTools(server) {
|
|
|
218968
218981
|
title: "下载项目模板",
|
|
218969
218982
|
description: `自动下载并部署CloudBase项目模板。⚠️ **MANDATORY FOR NEW PROJECTS** ⚠️
|
|
218970
218983
|
|
|
218971
|
-
**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- 其他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.
|
|
218984
|
+
**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- 其他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.13.0" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
218972
218985
|
inputSchema: {
|
|
218973
218986
|
template: zod_1.z
|
|
218974
218987
|
.enum(["react", "vue", "miniprogram", "uniapp", "rules"])
|
package/dist/index.js
CHANGED
|
@@ -475,6 +475,17 @@ function registerCapiTools(server) {
|
|
|
475
475
|
throw new Error(`Service ${service} is not allowed. Allowed services: ${ALLOWED_SERVICES.join(", ")}`);
|
|
476
476
|
}
|
|
477
477
|
const cloudbase = await getManager();
|
|
478
|
+
if (['1', 'true'].includes(process.env.CLOUDBASE_EVALUATE_MODE ?? '')) {
|
|
479
|
+
if (service === 'lowcode') {
|
|
480
|
+
throw new Error(`${service}/${action} Cloud API is not exposed or does not exist. Please use another API.`);
|
|
481
|
+
}
|
|
482
|
+
if (service === 'tcb') {
|
|
483
|
+
const tcbCapiForbidList = ['DescribeStorageACL', 'ModifyStorageACL', 'DescribeSecurityRule'];
|
|
484
|
+
if (tcbCapiForbidList.includes(action)) {
|
|
485
|
+
throw new Error(`${service}/${action} Cloud API is not exposed or does not exist. Please use another API.`);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
478
489
|
const result = await cloudbase.commonService(service).call({
|
|
479
490
|
Action: action,
|
|
480
491
|
Param: params ?? {},
|
|
@@ -562,7 +573,7 @@ ${envIdSection}
|
|
|
562
573
|
## 环境信息
|
|
563
574
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
564
575
|
- Node.js版本: ${process.version}
|
|
565
|
-
- MCP 版本:${process.env.npm_package_version || "2.
|
|
576
|
+
- MCP 版本:${process.env.npm_package_version || "2.13.0" || 0}
|
|
566
577
|
- 系统架构: ${os_1.default.arch()}
|
|
567
578
|
- 时间: ${new Date().toISOString()}
|
|
568
579
|
- 请求ID: ${requestId}
|
|
@@ -8692,7 +8703,7 @@ class TelemetryReporter {
|
|
|
8692
8703
|
const nodeVersion = process.version; // Node.js版本
|
|
8693
8704
|
const arch = os_1.default.arch(); // 系统架构
|
|
8694
8705
|
// 从构建时注入的版本号获取MCP版本信息
|
|
8695
|
-
const mcpVersion = process.env.npm_package_version || "2.
|
|
8706
|
+
const mcpVersion = process.env.npm_package_version || "2.13.0" || 0;
|
|
8696
8707
|
return {
|
|
8697
8708
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
8698
8709
|
deviceId: this.deviceId,
|
|
@@ -10239,7 +10250,7 @@ function registerSetupTools(server) {
|
|
|
10239
10250
|
title: "下载项目模板",
|
|
10240
10251
|
description: `自动下载并部署CloudBase项目模板。⚠️ **MANDATORY FOR NEW PROJECTS** ⚠️
|
|
10241
10252
|
|
|
10242
|
-
**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- 其他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.
|
|
10253
|
+
**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- 其他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.13.0" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
10243
10254
|
inputSchema: {
|
|
10244
10255
|
template: zod_1.z
|
|
10245
10256
|
.enum(["react", "vue", "miniprogram", "uniapp", "rules"])
|
|
@@ -12499,7 +12510,7 @@ function registerSecurityRuleTools(server) {
|
|
|
12499
12510
|
.describe("资源类型:noSqlDatabase=noSQL 数据库,sqlDatabase=SQL 数据库,function=云函数,storage=存储桶"),
|
|
12500
12511
|
resourceId: zod_1.z
|
|
12501
12512
|
.string()
|
|
12502
|
-
.describe("资源唯一标识。noSQL 数据库为集合名,SQL
|
|
12513
|
+
.describe("资源唯一标识。noSQL 数据库为集合名,SQL 数据库为表名,云函数为函数名,存储为桶名(完整格式如 '6169-xxx-1257473911',可通过 envQuery action=info 获取 EnvInfo.Storages[].Bucket)。"),
|
|
12503
12514
|
},
|
|
12504
12515
|
annotations: {
|
|
12505
12516
|
readOnlyHint: true,
|
|
@@ -12564,6 +12575,8 @@ function registerSecurityRuleTools(server) {
|
|
|
12564
12575
|
type: "text",
|
|
12565
12576
|
text: JSON.stringify({
|
|
12566
12577
|
success: true,
|
|
12578
|
+
resourceType,
|
|
12579
|
+
resourceId,
|
|
12567
12580
|
aclTag: result.AclTag,
|
|
12568
12581
|
rule: result.Rule ?? null,
|
|
12569
12582
|
raw: result,
|
|
@@ -12583,7 +12596,7 @@ function registerSecurityRuleTools(server) {
|
|
|
12583
12596
|
.describe("资源类型:sqlDatabase=SQL 数据库,noSqlDatabase=noSQL 数据库,function=云函数,storage=存储桶"),
|
|
12584
12597
|
resourceId: zod_1.z
|
|
12585
12598
|
.string()
|
|
12586
|
-
.describe("资源唯一标识。sqlDatabase=表名,noSqlDatabase
|
|
12599
|
+
.describe("资源唯一标识。sqlDatabase=表名,noSqlDatabase=集合名,云函数为函数名,存储为桶名(完整格式如 '6169-xxx-1257473911',可通过 envQuery action=info 获取 EnvInfo.Storages[].Bucket)。"),
|
|
12587
12600
|
aclTag: zod_1.z
|
|
12588
12601
|
.enum(["READONLY", "PRIVATE", "ADMINWRITE", "ADMINONLY", "CUSTOM"])
|
|
12589
12602
|
.describe("权限类别"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/cloudbase-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
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",
|