Skip to content
Skillpedia
● Free and open sourceπŸ’» LocalπŸ”‘ Needs an API keyDesign and media

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

NameWhat it isRequired
SMART_DRAWIO_PROVIDERopenai or anthropic; required only for model generationNo
SMART_DRAWIO_BASE_URLModel provider HTTP(S) base URL; required only for model generationNo
SMART_DRAWIO_API_KEYYour model provider API key; required only for model generationNo
SMART_DRAWIO_MODELModel identifier; required only for model generationNo

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 prompt
  • validate_drawio: check syntax, IDs, parents and references
  • repair_drawio: fix supported missing closing tags
  • style_drawio: apply themes, style packs, presets and tricks
  • list_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

Node.js 20.9 or newer and a client that supports local stdio MCP. Only generate_drawio needs a model API key and settings for an OpenAI- or Anthropic-compatible provider.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

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.