Skip to content

Commit 502fff1

Browse files
committed
feat: support ai download template
1 parent 37b2ed8 commit 502fff1

8 files changed

Lines changed: 625 additions & 36 deletions

File tree

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ https://github.com/user-attachments/assets/2b402fa6-c5c4-495a-b85b-f5d4a25daa4a
5656
| **📱 全栈应用支持** | Web + 小程序 + 数据库 + 后端一体化 | 支持小程序/web 等多种应用形式,提供后端托管和数据库 |
5757
| **🔧 智能修复** | AI 自动查看日志并修复问题 | 降低运维成本 |
5858
| **⚡ 极速体验** | 国内 CDN 加速 | 比海外平台访问速度更快 |
59+
| **📚 智能知识库检索** | 内置支持云开发、微信小程序等专业知识库的智能向量检索 |
5960

6061

6162
## 🚀 快速开始
6263

6364

64-
### 0.前置条件
65+
### 0. 前置条件
6566

6667
#### 安装 AI 开发工具
6768
例如 [Cursor](https://www.cursor.com/) | [WindSurf](https://windsurf.com/editor) | [CodeBuddy](https://copilot.tencent.com/)
@@ -71,14 +72,24 @@ https://github.com/user-attachments/assets/2b402fa6-c5c4-495a-b85b-f5d4a25daa4a
7172
2. 在控制台「概览」页面右侧获取 **环境ID**
7273
(后续部署需要此 ID)
7374

74-
### 1. 使用模板创建项目
75+
### 1. 快速初始化或增强你的项目
7576

76-
以下模板已经内置了云开发面向 AI IDE 的规则配置
77+
我们为你准备了内置云开发最佳实践和 AI IDE 规则的项目模板,推荐如下两种方式:
7778

78-
建议选择适合你的项目模板快速开始:
79+
#### 🚀 新项目推荐
80+
81+
选择适合你的模板,一键初始化:
82+
83+
- **React Web 应用 + 云开发模板**
84+
[下载代码包](https://static.cloudbase.net/cloudbase-examples/web-cloudbase-react-template.zip?v=2025053001)[开源代码地址](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/web/cloudbase-react-template)
85+
86+
- **微信小程序 + 云开发模板**
87+
[下载代码包](https://static.cloudbase.net/cloudbase-examples/miniprogram-cloudbase-miniprogram-template.zip?v=2025053001)[开源代码地址](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/miniprogram/cloudbase-miniprogram-template)
88+
89+
#### 🛠️ 已有项目增强
90+
91+
如果你已经有自己的项目,只需在配置好 MCP 后,让 AI 调用 `downloadTemplate` 工具,选择 `rules` 模板,即可一键下载并补全 AI 编辑器规则配置到当前项目目录,无需手动操作。
7992

80-
- React Web应用+云开发模板:[下载代码包](https://static.cloudbase.net/cloudbase-examples/web-cloudbase-react-template.zip?v=2025053001)[开源代码地址](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/web/cloudbase-react-template)
81-
- 小程序+云开发模板:[下载代码包](https://static.cloudbase.net/cloudbase-examples/miniprogram-cloudbase-miniprogram-template.zip?v=2025053001)[开源代码地址](https://github.com/TencentCloudBase/awesome-cloudbase-examples/tree/master/miniprogram/cloudbase-miniprogram-template)
8293

8394
### 2. 配置你的 AI IDE
8495

@@ -610,6 +621,7 @@ AI 会自动:
610621
| 工具名称 | 功能简介 |
611622
|----------|----------|
612623
| logout | 登出当前云开发账户 |
624+
| downloadTemplate | 下载CloudBase项目模板(React、小程序、AI编辑器配置等) |
613625
| listEnvs | 获取所有云开发环境信息 |
614626
| getEnvAuthDomains | 获取云开发环境的合法域名列表 |
615627
| createEnvDomain | 为云开发环境添加安全域名 |

mcp/package-lock.json

Lines changed: 161 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mcp/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
"@cloudbase/mcp": "^1.0.0-beta.25",
3030
"@cloudbase/toolbox": "^0.7.5",
3131
"@modelcontextprotocol/sdk": "1.9.0",
32+
"@types/unzipper": "^0.10.11",
33+
"unzipper": "^0.12.3",
3234
"zod": "^3.24.3"
3335
},
3436
"devDependencies": {

mcp/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import { registerDatabaseTools } from "./tools/database.js";
99
import { registerHostingTools } from "./tools/hosting.js";
1010
import { registerDownloadTools } from "./tools/download.js";
1111
import { registerStorageTools } from "./tools/storage.js";
12-
import { registerRagTools } from './tools/rag.js'
12+
import { registerRagTools } from './tools/rag.js';
13+
import { registerSetupTools } from "./tools/setup.js";
1314

1415
// Create server instance
1516
const server = new McpServer({
@@ -45,6 +46,9 @@ registerDownloadTools(server);
4546
// Register storage tools
4647
registerStorageTools(server);
4748

49+
// Register setup tools
50+
registerSetupTools(server);
51+
4852
async function main() {
4953
const transport = new StdioServerTransport();
5054
await server.connect(transport);

0 commit comments

Comments
 (0)