jgraph /drawio-mcp

★ 5,830⑂ 357👁 26⑃ 53● 45▤ 0
JavaScriptApache-2.0Created 2026-02-02
+5
日增长
5,830
stars
357
forks
26
watchers
53
prs
45
issues
0
releases

README

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 | XML and Mermaid | ✅ All three | XML and Mermaid (Mermaid needs draw.io Desktop) | ✅ 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, 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 |

---

 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:

- Write prompts: Mermaid or draw.io XML, speed and models
- Diagram types and examples and the gallery of every diagram type
- Change and style diagrams: changes by prompt, color themes, styles
- Install options and output formats
- Diagram viewer

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

The MCP App server renders draw.io diagrams inline in AI chat interfaces using the MCP Apps protocol. Instead of opening a browser tab, diagrams appear directly in the conversation as interactive iframes.

The official hosted endpoint is available at:


https://mcp.draw.io/mcp


Add this URL as a remote MCP server in Claude.ai, ChatGPT, VS Code (GitHub Copilot), Cursor, GitHub Copilot CLI, or any MCP Apps-compatible host — no installation required. On Claude.ai, draw.io is also listed in the connector directory and can be added from there in one click; in ChatGPT and Codex, in the plugin directory. In Cursor (≥ 2.6), diagrams render inline in the Agent chat (one-click install); on older builds, use the stdio @drawio/mcp tool server instead. In GitHub Copilot CLI, run copilot mcp add --tr

Discussions

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON