Draw.io MCP Server
Builds, edits and exports draw.io diagrams live in a browser tab under an assistant's direction
Official draw.io server that turns XML, Mermaid or CSV into diagrams shown in chat or opened in the editor
Official · draw.io JavaScript Remote (hosted) · Streamable HTTPLocal · stdio, Streamable HTTP DesignProductivity
93 popularity score ★ 5.8k ↓ 47k/wk
Opens the app, which asks before it adds the server.
https://mcp.draw.io/mcphttps://mcp.draw.io/mcp{
"servers": {
"drawio": {
"type": "http",
"url": "https://mcp.draw.io/mcp"
}
}
}{
"mcpServers": {
"drawio": {
"url": "https://mcp.draw.io/mcp"
}
}
}copilot mcp add --transport http drawio https://mcp.draw.io/mcp{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"drawio": {
"type": "remote",
"url": "https://mcp.draw.io/mcp",
"enabled": true
}
}
}Opens the app, which asks before it adds the server.
claude mcp add --transport http draw-io http://localhost:3001/mcp{
"mcpServers": {
"draw-io": {
"url": "http://localhost:3001/mcp"
}
}
}{
"servers": {
"draw-io": {
"type": "http",
"url": "http://localhost:3001/mcp"
}
}
}[mcp_servers.draw-io]
url = "http://localhost:3001/mcp"gemini mcp add --scope user --transport http draw-io http://localhost:3001/mcpOpens the app, which asks before it adds the server.
claude mcp add draw-io -- npx -y @drawio/mcp{
"mcpServers": {
"draw-io": {
"command": "npx",
"args": [
"-y",
"@drawio/mcp"
]
}
}
}{
"mcpServers": {
"draw-io": {
"command": "npx",
"args": [
"-y",
"@drawio/mcp"
]
}
}
}{
"servers": {
"draw-io": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@drawio/mcp"
]
}
}
}[mcp_servers.draw-io]
command = "npx"
args = ["-y", "@drawio/mcp"]gemini mcp add --scope user draw-io npx -- -y @drawio/mcpOpens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
git clone https://github.com/jgraph/drawio-mcp.git
cd drawio-mcp/mcp-tool-server
npm installclaude mcp add draw-io -- node '<ABSOLUTE_PATH_TO_CLONE>/mcp-tool-server/src/index.js'{
"mcpServers": {
"draw-io": {
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CLONE>/mcp-tool-server/src/index.js"
]
}
}
}{
"mcpServers": {
"draw-io": {
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CLONE>/mcp-tool-server/src/index.js"
]
}
}
}{
"servers": {
"draw-io": {
"type": "stdio",
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CLONE>/mcp-tool-server/src/index.js"
]
}
}
}[mcp_servers.draw-io]
command = "node"
args = ["<ABSOLUTE_PATH_TO_CLONE>/mcp-tool-server/src/index.js"]gemini mcp add --scope user draw-io node -- '<ABSOLUTE_PATH_TO_CLONE>/mcp-tool-server/src/index.js'DRAWIO_BASE_URL |
Optional: Tool server: draw.io instance the diagrams open in, for a self-hosted draw.io. |
|---|---|
DRAWIO_ICON_SERVICE_URL |
Optional: Icon service search_shapes queries; off, none, 0 or false stop it querying any. |
DRAWIO_ELK_URL |
Optional: Tool server: where the ELK layout bundle is downloaded from on first use. |
DRAWIO_SHAPE_INDEX_URL |
Optional: Tool server: where the shape index is fetched from when no local copy is present. |
The draw.io team's own MCP server, from the jgraph/drawio-mcp repository. An assistant uses it to produce draw.io diagrams (flowcharts, architecture and network drawings, org charts, sequence and UML diagrams) and can look up the right shape among about 10,000 in draw.io's libraries (AWS, Azure, GCP, Cisco, Kubernetes, P&ID, electrical, BPMN) to get its exact style string.
There are two servers. The MCP App Server is hosted at https://mcp.draw.io/mcp and needs no install or sign-in. Its create_diagram tool takes draw.io XML or Mermaid (28 diagram types) and shows the result as an interactive viewer inside the chat in hosts that support the MCP Apps extension (Claude.ai, ChatGPT, VS Code 1.109+, Cursor 2.6+); other hosts, such as Claude Code, Copilot CLI or OpenCode, get a link that opens the diagram in draw.io. The same server can be run yourself with Node.js, the jgraph/drawio-mcp Docker image or Cloudflare Workers.
The MCP Tool Server is the npm package @drawio/mcp, started with npx. It takes XML, CSV or Mermaid, packs the diagram into a draw.io URL and opens it in the full editor in your default browser (the code launches it itself with open, xdg-open or start). It also reads and replaces single pages of a local multi-page .drawio file. Version 1.10.0 has eight tools; with create_diagram from the App Server the two share nine.
Optional layout passes tidy XML diagrams: ELK re-arranges the nodes, libavoid reroutes connectors around shapes. The tool server's code also reads DRAWIO_SHAPE_INDEX_URL, a setting the README leaves out, which sets where search_shapes loads its shape index from (by default jsDelivr's copy of the repository's main branch).
| To run it yourself | Node.js 18+ |
|---|---|
| Runs on | macOS, Windows, Linux |
| Also |
|
The hosted endpoint needs nothing installed. To self-host the App Server, start it with `docker run --rm -p 127.0.0.1:3001:3001 jgraph/drawio-mcp` (or `npm start` in mcp-app-server of a clone) and connect clients to http://localhost:3001/mcp. Claude.ai cannot reach localhost, so its docs use a tunnel (`npx cloudflared tunnel --url http://localhost:3001`).
Suits anyone who wants an assistant to draw diagrams that stay editable in draw.io. The hosted endpoint is the quickest start and shows diagrams in the chat, but the diagram text goes to draw.io's server; pick the npm tool server or a self-hosted App Server when diagrams must stay on your machine, and the tool server when you need CSV input, the full editor, or edits to pages of existing .drawio files. It only produces and edits diagrams; it does not export PNG, SVG or PDF (the repository's assistant plugins do that through draw.io Desktop).
8 only read, 1 can delete or overwrite. A ? marks an optional parameter.
create_diagramsearch_shapesquery: stringlimit?: numberget_drawio_referenceformat: enumopen_drawio_xmlcontent: stringlightbox?: booleandark?: enumpostLayout?: enumdirection?: enumrouting?: enumopen_drawio_csvcontent: stringlightbox?: booleandark?: enumopen_drawio_mermaidcontent: stringpostLayout?: enumlightbox?: booleandark?: enumlist_pagespath: stringget_pagepath: stringpage: stringset_page deletespath: stringpage: stringcontent: string