@cloudbase/cloudbase-mcp 2.11.0 → 2.11.1
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 +40 -15
- package/dist/index.js +40 -15
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -137208,7 +137208,7 @@ class TelemetryReporter {
|
|
|
137208
137208
|
const nodeVersion = process.version; // Node.js版本
|
|
137209
137209
|
const arch = os_1.default.arch(); // 系统架构
|
|
137210
137210
|
// 从构建时注入的版本号获取MCP版本信息
|
|
137211
|
-
const mcpVersion = process.env.npm_package_version || "2.11.
|
|
137211
|
+
const mcpVersion = process.env.npm_package_version || "2.11.1" || 0;
|
|
137212
137212
|
return {
|
|
137213
137213
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
137214
137214
|
deviceId: this.deviceId,
|
|
@@ -142107,8 +142107,10 @@ function getJavaScripts(wsPort) {
|
|
|
142107
142107
|
}
|
|
142108
142108
|
}
|
|
142109
142109
|
|
|
142110
|
-
// WebSocket
|
|
142111
|
-
const
|
|
142110
|
+
// WebSocket: same host as page so it works in remote VS Code / Cloud IDE (no localhost)
|
|
142111
|
+
const wsScheme = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
142112
|
+
const wsUrl = wsScheme + '//' + window.location.host;
|
|
142113
|
+
const ws = new WebSocket(wsUrl);
|
|
142112
142114
|
|
|
142113
142115
|
ws.onopen = () => {
|
|
142114
142116
|
console.log('[env-setup] WebSocket connected');
|
|
@@ -203867,7 +203869,7 @@ ${envIdSection}
|
|
|
203867
203869
|
## 环境信息
|
|
203868
203870
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
203869
203871
|
- Node.js版本: ${process.version}
|
|
203870
|
-
- MCP 版本:${process.env.npm_package_version || "2.11.
|
|
203872
|
+
- MCP 版本:${process.env.npm_package_version || "2.11.1" || 0}
|
|
203871
203873
|
- 系统架构: ${os_1.default.arch()}
|
|
203872
203874
|
- 时间: ${new Date().toISOString()}
|
|
203873
203875
|
- 请求ID: ${requestId}
|
|
@@ -218624,7 +218626,7 @@ function registerSetupTools(server) {
|
|
|
218624
218626
|
title: "下载项目模板",
|
|
218625
218627
|
description: `自动下载并部署CloudBase项目模板。⚠️ **MANDATORY FOR NEW PROJECTS** ⚠️
|
|
218626
218628
|
|
|
218627
|
-
**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.11.
|
|
218629
|
+
**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.11.1" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
218628
218630
|
inputSchema: {
|
|
218629
218631
|
template: zod_1.z
|
|
218630
218632
|
.enum(["react", "vue", "miniprogram", "uniapp", "rules"])
|
|
@@ -256741,10 +256743,15 @@ class InteractiveServer {
|
|
|
256741
256743
|
3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 3730, 3731, 3732, 3733,
|
|
256742
256744
|
3734, 3735,
|
|
256743
256745
|
];
|
|
256746
|
+
/** Idle timeout for HTTP/WS connections (e.g. long login). Avoids "connection disconnected" after ~1 min. */
|
|
256747
|
+
static SERVER_IDLE_MS = 30 * 60 * 1000; // 30 minutes
|
|
256748
|
+
/** WebSocket ping interval to keep connection alive past proxies/firewalls. */
|
|
256749
|
+
static WS_PING_INTERVAL_MS = 25 * 1000; // 25 seconds
|
|
256744
256750
|
constructor(mcpServer) {
|
|
256745
256751
|
this._mcpServer = mcpServer;
|
|
256746
256752
|
this.app = (0, express_1.default)();
|
|
256747
256753
|
this.server = http_1.default.createServer(this.app);
|
|
256754
|
+
this.applyServerTimeouts();
|
|
256748
256755
|
this.wss = new ws_1.WebSocketServer({ server: this.server });
|
|
256749
256756
|
this.setupExpress();
|
|
256750
256757
|
this.setupWebSocket();
|
|
@@ -256760,6 +256767,16 @@ class InteractiveServer {
|
|
|
256760
256767
|
this.isRunning = false;
|
|
256761
256768
|
}
|
|
256762
256769
|
}
|
|
256770
|
+
/** Apply timeouts so long-lived login does not cause "connection disconnected". */
|
|
256771
|
+
applyServerTimeouts() {
|
|
256772
|
+
this.server.timeout = 0;
|
|
256773
|
+
if (typeof this.server.keepAliveTimeout === "number") {
|
|
256774
|
+
this.server.keepAliveTimeout = InteractiveServer.SERVER_IDLE_MS;
|
|
256775
|
+
}
|
|
256776
|
+
if (typeof this.server.headersTimeout === "number") {
|
|
256777
|
+
this.server.headersTimeout = Math.max(this.server.headersTimeout || 0, InteractiveServer.SERVER_IDLE_MS);
|
|
256778
|
+
}
|
|
256779
|
+
}
|
|
256763
256780
|
setupExpress() {
|
|
256764
256781
|
this.app.use(express_1.default.json());
|
|
256765
256782
|
this.app.get("/env-setup/:sessionId", (req, res) => {
|
|
@@ -256863,6 +256880,16 @@ class InteractiveServer {
|
|
|
256863
256880
|
setupWebSocket() {
|
|
256864
256881
|
this.wss.on("connection", (ws) => {
|
|
256865
256882
|
(0, logger_js_1.debug)("WebSocket client connected");
|
|
256883
|
+
// Keep connection alive during long login so proxies/firewalls do not close it
|
|
256884
|
+
const pingInterval = setInterval(() => {
|
|
256885
|
+
if (ws.readyState === ws_1.WebSocket.OPEN) {
|
|
256886
|
+
ws.ping();
|
|
256887
|
+
}
|
|
256888
|
+
}, InteractiveServer.WS_PING_INTERVAL_MS);
|
|
256889
|
+
ws.on("close", () => {
|
|
256890
|
+
clearInterval(pingInterval);
|
|
256891
|
+
(0, logger_js_1.debug)("WebSocket client disconnected");
|
|
256892
|
+
});
|
|
256866
256893
|
ws.on("message", async (message) => {
|
|
256867
256894
|
try {
|
|
256868
256895
|
const data = JSON.parse(message.toString());
|
|
@@ -256972,9 +256999,6 @@ class InteractiveServer {
|
|
|
256972
256999
|
(0, logger_js_1.error)("WebSocket message parsing error", err instanceof Error ? err : new Error(String(err)));
|
|
256973
257000
|
}
|
|
256974
257001
|
});
|
|
256975
|
-
ws.on("close", () => {
|
|
256976
|
-
(0, logger_js_1.debug)("WebSocket client disconnected");
|
|
256977
|
-
});
|
|
256978
257002
|
});
|
|
256979
257003
|
}
|
|
256980
257004
|
async start() {
|
|
@@ -257016,13 +257040,15 @@ class InteractiveServer {
|
|
|
257016
257040
|
reject(err);
|
|
257017
257041
|
}
|
|
257018
257042
|
};
|
|
257043
|
+
// Host: default 0.0.0.0 so Cloud IDE / VSCode Remote port-forward can connect; set INTERACTIVE_SERVER_HOST=127.0.0.1 for local-only
|
|
257044
|
+
const host = process.env.INTERACTIVE_SERVER_HOST ?? "0.0.0.0";
|
|
257019
257045
|
// 设置成功监听处理
|
|
257020
257046
|
const listeningHandler = () => {
|
|
257021
257047
|
const address = this.server.address();
|
|
257022
257048
|
if (address && typeof address === "object") {
|
|
257023
257049
|
this.port = address.port;
|
|
257024
257050
|
this.isRunning = true;
|
|
257025
|
-
(0, logger_js_1.info)(`Interactive server started successfully on http
|
|
257051
|
+
(0, logger_js_1.info)(`Interactive server started successfully on http://${host}:${this.port}`);
|
|
257026
257052
|
// 移除临时监听器
|
|
257027
257053
|
this.server.removeListener("error", errorHandler);
|
|
257028
257054
|
this.server.removeListener("listening", listeningHandler);
|
|
@@ -257037,7 +257063,7 @@ class InteractiveServer {
|
|
|
257037
257063
|
this.server.once("error", errorHandler);
|
|
257038
257064
|
this.server.once("listening", listeningHandler);
|
|
257039
257065
|
try {
|
|
257040
|
-
this.server.listen(portToTry,
|
|
257066
|
+
this.server.listen(portToTry, host);
|
|
257041
257067
|
}
|
|
257042
257068
|
catch (err) {
|
|
257043
257069
|
(0, logger_js_1.error)(`Failed to bind to port ${portToTry}:`, err instanceof Error ? err : new Error(String(err)));
|
|
@@ -257078,6 +257104,7 @@ class InteractiveServer {
|
|
|
257078
257104
|
this.port = 0;
|
|
257079
257105
|
// 重新创建整个服务器实例以便下次使用
|
|
257080
257106
|
this.server = http_1.default.createServer(this.app);
|
|
257107
|
+
this.applyServerTimeouts();
|
|
257081
257108
|
this.wss = new ws_1.WebSocketServer({ server: this.server });
|
|
257082
257109
|
this.setupWebSocket();
|
|
257083
257110
|
(0, logger_js_1.debug)("HTTP and WebSocket servers recreated for next use");
|
|
@@ -257168,11 +257195,9 @@ class InteractiveServer {
|
|
|
257168
257195
|
(0, logger_js_1.warn)(`Please manually open: ${url}`);
|
|
257169
257196
|
}
|
|
257170
257197
|
(0, logger_js_1.info)("Waiting for user selection...");
|
|
257171
|
-
// Use
|
|
257172
|
-
|
|
257173
|
-
|
|
257174
|
-
const timeoutDuration = (isCodeBuddy && notificationSent) ? 2 * 60 * 1000 : 10 * 60 * 1000;
|
|
257175
|
-
(0, logger_js_1.debug)(`[collectEnvId] Using timeout duration: ${timeoutDuration / 1000} seconds (CodeBuddy: ${isCodeBuddy}, notification sent: ${notificationSent})`);
|
|
257198
|
+
// Use same 10 minutes for all IDEs so long login (re-auth, switch account) does not close the server
|
|
257199
|
+
const timeoutDuration = 10 * 60 * 1000;
|
|
257200
|
+
(0, logger_js_1.debug)(`[collectEnvId] Using timeout duration: ${timeoutDuration / 1000} seconds`);
|
|
257176
257201
|
return new Promise((resolve) => {
|
|
257177
257202
|
this.currentResolver = (result) => {
|
|
257178
257203
|
// 用户选择完成后,关闭服务器
|
package/dist/index.js
CHANGED
|
@@ -562,7 +562,7 @@ ${envIdSection}
|
|
|
562
562
|
## 环境信息
|
|
563
563
|
- 操作系统: ${os_1.default.type()} ${os_1.default.release()}
|
|
564
564
|
- Node.js版本: ${process.version}
|
|
565
|
-
- MCP 版本:${process.env.npm_package_version || "2.11.
|
|
565
|
+
- MCP 版本:${process.env.npm_package_version || "2.11.1" || 0}
|
|
566
566
|
- 系统架构: ${os_1.default.arch()}
|
|
567
567
|
- 时间: ${new Date().toISOString()}
|
|
568
568
|
- 请求ID: ${requestId}
|
|
@@ -1085,10 +1085,15 @@ class InteractiveServer {
|
|
|
1085
1085
|
3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 3730, 3731, 3732, 3733,
|
|
1086
1086
|
3734, 3735,
|
|
1087
1087
|
];
|
|
1088
|
+
/** Idle timeout for HTTP/WS connections (e.g. long login). Avoids "connection disconnected" after ~1 min. */
|
|
1089
|
+
static SERVER_IDLE_MS = 30 * 60 * 1000; // 30 minutes
|
|
1090
|
+
/** WebSocket ping interval to keep connection alive past proxies/firewalls. */
|
|
1091
|
+
static WS_PING_INTERVAL_MS = 25 * 1000; // 25 seconds
|
|
1088
1092
|
constructor(mcpServer) {
|
|
1089
1093
|
this._mcpServer = mcpServer;
|
|
1090
1094
|
this.app = (0, express_1.default)();
|
|
1091
1095
|
this.server = http_1.default.createServer(this.app);
|
|
1096
|
+
this.applyServerTimeouts();
|
|
1092
1097
|
this.wss = new ws_1.WebSocketServer({ server: this.server });
|
|
1093
1098
|
this.setupExpress();
|
|
1094
1099
|
this.setupWebSocket();
|
|
@@ -1104,6 +1109,16 @@ class InteractiveServer {
|
|
|
1104
1109
|
this.isRunning = false;
|
|
1105
1110
|
}
|
|
1106
1111
|
}
|
|
1112
|
+
/** Apply timeouts so long-lived login does not cause "connection disconnected". */
|
|
1113
|
+
applyServerTimeouts() {
|
|
1114
|
+
this.server.timeout = 0;
|
|
1115
|
+
if (typeof this.server.keepAliveTimeout === "number") {
|
|
1116
|
+
this.server.keepAliveTimeout = InteractiveServer.SERVER_IDLE_MS;
|
|
1117
|
+
}
|
|
1118
|
+
if (typeof this.server.headersTimeout === "number") {
|
|
1119
|
+
this.server.headersTimeout = Math.max(this.server.headersTimeout || 0, InteractiveServer.SERVER_IDLE_MS);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1107
1122
|
setupExpress() {
|
|
1108
1123
|
this.app.use(express_1.default.json());
|
|
1109
1124
|
this.app.get("/env-setup/:sessionId", (req, res) => {
|
|
@@ -1207,6 +1222,16 @@ class InteractiveServer {
|
|
|
1207
1222
|
setupWebSocket() {
|
|
1208
1223
|
this.wss.on("connection", (ws) => {
|
|
1209
1224
|
(0, logger_js_1.debug)("WebSocket client connected");
|
|
1225
|
+
// Keep connection alive during long login so proxies/firewalls do not close it
|
|
1226
|
+
const pingInterval = setInterval(() => {
|
|
1227
|
+
if (ws.readyState === ws_1.WebSocket.OPEN) {
|
|
1228
|
+
ws.ping();
|
|
1229
|
+
}
|
|
1230
|
+
}, InteractiveServer.WS_PING_INTERVAL_MS);
|
|
1231
|
+
ws.on("close", () => {
|
|
1232
|
+
clearInterval(pingInterval);
|
|
1233
|
+
(0, logger_js_1.debug)("WebSocket client disconnected");
|
|
1234
|
+
});
|
|
1210
1235
|
ws.on("message", async (message) => {
|
|
1211
1236
|
try {
|
|
1212
1237
|
const data = JSON.parse(message.toString());
|
|
@@ -1316,9 +1341,6 @@ class InteractiveServer {
|
|
|
1316
1341
|
(0, logger_js_1.error)("WebSocket message parsing error", err instanceof Error ? err : new Error(String(err)));
|
|
1317
1342
|
}
|
|
1318
1343
|
});
|
|
1319
|
-
ws.on("close", () => {
|
|
1320
|
-
(0, logger_js_1.debug)("WebSocket client disconnected");
|
|
1321
|
-
});
|
|
1322
1344
|
});
|
|
1323
1345
|
}
|
|
1324
1346
|
async start() {
|
|
@@ -1360,13 +1382,15 @@ class InteractiveServer {
|
|
|
1360
1382
|
reject(err);
|
|
1361
1383
|
}
|
|
1362
1384
|
};
|
|
1385
|
+
// Host: default 0.0.0.0 so Cloud IDE / VSCode Remote port-forward can connect; set INTERACTIVE_SERVER_HOST=127.0.0.1 for local-only
|
|
1386
|
+
const host = process.env.INTERACTIVE_SERVER_HOST ?? "0.0.0.0";
|
|
1363
1387
|
// 设置成功监听处理
|
|
1364
1388
|
const listeningHandler = () => {
|
|
1365
1389
|
const address = this.server.address();
|
|
1366
1390
|
if (address && typeof address === "object") {
|
|
1367
1391
|
this.port = address.port;
|
|
1368
1392
|
this.isRunning = true;
|
|
1369
|
-
(0, logger_js_1.info)(`Interactive server started successfully on http
|
|
1393
|
+
(0, logger_js_1.info)(`Interactive server started successfully on http://${host}:${this.port}`);
|
|
1370
1394
|
// 移除临时监听器
|
|
1371
1395
|
this.server.removeListener("error", errorHandler);
|
|
1372
1396
|
this.server.removeListener("listening", listeningHandler);
|
|
@@ -1381,7 +1405,7 @@ class InteractiveServer {
|
|
|
1381
1405
|
this.server.once("error", errorHandler);
|
|
1382
1406
|
this.server.once("listening", listeningHandler);
|
|
1383
1407
|
try {
|
|
1384
|
-
this.server.listen(portToTry,
|
|
1408
|
+
this.server.listen(portToTry, host);
|
|
1385
1409
|
}
|
|
1386
1410
|
catch (err) {
|
|
1387
1411
|
(0, logger_js_1.error)(`Failed to bind to port ${portToTry}:`, err instanceof Error ? err : new Error(String(err)));
|
|
@@ -1422,6 +1446,7 @@ class InteractiveServer {
|
|
|
1422
1446
|
this.port = 0;
|
|
1423
1447
|
// 重新创建整个服务器实例以便下次使用
|
|
1424
1448
|
this.server = http_1.default.createServer(this.app);
|
|
1449
|
+
this.applyServerTimeouts();
|
|
1425
1450
|
this.wss = new ws_1.WebSocketServer({ server: this.server });
|
|
1426
1451
|
this.setupWebSocket();
|
|
1427
1452
|
(0, logger_js_1.debug)("HTTP and WebSocket servers recreated for next use");
|
|
@@ -1512,11 +1537,9 @@ class InteractiveServer {
|
|
|
1512
1537
|
(0, logger_js_1.warn)(`Please manually open: ${url}`);
|
|
1513
1538
|
}
|
|
1514
1539
|
(0, logger_js_1.info)("Waiting for user selection...");
|
|
1515
|
-
// Use
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
const timeoutDuration = (isCodeBuddy && notificationSent) ? 2 * 60 * 1000 : 10 * 60 * 1000;
|
|
1519
|
-
(0, logger_js_1.debug)(`[collectEnvId] Using timeout duration: ${timeoutDuration / 1000} seconds (CodeBuddy: ${isCodeBuddy}, notification sent: ${notificationSent})`);
|
|
1540
|
+
// Use same 10 minutes for all IDEs so long login (re-auth, switch account) does not close the server
|
|
1541
|
+
const timeoutDuration = 10 * 60 * 1000;
|
|
1542
|
+
(0, logger_js_1.debug)(`[collectEnvId] Using timeout duration: ${timeoutDuration / 1000} seconds`);
|
|
1520
1543
|
return new Promise((resolve) => {
|
|
1521
1544
|
this.currentResolver = (result) => {
|
|
1522
1545
|
// 用户选择完成后,关闭服务器
|
|
@@ -8663,7 +8686,7 @@ class TelemetryReporter {
|
|
|
8663
8686
|
const nodeVersion = process.version; // Node.js版本
|
|
8664
8687
|
const arch = os_1.default.arch(); // 系统架构
|
|
8665
8688
|
// 从构建时注入的版本号获取MCP版本信息
|
|
8666
|
-
const mcpVersion = process.env.npm_package_version || "2.11.
|
|
8689
|
+
const mcpVersion = process.env.npm_package_version || "2.11.1" || 0;
|
|
8667
8690
|
return {
|
|
8668
8691
|
userAgent: `${osType} ${osRelease} ${arch} ${nodeVersion} CloudBase-MCP/${mcpVersion}`,
|
|
8669
8692
|
deviceId: this.deviceId,
|
|
@@ -10096,7 +10119,7 @@ function registerSetupTools(server) {
|
|
|
10096
10119
|
title: "下载项目模板",
|
|
10097
10120
|
description: `自动下载并部署CloudBase项目模板。⚠️ **MANDATORY FOR NEW PROJECTS** ⚠️
|
|
10098
10121
|
|
|
10099
|
-
**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.11.
|
|
10122
|
+
**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.11.1" : 0}),便于后续维护和版本追踪\n- 下载 rules 模板时,如果项目中已存在 README.md 文件,系统会自动保护该文件不被覆盖(除非设置 overwrite=true)`,
|
|
10100
10123
|
inputSchema: {
|
|
10101
10124
|
template: zod_1.z
|
|
10102
10125
|
.enum(["react", "vue", "miniprogram", "uniapp", "rules"])
|
|
@@ -11505,8 +11528,10 @@ function getJavaScripts(wsPort) {
|
|
|
11505
11528
|
}
|
|
11506
11529
|
}
|
|
11507
11530
|
|
|
11508
|
-
// WebSocket
|
|
11509
|
-
const
|
|
11531
|
+
// WebSocket: same host as page so it works in remote VS Code / Cloud IDE (no localhost)
|
|
11532
|
+
const wsScheme = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
11533
|
+
const wsUrl = wsScheme + '//' + window.location.host;
|
|
11534
|
+
const ws = new WebSocket(wsUrl);
|
|
11510
11535
|
|
|
11511
11536
|
ws.onopen = () => {
|
|
11512
11537
|
console.log('[env-setup] WebSocket connected');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/cloudbase-mcp",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.1",
|
|
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",
|