Draw.io MCP Server connects AI agents to Draw.io, a diagramming application, through the Model Context Protocol. Users can create, edit, manage, import, export, and persist diagrams across documents and pages from supported agent environments. The catalogue entries package the server with commands, instructions, a plugin, and settings for agent-based diagram workflows.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/lgazo/drawio-mcp-serverWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/lgazo/drawio-mcp-server/drawio-open)<a href="https://agentmods.dev/commands/lgazo/drawio-mcp-server/drawio-open"><img src="https://agentmods.dev/badge/commands/lgazo/drawio-mcp-server/drawio-open.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00017 | $0.00584 |
| Opus 5 | $0.00009 | $0.00292 |
| Sonnet 5 | $0.00003 | $0.00117 |
| Haiku 4.5 | $0.00002 | $0.00058 |
Grade A, and why
drawio-open scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
node -e 'const {spawn}=require("child_process"); const url=process.argv[1]; const cmd = process.platform==="darwin"?"open":process.platform==="win32"?"cmd":"xdg-open"; const args = process.platform==="win32"?["/c","start What it actually says
You are opening a Draw.io diagram from an argument.
Argument: $ARGUMENTS
Steps:
- Determine argument type:
- Starts with
http://orhttps://→ fetch the body with WebFetch. - Otherwise treat it as a local file path and Read it. For
.pngyou must base64-encode.
- Starts with
- Call
mcp__drawio__list-documents. - Pick the target document:
- If the result contains 1+ connected documents, use the first one's
idastarget_document. - If 0 → skip step 4; the server is probably running with
--editoronly.
- If the result contains 1+ connected documents, use the first one's
- Call
mcp__drawio__import-diagramwith the content, appropriate format (xml|svg|png), andtarget_documentwhen known. - Open the editor URL in the browser:
- Read env vars:
DRAWIO_MCP_HOST(defaultlocalhost),DRAWIO_MCP_HTTP_PORT(default3000),DRAWIO_MCP_TLS(true→https, elsehttp). - Build
URL = <scheme>://<host>:<port>/. - Launch via a Node spawn that argv-passes the URL (never shell-interpolate it into a command string, since
$URLmay contain characters from$ARGUMENTS):node -e 'const {spawn}=require("child_process"); const url=process.argv[1]; const cmd = process.platform==="darwin"?"open":process.platform==="win32"?"cmd":"xdg-open"; const args = process.platform==="win32"?["/c","start","",url]:[url]; spawn(cmd,args,{detached:true,stdio:"ignore"}).unref();' "$URL"$URLbecomesargv[1]tonode, not part of the shell command, so shell metacharacters in it are inert.
- Read env vars:
- Report to the user:
- Mode used (extension-import vs editor-only).
- Which document (if any) received the import.
- The URL that was opened.
Error handling:
- File not found → tell the user which path failed.
- Server unreachable → suggest they run
npx drawio-mcp-server --editoror check the port. - Import fails → surface the MCP tool's error verbatim.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 43 lines · 17 tokens per session scan A f9801341efdd
drawio-open is a command published in the GitHub repository lgazo/drawio-mcp-server (1,457 stars, last pushed 6d ago), licensed MIT. It adds 17 tokens to every session and 584 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-02.
Other commands, from other repositories
profile
Save, load, inspect, update, reset, or delete diagram-design client profiles.
ui-flow-review
Review menus, HUD, navigation, and player flow from a UX perspective.
responsive-design-specialist
Use when a layout breaks between sizes. Arbitrary breakpoints, type that does not scale, images that blow out the grid, or a desktop design retrofitted onto mobile.
ppt-image2-editable-rebuild
Rebuild image2 or imagegen reference slides as editable PowerPoint decks.
team-ui
Orchestrate UI/UX design team.
p3-ux-wireframes
Creates wireframes (ASCII art) for the most important screens with interaction descriptions.