@mastergo/magic-mcp 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/README.zh-CN.md +3 -1
- package/dist/index.js +71 -70
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ Restore design, save as HTML file: https://{domain}/goto/{shortLink}
|
|
|
73
73
|
### Command Line Options
|
|
74
74
|
|
|
75
75
|
```
|
|
76
|
-
npx @mastergo/magic-mcp --token=YOUR_TOKEN [--url=API_URL] [--rule=RULE_NAME] [--proxy=PROXY_URL] [--format=FORMAT] [--header "Key: Value"] [--debug] [--no-rule]
|
|
76
|
+
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]
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
#### Parameters:
|
|
@@ -86,6 +86,7 @@ npx @mastergo/magic-mcp --token=YOUR_TOKEN [--url=API_URL] [--rule=RULE_NAME] [-
|
|
|
86
86
|
- `--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.
|
|
87
87
|
- `--debug` (optional): Enable debug mode for detailed error information
|
|
88
88
|
- `--no-rule` (optional): Disable default rules
|
|
89
|
+
- `--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`).
|
|
89
90
|
|
|
90
91
|
You can also use space-separated format for parameters:
|
|
91
92
|
|
|
@@ -101,6 +102,7 @@ Alternatively, you can use environment variables instead of command line argumen
|
|
|
101
102
|
- `API_BASE_URL`: API base URL
|
|
102
103
|
- `RULES`: JSON array of rules (e.g., `'["rule1", "rule2"]'`)
|
|
103
104
|
- `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.
|
|
105
|
+
- `MG_NO_PREFIX`: Set to `1`/`true`/`yes` to register tools without the `mcp__` name prefix (the `--no-prefix` argument takes priority).
|
|
104
106
|
- `HTTPS_PROXY` / `https_proxy` / `HTTP_PROXY` / `http_proxy`: HTTP(S) proxy URL (the `--proxy` argument takes priority)
|
|
105
107
|
|
|
106
108
|
### Tool Output Format
|
package/README.zh-CN.md
CHANGED
|
@@ -73,7 +73,7 @@ MCP 服务连接成功后,可以在 AI 对话中使用以下提示词:
|
|
|
73
73
|
### 命令行选项
|
|
74
74
|
|
|
75
75
|
```
|
|
76
|
-
npx @mastergo/magic-mcp --token=YOUR_TOKEN [--url=API_URL] [--rule=RULE_NAME] [--proxy=PROXY_URL] [--format=FORMAT] [--header "Key: Value"] [--debug] [--no-rule]
|
|
76
|
+
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]
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
#### 参数:
|
|
@@ -86,6 +86,7 @@ npx @mastergo/magic-mcp --token=YOUR_TOKEN [--url=API_URL] [--rule=RULE_NAME] [-
|
|
|
86
86
|
- `--format=FORMAT` (可选): 设计数据工具的默认输出格式 —— 取值 `json`(默认)、`yaml`、`tree`。工具调用时显式传入的 `format` 参数优先级更高。也可通过 `DEFAULT_FORMAT` 环境变量设置。
|
|
87
87
|
- `--debug` (可选): 启用调试模式,提供详细错误信息
|
|
88
88
|
- `--no-rule` (可选): 禁用默认规则
|
|
89
|
+
- `--no-prefix` (可选): 工具注册时不带 `mcp__` 名称前缀(如 `getDsl` 而非 `mcp__getDsl`)。部分 MCP 客户端(如 Grok Build)会静默跳过全限定名 `server__tool` 中含多个 `__` 分隔符的工具——服务端名已带前缀时,`mcp__getDsl` 会变成 `server__mcp__getDsl` 而被丢弃。为这类客户端启用此开关即可。也可通过 `MG_NO_PREFIX` 环境变量设置(`1`/`true`/`yes`)。
|
|
89
90
|
|
|
90
91
|
你也可以使用空格分隔的参数格式:
|
|
91
92
|
|
|
@@ -101,6 +102,7 @@ npx @mastergo/magic-mcp --token YOUR_TOKEN --url API_URL --rule RULE_NAME --prox
|
|
|
101
102
|
- `API_BASE_URL`: API 基础 URL
|
|
102
103
|
- `RULES`: 规则的 JSON 数组 (例如: `'["rule1", "rule2"]'`)
|
|
103
104
|
- `DEFAULT_FORMAT`: 设计数据工具的默认输出格式(`json` | `yaml` | `tree`);`--format` 参数和工具调用时显式传入的 `format` 参数优先级更高。
|
|
105
|
+
- `MG_NO_PREFIX`: 设为 `1`/`true`/`yes` 时工具注册不带 `mcp__` 名称前缀(`--no-prefix` 参数优先级更高)。
|
|
104
106
|
- `HTTPS_PROXY` / `https_proxy` / `HTTP_PROXY` / `http_proxy`: HTTP(S) 代理地址(`--proxy` 参数优先级更高)
|
|
105
107
|
|
|
106
108
|
### 工具输出格式
|