Connects MasterGo design tools to AI models so they can retrieve DSL data from MasterGo design files.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add mastergo-magic --env MG_MCP_TOKEN='<MG_MCP_TOKEN>' --env NPM_CONFIG_REGISTRY='<NPM_CONFIG_REGISTRY>' -- npx -y @mastergo/magic-mcp '--token={{config.MG_MCP_TOKEN}}' '--url={{config.API_URL}}'~/.codex/config.toml
[mcp_servers.mastergo-magic]
command = "npx"
args = ["-y", "@mastergo/magic-mcp", "--token={{config.MG_MCP_TOKEN}}", "--url={{config.API_URL}}"]
env = { MG_MCP_TOKEN = "<MG_MCP_TOKEN>", NPM_CONFIG_REGISTRY = "<NPM_CONFIG_REGISTRY>" }
# codex mcp add mastergo-magic --env MG_MCP_TOKEN='<MG_MCP_TOKEN>' --env NPM_CONFIG_REGISTRY='<NPM_CONFIG_REGISTRY>' -- npx -y @mastergo/magic-mcp '--token={{config.MG_MCP_TOKEN}}' '--url={{config.API_URL}}'~/.cursor/mcp.json
{
"mcpServers": {
"mastergo-magic": {
"command": "npx",
"args": [
"-y",
"@mastergo/magic-mcp",
"--token={{config.MG_MCP_TOKEN}}",
"--url={{config.API_URL}}"
],
"env": {
"MG_MCP_TOKEN": "<MG_MCP_TOKEN>",
"NPM_CONFIG_REGISTRY": "<NPM_CONFIG_REGISTRY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"mastergo-magic": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mastergo/magic-mcp",
"--token={{config.MG_MCP_TOKEN}}",
"--url={{config.API_URL}}"
],
"env": {
"MG_MCP_TOKEN": "<MG_MCP_TOKEN>",
"NPM_CONFIG_REGISTRY": "<NPM_CONFIG_REGISTRY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"mastergo-magic": {
"command": "npx",
"args": [
"-y",
"@mastergo/magic-mcp",
"--token={{config.MG_MCP_TOKEN}}",
"--url={{config.API_URL}}"
],
"env": {
"MG_MCP_TOKEN": "<MG_MCP_TOKEN>",
"NPM_CONFIG_REGISTRY": "<NPM_CONFIG_REGISTRY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"mastergo-magic": {
"command": "npx",
"args": [
"-y",
"@mastergo/magic-mcp",
"--token={{config.MG_MCP_TOKEN}}",
"--url={{config.API_URL}}"
],
"env": {
"MG_MCP_TOKEN": "<MG_MCP_TOKEN>",
"NPM_CONFIG_REGISTRY": "<NPM_CONFIG_REGISTRY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"mastergo-magic": {
"command": "npx",
"args": [
"-y",
"@mastergo/magic-mcp",
"--token={{config.MG_MCP_TOKEN}}",
"--url={{config.API_URL}}"
],
"env": {
"MG_MCP_TOKEN": "<MG_MCP_TOKEN>",
"NPM_CONFIG_REGISTRY": "<NPM_CONFIG_REGISTRY>"
}
}
}
}需要的环境变量
MG_MCP_TOKENNPM_CONFIG_REGISTRY
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。