Draw.io MCP Server
The official draw.io MCP (Model Context Protocol) server that enables LLMs to create and open diagrams in the draw.io editor.

▶ Watch the video and set up draw.io in your AI assistant on drawio.com/mcp.
Four Ways to Create Diagrams
This repository offers four approaches for integrating draw.io with AI assistants. Pick the one that fits your setup:
| MCP App Server | MCP Tool Server | Assistant Plugins | Project Instructions |
|---|
| How it works | Renders diagrams inline in chat | Opens diagrams in your browser | Generates .drawio files, optional PNG/SVG/PDF export or browser URL | Claude generates draw.io URLs via Python |
| Diagram output | Interactive viewer embedded in conversation | draw.io editor in a new tab | .drawio, .drawio.png / .svg / .pdf, or browser URL | Clickable link to draw.io |
| Requires installation | No (hosted at mcp.draw.io) | Yes (npm package) | One-line plugin install (draw.io Desktop only for PNG/SVG/PDF export) | No — just paste instructions |
| Supports XML, CSV, Mermaid | ✅ All three, and PlantUML | ✅ All three | XML and Mermaid (Mermaid converted by draw.io Desktop or an installed Chrome, Edge or Chromium) | ✅ All three |
| Editable in draw.io | Via "Open in draw.io" button | ✅ Directly | ✅ Directly | Via link |
| Works with | Claude.ai, ChatGPT, VS Code, Cursor, GitHub Copilot CLI, any MCP Apps host | Claude Desktop, Cursor, OpenCode, Gemini CLI, any MCP client | Claude Code, Codex CLI, GitHub Copilot, Cursor, Antigravity, OpenCode | Claude.ai (with Projects) |
| Best for | Inline previews in chat | Local desktop workflows | Local development workflows | Quick setup, no install needed |
Mermaid in, editable draw.io out
Every way takes Mermaid and gives a native draw.io diagram, not a picture of one: shapes, connectors that end on the shapes they join, and labels that are the shapes' own text, so the diagram can be edited, moved and restyled in draw.io like one drawn there. draw.io converts Mermaid with its own parser and layout, the same in the editor, draw.io Desktop, the tool server and the app server's viewer: the 28 diagram types of the Mermaid reference, plus swimlane, use case, agent flow, railroad and Cynefin diagrams.
- App Server: flowcharts, ER and sequence diagrams are converted on the server into editable cells, laid out and styled in the calm theme (see MCP App Server); the inline viewer converts the other types, and "Open in draw.io" opens those with the Mermaid kept on them for editing the source.
- Tool Server: the draw.io editor converts it when the link opens.
- Plugins: draw.io Desktop's CLI converts it to a
.drawio file, or without Desktop the skill's mermaid-to-drawio.js runs the same converter in an installed Chrome, Edge or Chromium.
mcp-app-server/test/mermaid-types.test.js converts a diagram of each type both ways and checks the result. In a few types some parts still come out as drawings: loose lines in timelines, tree views, Ishikawa, railroad, event modeling and Cynefin diagrams, radar curves as images, and names beside their shapes in architecture and Wardley diagrams (details).
Guides
User guides with tested prompts and examples are in the draw.io documentation, and the setup for each assistant is on drawio.com/mcp:
The gallery is generated from docs/images/gallery/gallery.json and the editable light and dark SVGs next to it; drawio.com reads them when the site is built.
MCP App Server