@cloudbase/cloudbase-mcp 1.7.9 → 1.7.10

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.js CHANGED
@@ -14,6 +14,7 @@ import { registerInteractiveTools } from "./tools/interactive.js";
14
14
  import { wrapServerWithTelemetry } from "./utils/tool-wrapper.js";
15
15
  import { telemetryReporter, reportToolkitLifecycle } from "./utils/telemetry.js";
16
16
  import { info } from "./utils/logger.js";
17
+ import { registerGatewayTools } from "./tools/gateway.js";
17
18
  // 记录启动时间
18
19
  const startTime = Date.now();
19
20
  // Create server instance
@@ -47,6 +48,7 @@ registerStorageTools(server);
47
48
  registerSetupTools(server);
48
49
  // Register interactive tools
49
50
  registerInteractiveTools(server);
51
+ registerGatewayTools(server);
50
52
  async function main() {
51
53
  const transport = new StdioServerTransport();
52
54
  await server.connect(transport);
@@ -0,0 +1,23 @@
1
+ import { z } from "zod";
2
+ import { getCloudBaseManager } from '../cloudbase-manager.js';
3
+ export function registerGatewayTools(server) {
4
+ server.tool("createFunctionHTTPAccess", "创建云函数的 HTTP 访问", {
5
+ name: z.string().describe("函数名"),
6
+ path: z.string().describe("HTTP 访问路径"),
7
+ }, async ({ name, path }) => {
8
+ const cloudbase = await getCloudBaseManager();
9
+ const result = await cloudbase.access.createAccess({
10
+ type: 1,
11
+ name,
12
+ path
13
+ });
14
+ return {
15
+ content: [
16
+ {
17
+ type: "text",
18
+ text: JSON.stringify(result, null, 2)
19
+ }
20
+ ]
21
+ };
22
+ });
23
+ }
@@ -20,6 +20,10 @@ const TEMPLATES = {
20
20
  description: "微信小程序 + 云开发模板",
21
21
  url: "https://static.cloudbase.net/cloudbase-examples/miniprogram-cloudbase-miniprogram-template.zip"
22
22
  },
23
+ "uniapp": {
24
+ description: "UniApp + CloudBase 跨端应用模板",
25
+ url: "https://static.cloudbase.net/cloudbase-examples/universal-cloudbase-uniapp-template.zip"
26
+ },
23
27
  "rules": {
24
28
  description: "AI编辑器配置模板(包含所有主流编辑器配置)",
25
29
  url: "https://static.cloudbase.net/cloudbase-examples/web-cloudbase-project.zip"
@@ -129,10 +133,11 @@ export function registerSetupTools(server) {
129
133
  - react: React + CloudBase 全栈应用模板
130
134
  - vue: Vue + CloudBase 全栈应用模板
131
135
  - miniprogram: 微信小程序 + 云开发模板
136
+ - uniapp: UniApp + CloudBase 跨端应用模板
132
137
  - rules: 只包含AI编辑器配置文件(包含Cursor、WindSurf、CodeBuddy等所有主流编辑器配置),适合在已有项目中补充AI编辑器配置
133
138
 
134
139
  工具会自动下载模板到临时目录,解压后如果检测到WORKSPACE_FOLDER_PATHS环境变量,则复制到项目目录。`, {
135
- template: z.enum(["react", "vue", "miniprogram", "rules"]).describe("要下载的模板类型"),
140
+ template: z.enum(["react", "vue", "miniprogram", "uniapp", "rules"]).describe("要下载的模板类型"),
136
141
  overwrite: z.boolean().optional().describe("是否覆盖已存在的文件,默认为false(不覆盖)")
137
142
  }, async ({ template, overwrite = false }) => {
138
143
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cloudbase-mcp",
3
- "version": "1.7.9",
3
+ "version": "1.7.10",
4
4
  "description": "腾讯云开发 MCP Server,支持静态托管/环境查询/",
5
5
  "main": "index.js",
6
6
  "type": "module",