JiShi Design MCP
Use the jishi-design MCP server to read, export, and modify JiShi Design canvases.
First Step
Call list_plugin_clients before other tools. If no client is connected, ask the user to open the 九匠即时MCP plugin in JiShi Design and confirm it shows connected.
If multiple clients are connected, choose by info.docName and pass that clientId to every later tool. Without clientId, tools use the first online client.
Standard Flow
- Discover top-level frames with
get_page_nodes.
- Drill into the target with
get_node_children by id or name, or get_selection when the user selected nodes.
- Export with
save_image or download_icons, or modify with execute_script.
Do not pull an entire large tree first. Probe with shallow maxDepth, then drill into specific child ids.
Tool Routing
list_plugin_clients: list connected JiShi documents.
get_page_nodes: list current page top-level nodes; no parameters.
get_selection: read selected nodes. Useful args: includeChildren, maxDepth, maxNodes, clientId.
get_node_children: read one node subtree. Pass id or name; prefer id because names can repeat.
save_image: export one node. Useful args: nodeId, format, scale, filename, savePath, clientId.
download_icons: batch export SVG. Useful args: nodeIds, contentsOnly, svgOutlineText, svgSimplifyStroke, clientId.
execute_script: custom query, batch edit, or canvas creation. Read references/execute-script.md before using it.
All tools accept optional clientId and timeoutMs.
Read Integrity
get_selection and get_node_children return { nodes, summary }. Always check summary.truncated.
If truncated, do one of these before drawing conclusions:
- Increase
maxDepth or maxNodes.
- Drill into child ids with separate
get_node_children calls.
- Narrow the task to the required subtree.
Never treat truncated data as the complete design.
Export Rules
- Use
scale: 2 or higher for PNG/JPG unless the user requested another scale.
- Prefer
savePath with an absolute path. For temporary exports in this repo, use temp/snapshots.
- Use
download_icons for multiple SVG icons; it returns separate success and failed arrays.
- After visible layout, style, text, asset, or export-related changes, export the affected node/frame and inspect the image before claiming visual correctness.
Mutation Rules
- Use dedicated MCP tools for reads and exports.
- Use
execute_script only when dedicated tools cannot do the operation.
- Before mutating the canvas, state what will change.
- Keep mutation scripts small: discovery, structure, content, assets, styling, and verification should usually be separate calls.
Canvas Creation
For new visible canvas work, use auto layout and responsive adjustments unless the user explicitly refuses. Avoid building fresh designs from many absolute x/y placements.
For execute_script canvas creation, read references/execute-script.md and the relevant gotcha first.
Gotchas
Read only the relevant file before the operation:
references/gotchas/js-jsx-node-operations.md: JSX creation, imperative creation, parenting, traversal, deletion.
references/gotchas/auto-layout-sizing.md: auto layout, sizing, scaling, layout verification.
references/gotchas/responsive-audits.md: fixed-size leftovers, clipping, responsive repair.
references/gotchas/external-resources.md: SVG/Iconify, bitmap import, rendering, export issues.
references/gotchas/styles.md: text style, font loading, letter spacing, effects.
references/gotchas/exports-assets.md: image export, export settings, asset cleanup.
Official References
Start at references/docs-overview.md. Use Markdown docs for concepts and examples; use typings for exact fields, overloads, and literal values.
- Plugin docs:
references/official-docs/插件 API/.
- Widget docs:
references/official-docs/小组件 API/.
- Plugin typings:
references/official-typings/plugin/plugin-api.d.ts and references/official-typings/plugin/index.d.ts.
- Widget typings:
references/official-typings/widget/index.d.ts.
- Crawl notes:
references/docs-crawl-notes.md.
1---2name: js-design-mcp3description: Use when a task involves JiShi Design/js.design canvas work through 九匠即时MCP, jishi-design MCP, or jsDesign PluginAPI.4---56# JiShi Design MCP78Use the `jishi-design` MCP server to read, export, and modify JiShi Design canvases.910## First Step1112Call `list_plugin_clients` before other tools. If no client is connected, ask the user to open the `九匠即时MCP` plugin in JiShi Design and confirm it shows connected.1314If multiple clients are connected, choose by `info.docName` and pass that `clientId` to every later tool. Without `clientId`, tools use the first online client.1516## Standard Flow17181. Discover top-level frames with `get_page_nodes`.192. Drill into the target with `get_node_children` by `id` or `name`, or `get_selection` when the user selected nodes.203. Export with `save_image` or `download_icons`, or modify with `execute_script`.2122Do not pull an entire large tree first. Probe with shallow `maxDepth`, then drill into specific child ids.2324## Tool Routing2526- `list_plugin_clients`: list connected JiShi documents.27- `get_page_nodes`: list current page top-level nodes; no parameters.28- `get_selection`: read selected nodes. Useful args: `includeChildren`, `maxDepth`, `maxNodes`, `clientId`.29- `get_node_children`: read one node subtree. Pass `id` or `name`; prefer `id` because names can repeat.30- `save_image`: export one node. Useful args: `nodeId`, `format`, `scale`, `filename`, `savePath`, `clientId`.31- `download_icons`: batch export SVG. Useful args: `nodeIds`, `contentsOnly`, `svgOutlineText`, `svgSimplifyStroke`, `clientId`.32- `execute_script`: custom query, batch edit, or canvas creation. Read `references/execute-script.md` before using it.3334All tools accept optional `clientId` and `timeoutMs`.3536## Read Integrity3738`get_selection` and `get_node_children` return `{ nodes, summary }`. Always check `summary.truncated`.3940If truncated, do one of these before drawing conclusions:4142- Increase `maxDepth` or `maxNodes`.43- Drill into child ids with separate `get_node_children` calls.44- Narrow the task to the required subtree.4546Never treat truncated data as the complete design.4748## Export Rules4950- Use `scale: 2` or higher for PNG/JPG unless the user requested another scale.51- Prefer `savePath` with an absolute path. For temporary exports in this repo, use `temp/snapshots`.52- Use `download_icons` for multiple SVG icons; it returns separate `success` and `failed` arrays.53- After visible layout, style, text, asset, or export-related changes, export the affected node/frame and inspect the image before claiming visual correctness.5455## Mutation Rules5657- Use dedicated MCP tools for reads and exports.58- Use `execute_script` only when dedicated tools cannot do the operation.59- Before mutating the canvas, state what will change.60- Keep mutation scripts small: discovery, structure, content, assets, styling, and verification should usually be separate calls.6162## Canvas Creation6364For new visible canvas work, use auto layout and responsive adjustments unless the user explicitly refuses. Avoid building fresh designs from many absolute `x`/`y` placements.6566For `execute_script` canvas creation, read `references/execute-script.md` and the relevant gotcha first.6768## Gotchas6970Read only the relevant file before the operation:7172- `references/gotchas/js-jsx-node-operations.md`: JSX creation, imperative creation, parenting, traversal, deletion.73- `references/gotchas/auto-layout-sizing.md`: auto layout, sizing, scaling, layout verification.74- `references/gotchas/responsive-audits.md`: fixed-size leftovers, clipping, responsive repair.75- `references/gotchas/external-resources.md`: SVG/Iconify, bitmap import, rendering, export issues.76- `references/gotchas/styles.md`: text style, font loading, letter spacing, effects.77- `references/gotchas/exports-assets.md`: image export, export settings, asset cleanup.7879## Official References8081Start at `references/docs-overview.md`. Use Markdown docs for concepts and examples; use typings for exact fields, overloads, and literal values.8283- Plugin docs: `references/official-docs/插件 API/`.84- Widget docs: `references/official-docs/小组件 API/`.85- Plugin typings: `references/official-typings/plugin/plugin-api.d.ts` and `references/official-typings/plugin/index.d.ts`.86- Widget typings: `references/official-typings/widget/index.d.ts`.87- Crawl notes: `references/docs-crawl-notes.md`.