Skip to main content
MCP server CX Codex

Smart Drawio — Claude Code MCP server: what it does, how to install

Local MCP server to inspect, repair, and generate editable draw.io XML diagrams directly inside your coding agent.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env SMART_DRAWIO_PROVIDER=<SMART_DRAWIO_PROVIDER> --env SMART_DRAWIO_BASE_URL=<SMART_DRAWIO_BASE_URL> --env SMART_DRAWIO_API_KEY=<SMART_DRAWIO_API_KEY> --env SMART_DRAWIO_MODEL=<SMART_DRAWIO_MODEL> --transport stdio mcp -- npx -y @yunshenwuchuxun/smart-drawio-mcp
Open on GitHub

What Smart Drawio does

The server communicates over stdio to inspect and transform uncompressed draw.io XML documents. It checks syntax and repairs broken closing tags without launching draw.io Desktop or a browser. Diagram data stays in memory, leaving file saving to the client.

Validating and styling run locally without credentials. Only generate_drawio calls an external model. For diagram generation, you must configure environment variables for the provider (openai or anthropic), base URL, API key, and model ID. Diagrams in legacy JSON or compressed formats will fail until converted to raw XML.

What it helps with

  • validate draw.io XML syntax and edge connections
  • repair missing closing tags in diagram markup
  • apply style packs and color presets to existing diagrams
  • create editable diagram XML from a natural language prompt

Example prompts for the agent

  • Validate the XML inside architecture.drawio and check for broken edge targets.
  • Fix missing closing tags in this diagram snippet and apply the researchClean theme.
  • Generate a draw.io flowchart for an OAuth login flow.

How to install Smart Drawio

Platform CLI

claude mcp add --env SMART_DRAWIO_PROVIDER=<SMART_DRAWIO_PROVIDER> --env SMART_DRAWIO_BASE_URL=<SMART_DRAWIO_BASE_URL> --env SMART_DRAWIO_API_KEY=<SMART_DRAWIO_API_KEY> --env SMART_DRAWIO_MODEL=<SMART_DRAWIO_MODEL> --transport stdio mcp -- npx -y @yunshenwuchuxun/smart-drawio-mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Smart Drawio

How do I install Smart Drawio in Claude Code?

Run `claude mcp add --env SMART_DRAWIO_PROVIDER=<SMART_DRAWIO_PROVIDER> --env SMART_DRAWIO_BASE_URL=<SMART_DRAWIO_BASE_URL> --env SMART_DRAWIO_API_KEY=<SMART_DRAWIO_API_KEY> --env SMART_DRAWIO_MODEL=<SMART_DRAWIO_MODEL> --transport stdio mcp -- npx -y @yunshenwuchuxun/smart-drawio-mcp`. Node.js 20.9 or newer is required.

Do I need API keys to use Smart Drawio?

No keys are needed for validation, repair, and restyling tools. API credentials and model settings are only needed if you call generate_drawio.

Can this server render PNG or PDF previews?

No, the server works exclusively with diagram XML text in memory. It does not take screenshots, export images, or attach to a browser canvas.

Similar MCP servers

All MCP servers for Design →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor