Skip to content

Generator SDK MCP Server

Generator SDK MCP (Model Context Protocol) Server 是为 Generator SDK 提供的 AI 协议服务,支持通过 Cursor、Claude Desktop 等 AI 工具进行对话式代码生成和开发。

如果你的目标是让开发者通过 AI 直接开始做一个新的生成器,建议先阅读:

核心功能

  • 智能代码生成 - 根据自然语言描述生成代码
  • Runtime Starter 生成 - 生成默认支持 full / embed 双模式、并通过 generator-workbench 挂载统一壳层的 HTML / Vue 生成器骨架
  • 文档查询 - 搜索 API 文档和使用示例
  • 支持模块 - auth、cloud、billing、credits、export 以及 runtime contract

快速开始

Cursor 配置(推荐)

在 npm 查看

  1. 打开 Cursor 设置(Cmd/Ctrl + ,
  2. 搜索 MCP 找到 MCP Servers 配置
  3. 添加服务:
json
{
  "mcpServers": {
    "generator-sdk": {
      "command": "npx",
      "args": [
        "-y",
        "@atomm-developer/generator-sdk-mcp@latest"
      ]
    }
  }
}
  1. 重启 Cursor

Claude Desktop 配置

编辑配置文件:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.jsonWindows: %APPDATA%\Claude\claude_desktop_config.json

json
{
  "mcpServers": {
    "generator-sdk": {
      "command": "npx",
      "args": [
        "-y",
        "@atomm-developer/generator-sdk-mcp@latest"
      ]
    }
  }
}

使用示例

生成代码

生成一个包含用户登录功能的 HTML 页面,用于生产环境

生成 Runtime Starter

请生成一个 starter-html-runtime,使用 generator-sdk,支持 auth、billing、export,
并默认具备 full/embed 双模式、panelFilter,以及 generator-workbench 宿主壳层

查询 API

Generator SDK 的 cloud 模块有哪些 API?

搜索文档

如何使用 Generator SDK 进行用户认证?

可用工具

  • generate_code - 生成 Generator SDK 代码
  • generate_runtime_starter - 生成新的 runtime starter(HTML / Vue)
  • query_documentation - 查询 API 文档
  • list_apis - 列出所有可用 API

常见问题

Q: 提示 "command not found"

npm cache clean --force

Q: 提示 "404 Not Found" 确保使用正确的包名:

@atomm-developer/generator-sdk-mcp

技术支持

MIT Licensed