Skip to content
Back to search

mastergo-magic-mcp

MasterGo Magic MCP is a standalone MCP (Model Context Protocol) service designed to connect MasterGo design tools with AI models.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/mastergo-design/mastergo-magic-mcp with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/mastergo-design/mastergo-magic-mcp'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/mastergo-design--mastergo-magic-mcp/badge.svg)](/listings/mastergo-design--mastergo-magic-mcp)

HTML

<a href="/listings/mastergo-design--mastergo-magic-mcp"><img src="/api/listings/mastergo-design--mastergo-magic-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 342 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # MasterGo Magic MCP
  2. [![MCP Toplist](https://mcptoplist.com/badge/glama%2Fmastergo-design%2Fmastergo-magic-mcp.svg)](https://mcptoplist.com/server/glama%2Fmastergo-design%2Fmastergo-magic-mcp)
  3. [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/mastergo-design/mastergo-magic-mcp)
  4. MasterGo Magic MCP is a standalone MCP (Model Context Protocol) service designed to connect MasterGo design tools with AI models. It enables AI models to directly retrieve DSL data from MasterGo design files.
  5. ## Key Features
  6. - Retrieves DSL data from MasterGo design files
  7. - Runs directly with npx
  8. - No external dependencies required, only Node.js environment needed
  9. ## Tutorial
  10. - [https://mastergo.com/file/192644601973042](https://mastergo.com/file/192644601973042)
  11. ## Example Prompts
  12. Once the MCP server is connected, you can use the following prompts in your AI chat:
  13. **Extract SVG and preview in HTML:**
  14. ```
  15. Extract SVG and preview in HTML: https://{domain}/file/{fileId}?layer_id={layerId}
  16. ```
  17. **Restore a design to code:**
  18. ```
  19. Restore design: https://{domain}/file/{fileId}?layer_id={layerId}
  20. ```
  21. Replace `{domain}`, `{fileId}`, and `{layerId}` with your actual values. You can also use short links:
  22. ```
  23. Restore design: https://{domain}/goto/{shortLink}
  24. ```
  25. **Restore a design and save as an HTML file:**
  26. ```
  27. Restore design, save as HTML file: https://{domain}/file/{fileId}?layer_id={layerId}
  28. ```
  29. You can also use short links:
  30. ```
  31. Restore design, save as HTML file: https://{domain}/goto/{shortLink}
  32. ```
  33. ## Usage
  34. ### Obtaining MG_MCP_TOKEN
  35. 1. Visit https://mastergo.com
  36. 2. Enter personal settings
  37. 3. Click the Security Settings tab
  38. 4. Find the personal access token
  39. 5. Click to generate the token
  40. ### Permission Requirements
  41. **Important**: If the tool is connected but returns a "no permission" error, please check the following conditions:
  42. 1. **Account Version Requirement**:
  43. - Requires **Team Edition** or higher MasterGo account
  44. - Personal free edition does not support MCP tool access
  45. 2. **File Location Requirement**:
  46. - Design files must be placed in **Team Projects**
  47. - Files in draft box cannot be accessed via MCP tools
  48. ### Command Line Options
  49. ```
  50. npx @mastergo/magic-mcp --token=YOUR_TOKEN [--url=API_URL] [--rule=RULE_NAME] [--proxy=PROXY_URL] [--format=FORMAT] [--header "Key: Value"] [--debug] [--no-rule] [--no-prefix]
  51. ```
  52. #### Parameters:
  53. - `--token=YOUR_TOKEN` (required): MasterGo API token for authentication
  54. - `--url=API_URL` (optional): API base URL, defaults to http://localhost:3000
  55. - `--rule=RULE_NAME` (optional): Add design rules to apply, can be used multiple times
  56. - `--proxy=PROXY_URL` (optional): HTTP/HTTPS proxy URL (e.g., `http://127.0.0.1:7890`), also supports `HTTPS_PROXY` / `HTTP_PROXY` environment variables
  57. - `--header "Key: Value"` (optional): Custom HTTP request header, can be used multiple times. **Quote the value** when it contains spaces. Custom headers override the defaults — including `Content-Type` and the auth token — so match the default key exactly when overriding. Also settable via the `MG_EXTRA_HEADERS` environment variable as a JSON object (e.g. `MG_EXTRA_HEADERS='{"X-Custom":"val"}'`); CLI headers take precedence over env.
  58. - `--format=FORMAT` (optional): Default output format for design-data tools — one of `json` (default), `yaml`, `tree`. An explicit per-call `format` tool parameter overrides this. Also settable via the `DEFAULT_FORMAT` environment variable.
  59. - `--debug` (optional): Enable debug mode for detailed error information
  60. - `--no-rule` (optional): Disable default rules
  61. - `--no-prefix` (optional): Register tools without the `mcp__` name prefix (e.g. `getDsl` instead of `mcp__getDsl`). Some MCP clients (such as Grok Build) silently skip tools whose fully-qualified `server__tool` name contains more than one `__` separator — since the server is already prefixed, a `mcp__getDsl` tool name becomes `server__mcp__getDsl` and is dropped. Enable this flag for those clients. Also settable via the `MG_NO_PREFIX` environment variable (`1`/`true`/`yes`).
  62. You can also use space-separated format for parameters:
  63. ```
  64. npx @mastergo/magic-mcp --token YOUR_TOKEN --url API_URL --rule RULE_NAME --proxy PROXY_URL --format FORMAT --header "Key: Value" --debug
  65. ```
  66. #### Environment Variables
  67. Alternatively, you can use environment variables instead of command line arguments:
  68. - `MG_MCP_TOKEN` or `MASTERGO_API_TOKEN`: MasterGo API token
  69. - `API_BASE_URL`: API base URL
  70. - `RULES`: JSON array of rules (e.g., `'["rule1", "rule2"]'`)
  71. - `DEFAULT_FORMAT`: Default output format for design-data tools (`json` | `yaml` | `tree`); the `--format` argument and an explicit per-call `format` tool parameter take precedence.
  72. - `MG_NO_PREFIX`: Set to `1`/`true`/`yes` to register tools without the `mcp__` name prefix (the `--no-prefix` argument takes priority).
  73. - `HTTPS_PROXY` / `https_proxy` / `HTTP_PROXY` / `http_proxy`: HTTP(S) proxy URL (the `--proxy` argument takes priority)
  74. ### Tool Output Format
  75. The design-data tools (`mcp__getDesignSections`, `mcp__getDsl`, `mcp__getDesignSvgs`, `mcp__getDesignTexts`, `mcp__extractSvg`, `mcp__getMeta`) accept an optional `format` parameter that controls how the payload is serialized. It defaults to `json`, or to the value set via `--format` / `DEFAULT_FORMAT` (see [Command Line Options](#command-line-options)).
  76. | Value | Description |
  77. | --- | --- |
  78. | `json` | **Default.** Compact JSON — useful when piping output into tools that expect JSON. Byte-identical to the prior behavior. |
  79. | `yaml` | Fewer tokens than JSON for typical designs (flat layouts with repeated values benefit most). |
  80. | `tree` | Experimental compact format. Structural keys (`id`, `name`, `type`) are encoded positionally on each node line, and style values stay deduplicated in a `globalVars` block. Designs with heavy style reuse see the largest token savings. |
  81. The format is chosen per tool call by the AI model. To influence it, mention the desired format in your prompt, for example:
  82. ```
  83. Restore design, use tree format: https://{domain}/file/{fileId}?layer_id={layerId}
  84. ```
  85. Notes:
  86. - `tree` applies to all six tools' responses: `mcp__getDesignSections` (section list and per-section DSL), `mcp__getDsl`, `mcp__getDesignSvgs`, `mcp__getDesignTexts`, `mcp__extractSvg`, and `mcp__getMeta`. `mcp__getMeta` falls back to JSON under `tree` because its `rules` field is markdown (the tree layout would corrupt the markdown's headings/code blocks); other payloads render as tree. Truly unknown shapes also fall back to JSON — no data is ever mis-formatted.
  87. - For `mcp__getDesignTexts`, `json` is recommended for maximum verbatim-text fidelity — though all formats round-trip without data loss.
  88. - All formats round-trip without data loss. An invalid or omitted `format` value falls back to `json`.
  89. ### Installing via Smithery Marketplace
  90. Smithery is an MCP server marketplace that makes it easy to install and manage MCP services.
  91. #### Method 1: Install via Smithery Website
  92. 1. Visit [Smithery Marketplace](https://smithery.ai/server/master/mastergo-magic-mcp-smithery)
  93. 2. Click the "Connect" or "Install" button
  94. 3. Select your MCP client (e.g., Claude Desktop, Cursor, etc.)
  95. 4. Follow the prompts to complete installation and configuration
  96. ### LINGMA Usage
  97. Search for LINGMA in the VSCode extension marketplace and install it.
  98. <img src="https://github.com/mastergo-design/mastergo-magic-mcp/blob/main/images/image-20250507174245589.png" alt="image-20250507174245589" style="zoom:25%;" />
  99. After logging in, click on [MCP tools] in the chat box.
  100. <img src="https://github.com/mastergo-design/mastergo-magic-mcp/blob/main/images/image-20250507174511910.png" alt="image-20250507174511910" style="zoom:25%;" />
  101. Click on [MCP Square] at the top to enter the MCP marketplace, find the MasterGo design collaboration tool and install it.
  102. <img src="https://github.com/mastergo-design/mastergo-magic-mcp/blob/main/images/image-20250507174840456.png" alt="image-20250507174840456" style="zoom:25%;" />
  103. After installation, go back to [MCP Servers], and edit our MCP service to replace it with your own MasterGo token.
  104. <img src="https://github.com/mastergo-design/mastergo-magic-mcp/blob/main/images/image-20250507175005364.png" alt="image-20250507175005364" style="zoom:25%;" />
  105. Finally, switch the chat mode to agent mode in the chat interface.
  106. <img src="https://github.com/mastergo-design/mastergo-magic-mcp/blob/main/images/image-20250507175107044.png" alt="image-20250507175107044" style="zoom:25%;" />
  107. ### cursor Usage
  108. Cursor Mcp usage guide reference: https://docs.cursor.com/context/model-context-protocol#using-mcp-tools-in-agent
  109. You can configure the MCP server using either command line arguments or environment variables:
  110. **Option 1: Using command line arguments**
  111. ```json
  112. {
  113. "mcpServers": {
  114. "mastergo-magic-mcp": {
  115. "command": "npx",
  116. "args": [
  117. "-y",
  118. "@mastergo/magic-mcp",
  119. "--token=<YOUR_TOKEN>",
  120. "--url=https://mastergo.com"
  121. ],
  122. "env": {}
  123. }
  124. }
  125. }
  126. ```
  127. **Option 2: Using environment variables**
  128. ```json
  129. {
  130. "mcpServers": {
  131. "mastergo-magic-mcp": {
  132. "command": "npx",
  133. "args": ["-y", "@mastergo/magic-mcp"],
  134. "env": {
  135. "MG_MCP_TOKEN": "<YOUR_TOKEN>",
  136. "API_BASE_URL": "https://mastergo.com"
  137. }
  138. }
  139. }
  140. }
  141. ```
  142. **Option 3: Using SSE (Streamable HTTP)**
  143. No local installation required. The MCP server runs remotely and is accessed via SSE:
  144. ```json
  145. {
  146. "mcpServers": {
  147. "mastergo-magic-mcp": {
  148. "type": "http",
  149. "url": "https://mastergo.com/mcp/xf/sse",
  150. "headers": {
  151. "x-mg-useraccesstoken": "<YOUR_TOKEN>"
  152. }
  153. }
  154. }
  155. }
  156. ```
  157. ### cline Usage
  158. **Option 1: Using command line arguments**
  159. ```json
  160. {
  161. "mcpServers": {
  162. "@master/mastergo-magic-mcp": {
  163. "command": "npx",
  164. "args": [
  165. "-y",
  166. "@mastergo/magic-mcp",
  167. "--token=<YOUR_TOKEN>",
  168. "--url=https://mastergo.com"
  169. ],
  170. "env": {}
  171. }
  172. }
  173. }
  174. ```
  175. **Option 2: Using environment variables**
  176. ```json
  177. {
  178. "mcpServers": {
  179. "@master/mastergo-magic-mcp": {
  180. "command": "npx",
  181. "args": ["-y", "@mastergo/magic-mcp"],
  182. "env": {
  183. "MG_MCP_TOKEN": "<YOUR_TOKEN>",
  184. "API_BASE_URL": "https://mastergo.com"
  185. }
  186. }
  187. }
  188. }
  189. ```
  190. ### Open Code Usage
  191. Open Code uses a `mcp` configuration block with `type: "local"` and `command` array:
  192. ```json
  193. {
  194. "mcp": {
  195. "mastergo-magic-mcp": {
  196. "type": "local",
  197. "command": [
  198. "npx",
  199. "-y",
  200. "@mastergo/magic-mcp",
  201. "--token=<YOUR_TOKEN>",
  202. "--url=https://mastergo.com"
  203. ],
  204. "environment": {
  205. "NPM_CONFIG_REGISTRY": "https://registry.npmjs.org/"
  206. },
  207. "enabled": true
  208. }
  209. }
  210. }
  211. ```
  212. ## Project Structure
  213. ### src Directory
  214. The `src` directory contains the core implementation of the MasterGo Magic MCP service:
  215. - `index.ts`: Entry point of the application that initializes the MCP server and registers all tools
  216. - `http-util.ts`: Utility for handling HTTP requests to the MasterGo API
  217. - `types.d.ts`: TypeScript type definitions for the project
  218. #### src/tools
  219. Contains implementations of MCP tools:
  220. - `base-tool.ts`: Base class for all MCP tools
  221. - `get-dsl.ts`: Tool for retrieving DSL (Domain Specific Language) data from MasterGo design files
  222. - `get-component-link.ts`: Tool for retrieving component documentation from links
  223. - `get-meta.ts`: Tool for retrieving metadata information
  224. - `get-component-workflow.ts`: Tool providing structured component development workflow for Vue and React components, generating workflow files and component specifications
  225. #### src/markdown
  226. Contains markdown files with additional documentation:
  227. - `meta.md`: Documentation about metadata structure and usage
  228. - `component-workflow.md`: Component development workflow documentation guiding structured component development process
  229. ## Local Development
  230. 1. Run `yarn` and `yarn build` to install dependencies and build the code
  231. 2. Find the absolute path of `dist/index.js`
  232. 3. Add local MCP configuration with your token
  233. ```json
  234. "mastergo-mcp-local": {
  235. "command": "node",
  236. "args": [
  237. "absolute/path/to/dist/index.js",
  238. "--token=mg_xxxxxx",
  239. "--url=https://mastergo.com",
  240. "--debug"
  241. ],
  242. "env": {}
  243. },
  244. ```
  245. 4. Restart your editor to ensure the local MCP is enabled
  246. After successful execution, you can debug based on the local running results. You can build your own MCP service based on your modifications.
  247. We welcome your code contributions and look forward to building MasterGo's MCP service together.
  248. ## License
  249. ISC

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.