Back to MCP directory
publicPublicdnsLocal runtime

mastergo-magic-mcp

MasterGo Magic MCP是一个独立的MCP服务,用于连接MasterGo设计工具与AI模型,使AI能直接获取设计文件中的DSL数据。

article

README

🚀 MasterGo 魔法 MCP

MasterGo 魔法 MCP 是一个独立的 MCP(模型上下文协议)服务,它的主要作用是将 MasterGo 设计工具与 AI 模型连接起来,让 AI 模型能够直接从 MasterGo 设计文件中提取 DSL 数据。

✨ 主要特性

  • 可以从 MasterGo 设计文件中提取 DSL 数据。
  • 能够直接通过 npx 运行。
  • 无需外部依赖,只要有 Node.js 环境就能使用。

🚀 快速开始

教程

教程参考:https://mastergo.com/file/155675508499265?page_id=158:0002

使用方法

获取 MG_MCP_TOKEN 令牌

  1. 访问 https://mastergo.com
  2. 进入个人设置
  3. 点击安全设置选项卡
  4. 找到个人访问令牌
  5. 点击生成令牌

命令行参数

npx @mastergo/magic-mcp --token=您的令牌 [--url=API_URL] [--rule=RULE_NAME] [--debug]
参数说明:
  • --token=您的令牌(必填):用于 MasterGo API 认证的令牌。
  • --url=API_URL(可选):API 基础 URL,默认为 http://localhost:3000。
  • --rule=RULE_NAME(可选):添加要应用的设计规则,可以多次使用。
  • --debug(可选):启用调试模式以获取详细错误信息。

您也可以使用空格分隔格式指定参数:

npx @mastergo/magic-mcp --token 您的令牌 --url API_URL --rule RULE_NAME --debug

在 Cursor 中的使用

Cursor Mcp 使用指南参考:https://docs.cursor.com/context/model-context-protocol#using-mcp-tools-in-agent

{
  "mcpServers": {
    "mastergo-magic-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mastergo/magic-mcp",
        "--token=<MG_MCP_TOKEN>",
        "--url=https://mastergo.com"
      ],
      "env": {}
    }
  }
}

在 Cline 中的使用

{
  "mcpServers": {
    "@master/mastergo-magic-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mastergo/magic-mcp",
        "--token=<MG_MCP_TOKEN>",
        "--url=https://mastergo.com"
      ],
      "env": {}
    }
  }
}

📄 许可证

ISC

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client