@cloudbase/cloudbase-mcp 1.1.0 → 1.2.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/README.md CHANGED
@@ -1,23 +1,35 @@
1
1
  <div align="center">
2
2
 
3
- ![](https://tcb-advanced-a656fc-1257967285.tcloudbaseapp.com/mcp/mcp-github-banner.png)
4
3
 
5
- # 🌟 CloudBase AI-Deploy MCP
4
+ ![](https://7463-tcb-advanced-a656fc-1257967285.tcb.qcloud.la/mcp/cloudbase-ai-toolkit.png)
5
+
6
+
7
+ # 🌟 CloudBase AI ToolKit
8
+
9
+ **通过AI提示词和MCP协议+云开发,让开发更智能、更高效**
6
10
 
7
- **——用AI说话,10分钟搞定全栈应用!**
8
11
 
9
12
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
13
  [![npm version](https://badge.fury.io/js/%40cloudbase%2Fcloudbase-mcp.svg)](https://badge.fury.io/js/%40cloudbase%2Fcloudbase-mcp)
11
- [![GitHub stars](https://img.shields.io/github/stars/TencentCloudBase/cloudbase-ai-deploy-mcp?style=social&v=1)](https://github.com/TencentCloudBase/cloudbase-ai-deploy-mcp/stargazers)
12
- [![GitHub forks](https://img.shields.io/github/forks/TencentCloudBase/cloudbase-ai-deploy-mcp?style=social&v=1)](https://github.com/TencentCloudBase/cloudbase-ai-deploy-mcp/network/members)
14
+ ![NPM Downloads](https://img.shields.io/npm/dw/%40cloudbase%2Fcloudbase-mcp)
15
+ [![GitHub stars](https://img.shields.io/github/stars/TencentCloudBase/CloudBase-AI-ToolKit?style=social&v=1)](https://github.com/TencentCloudBase/CloudBase-AI-ToolKit/stargazers)
16
+ [![GitHub forks](https://img.shields.io/github/forks/TencentCloudBase/CloudBase-AI-ToolKit?style=social&v=1)](https://github.com/TencentCloudBase/CloudBase-AI-ToolKit/network/members)
13
17
 
14
- [![GitHub issues](https://img.shields.io/github/issues/TencentCloudBase/cloudbase-ai-deploy-mcp)](https://github.com/TencentCloudBase/cloudbase-ai-deploy-mcp/issues)
15
- [![GitHub pull requests](https://img.shields.io/github/issues-pr/TencentCloudBase/cloudbase-ai-deploy-mcp)](https://github.com/TencentCloudBase/cloudbase-ai-deploy-mcp/pulls)
16
- [![GitHub last commit](https://img.shields.io/github/last-commit/TencentCloudBase/cloudbase-ai-deploy-mcp)](https://github.com/TencentCloudBase/cloudbase-ai-deploy-mcp/commits)
17
- [![GitHub contributors](https://img.shields.io/github/contributors/TencentCloudBase/cloudbase-ai-deploy-mcp)](https://github.com/TencentCloudBase/cloudbase-ai-deploy-mcp/graphs/contributors)
18
+ [![GitHub issues](https://img.shields.io/github/issues/TencentCloudBase/CloudBase-AI-ToolKit)](https://github.com/TencentCloudBase/CloudBase-AI-ToolKit/issues)
19
+ [![GitHub pull requests](https://img.shields.io/github/issues-pr/TencentCloudBase/CloudBase-AI-ToolKit)](https://github.com/TencentCloudBase/CloudBase-AI-ToolKit/pulls)
20
+ [![GitHub last commit](https://img.shields.io/github/last-commit/TencentCloudBase/CloudBase-AI-ToolKit)](https://github.com/TencentCloudBase/CloudBase-AI-ToolKit/commits)
21
+ [![GitHub contributors](https://img.shields.io/github/contributors/TencentCloudBase/CloudBase-AI-ToolKit)](https://github.com/TencentCloudBase/CloudBase-AI-ToolKit/graphs/contributors)
18
22
 
19
23
  当你在**Cursor/ VSCode GitHub Copilot/WinSurf/CodeBuddy**等AI编程工具里写代码时,它能自动帮你生成可直接部署的前后端应用+小程序,并一键发布到腾讯云开发 CloudBase。
20
24
 
25
+
26
+ ### 🚀 三大核心能力
27
+
28
+ **🤖 AI智能开发**: AI自动生成代码和架构设计 <br>**☁️ 云开发集成**: 一键接入数据库、云函数、静态托管 <br>**⚡ 快速部署**: 几分钟内完成全栈应用上线
29
+ ### 🛠️ 支持平台
30
+
31
+ **Web应用**: 现代化前端 + 静态托管<br>**微信小程序**: 云开发小程序解决方案<br>**后端服务**: 云数据库 + 无服务器函数+云托管
32
+
21
33
  </div>
22
34
 
23
35
  ## ✨ 核心特性
@@ -30,31 +42,17 @@
30
42
  | **🔧 智能修复** | AI 自动查看日志并修复问题 | 降低运维成本 |
31
43
  | **⚡ 极速体验** | 国内 CDN 加速 | 比海外平台访问速度更快 |
32
44
 
33
- ## 🏗️ 架构原理
34
-
35
- ```mermaid
36
- graph TD
37
- A[开发者] --> B[AI IDE]
38
- B -->|使用| C[CloudBase AI 规则]
39
- C --> D[生成代码]
40
- B -->|调用| E[CloudBase MCP]
41
- E --> F{检测部署}
42
- F -->|成功| G[云开发平台]
43
- F -->|失败| H[返回日志]
44
- H --> I[AI 修复]
45
- I --> E
46
- G --> J[线上应用]
47
- J --> K[Web/小程序/API]
48
- ```
49
45
 
50
46
  ## 🚀 快速开始
51
47
 
52
48
  ### 1. 使用模板创建项目
53
49
 
54
- 建议选择适合你的项目模板快速开始:
50
+ 以下模板已经内置了云开发面向 AI IDE 的规则配置
55
51
 
52
+ 建议选择适合你的项目模板快速开始:
56
53
 
57
- - [React Web应用](https://static.cloudbase.net/cloudbase-examples/web-cloudbase-react-template.zip)
54
+ - React Web应用+云开发模板:[下载代码包](https://static.cloudbase.net/cloudbase-examples/web-cloudbase-react-template.zip) | [开源代码地址](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/web/cloudbase-react-template)
55
+ - 小程序+云开发模板:[下载代码包](https://static.cloudbase.net/cloudbase-examples/miniprogram-cloudbase-miniprogram-template.zip) | [开源代码地址](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/miniprogram/cloudbase-miniprogram-template)
58
56
 
59
57
  ### 2. 配置你的 AI IDE
60
58
 
@@ -202,7 +200,7 @@ AI 会自动:
202
200
 
203
201
  **开发过程:**
204
202
  1. 输入需求:"做个双人在线对战五子棋网站,支持联机对战"
205
- 2. AI 生成:Web 应用 + 云数据库 + WebSocket 云函数
203
+ 2. AI 生成:Web 应用 + 云数据库 + 实时数据推送
206
204
  3. 自动部署并获得访问链接
207
205
 
208
206
  👉 **体验地址:** [五子棋游戏](https://cloud1-5g39elugeec5ba0f-1300855855.tcloudbaseapp.com/gobang/#/)
@@ -268,19 +266,23 @@ AI 会自动:
268
266
 
269
267
  ---
270
268
 
271
- ### 🎨 更多案例预览
272
269
 
273
- <details>
274
- <summary>点击查看更多项目案例</summary>
275
-
276
- | 项目类型 | 预览 | 特性 |
277
- |---------|------|------|
278
- | **电商小程序** | 🛒 商品展示、购物车、支付 | 云数据库 + 云函数 + 支付接口 |
279
- | **内容管理系统** | 📝 文章发布、用户管理 | 权限控制 + 富文本编辑 |
280
- | **实时聊天应用** | 💬 群聊、私聊、表情包 | WebSocket + 云存储 |
281
- | **数据可视化** | 📊 图表展示、实时更新 | 云函数 + 第三方图表库 |
270
+ ## 🏗️ 架构原理
282
271
 
283
- </details>
272
+ ```mermaid
273
+ graph TD
274
+ A[开发者] --> B[AI IDE]
275
+ B -->|使用| C[CloudBase AI 规则]
276
+ C --> D[生成代码]
277
+ B -->|调用| E[CloudBase MCP]
278
+ E --> F{检测部署}
279
+ F -->|成功| G[云开发平台]
280
+ F -->|失败| H[返回日志]
281
+ H --> I[AI 修复]
282
+ I --> E
283
+ G --> J[线上应用]
284
+ J --> K[Web/小程序/API]
285
+ ```
284
286
 
285
287
  ## 🌟 为什么选择 CloudBase?
286
288
 
package/dist/auth.js CHANGED
@@ -15,3 +15,7 @@ export async function getLoginState() {
15
15
  return loginState;
16
16
  }
17
17
  }
18
+ export async function logout() {
19
+ const result = await auth.logout();
20
+ return result;
21
+ }
package/dist/tools/env.js CHANGED
@@ -1,8 +1,25 @@
1
1
  import { z } from "zod";
2
2
  import { getCloudBaseManager } from '../cloudbase-manager.js';
3
+ import { logout } from '../auth.js';
3
4
  export function registerEnvTools(server) {
5
+ // logout
6
+ server.tool("logout", "登出当前云开发账户", {
7
+ confirm: z.literal("yes").describe("确认操作")
8
+ }, async ({ confirm }) => {
9
+ const result = await logout();
10
+ return {
11
+ content: [
12
+ {
13
+ type: "text",
14
+ text: JSON.stringify(result, null, 2)
15
+ }
16
+ ]
17
+ };
18
+ });
4
19
  // listEnvs
5
- server.tool("listEnvs", "获取所有云开发环境信息", {}, async () => {
20
+ server.tool("listEnvs", "获取所有云开发环境信息", {
21
+ confirm: z.literal("yes").describe("确认操作")
22
+ }, async () => {
6
23
  const cloudbase = await getCloudBaseManager();
7
24
  const result = await cloudbase.env.listEnvs();
8
25
  return {
@@ -15,7 +32,9 @@ export function registerEnvTools(server) {
15
32
  };
16
33
  });
17
34
  // getEnvAuthDomains
18
- server.tool("getEnvAuthDomains", "获取云开发环境的合法域名列表", {}, async () => {
35
+ server.tool("getEnvAuthDomains", "获取云开发环境的合法域名列表", {
36
+ confirm: z.literal("yes").describe("确认操作")
37
+ }, async () => {
19
38
  const cloudbase = await getCloudBaseManager();
20
39
  const result = await cloudbase.env.getEnvAuthDomains();
21
40
  return {
@@ -58,7 +77,9 @@ export function registerEnvTools(server) {
58
77
  };
59
78
  });
60
79
  // getEnvInfo
61
- server.tool("getEnvInfo", "获取当前云开发环境信息", {}, async () => {
80
+ server.tool("getEnvInfo", "获取当前云开发环境信息", {
81
+ confirm: z.literal("yes").describe("确认操作")
82
+ }, async () => {
62
83
  const cloudbase = await getCloudBaseManager();
63
84
  const result = await cloudbase.env.getEnvInfo();
64
85
  return {
@@ -42,7 +42,9 @@ export function registerHostingTools(server) {
42
42
  };
43
43
  });
44
44
  // listFiles - 获取文件列表
45
- server.tool("listFiles", "获取静态网站托管的文件列表", {}, async () => {
45
+ server.tool("listFiles", "获取静态网站托管的文件列表", {
46
+ confirm: z.literal("yes").describe("确认操作")
47
+ }, async () => {
46
48
  const cloudbase = await getCloudBaseManager();
47
49
  const result = await cloudbase.hosting.listFiles();
48
50
  return {
@@ -162,7 +164,9 @@ export function registerHostingTools(server) {
162
164
  };
163
165
  });
164
166
  // getWebsiteConfig - 获取静态网站配置
165
- server.tool("getWebsiteConfig", "获取静态网站配置", {}, async () => {
167
+ server.tool("getWebsiteConfig", "获取静态网站配置", {
168
+ confirm: z.literal("yes").describe("确认操作")
169
+ }, async () => {
166
170
  const cloudbase = await getCloudBaseManager();
167
171
  const result = await cloudbase.hosting.getWebsiteConfig();
168
172
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cloudbase-mcp",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "腾讯云开发 MCP Server,支持静态托管/环境查询/",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -21,8 +21,9 @@
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "@cloudbase/manager-node": "^4.2.10",
24
+ "@cloudbase/mcp": "^1.0.0-beta.25",
24
25
  "@cloudbase/toolbox": "^0.7.5",
25
- "@modelcontextprotocol/sdk": "^1.9.0",
26
+ "@modelcontextprotocol/sdk": "1.9.0",
26
27
  "zod": "^3.24.3"
27
28
  },
28
29
  "devDependencies": {