Smart Drawio
Lets your AI agent generate, validate, repair and style editable draw.io diagrams as XML.
367 stars on GitHubby yunshenwuchuxunLicense MITUpdated last month
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add smart-drawio -- npx -y @yunshenwuchuxun/smart-drawio-mcp
What to fill in
| Name | What it is | Required |
|---|---|---|
SMART_DRAWIO_PROVIDER | openai or anthropic; required only for model generation | No |
SMART_DRAWIO_BASE_URL | Model provider HTTP(S) base URL; required only for model generation | No |
SMART_DRAWIO_API_KEY | Your model provider API key; required only for model generation | No |
SMART_DRAWIO_MODEL | Model identifier; required only for model generation | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Create an encoder-decoder Transformer diagram and save it as transformer.drawio.
Validate this drawio file and fix anything broken.
What it is
Smart Drawio is a local server for editable Draw.io diagrams, part of a Next.js app and an agent skill. Your agent can generate XML from a text prompt, check it for errors, fix missing closing tags and apply themes and style packs. It returns plain XML that you save as a .drawio file.
What it can do
generate_drawio: create complete, validated XML from a promptvalidate_drawio: check syntax, IDs, parents and referencesrepair_drawio: fix supported missing closing tagsstyle_drawio: apply themes, style packs, presets and trickslist_drawio_options: list diagram types, themes and options
When to use
- βΊWhen you want a flowchart or architecture diagram you can keep editing in draw.io.
- βΊWhen you want to check that connectors and labels in a diagram are valid.
- βΊWhen you want a quick style change, such as a blueprint or business look.
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
drawioHelps your agent make draw.io diagrams, such as flowcharts, architecture maps, and mockups, as editable .drawio files that can also be exported as PNG, SVG, or PDF.drawio-skillHelps your agent create and edit draw.io diagrams as editable files, from a description or from code and database schemas.cli-anything-drawioLets your agent create, edit, and export diagrams with Draw.io from the command line, including shapes, styles, and page setup.Frequently asked questions
Is it free?
The server is open source on GitHub and npm. Generating diagrams needs your own model API key, and the hosted demo also needs your own key.
Which tools need a model?
Only generate_drawio. Validate, repair, style and list work without one.
Does it draw a live canvas?
No. Version 0.1.0 has local stdio tools only and returns XML, with no remote HTTP endpoint or live canvas control.
Can it export PNG or PDF?
Previews and exports need an available Draw.io renderer or editor.
Which diagram types are supported?
More than 20 types, such as flowchart, mind map, org chart, sequence, UML, ER and Gantt.
Is there a skill too?
Yes, a smart-drawio agent skill installed with npx skills add.
If it does not work
- βΊSet SMART_DRAWIO_PROVIDER, SMART_DRAWIO_BASE_URL, SMART_DRAWIO_API_KEY and SMART_DRAWIO_MODEL if generate_drawio fails.
- βΊCheck that you have Node.js 20.9 or newer.
- βΊRestart your MCP client after you add the config.
5 new skills a week. 1 minute to read.