Skip to main content

draw.io MCP server and plugins for AI assistants

The official draw.io MCP (Model Context Protocol) server and plugins let AI assistants create draw.io diagrams in the .drawio format. Choose the option that fits your assistant. The setup for each assistant is on the draw.io for AI assistants page.

OptionWorks inYou get
MCP App Server, hosted at https://mcp.draw.io/mcpClaude, ChatGPT, VS Code with GitHub Copilot, CursorAn interactive diagram in the chat
Plugin with the draw.io skillClaude Code, Codex CLI, GitHub Copilot CLI, Cursor, Antigravity, OpenCode.drawio files in your project, PNG, SVG or PDF exports, browser links
MCP Tool Server, npx @drawio/mcpClaude Desktop, Claude Code, VS Code, Cursor, OpenCode and other MCP clientsEach diagram opens in the draw.io editor in your browser
Self-hosted MCP App Server, with Docker, Node.js or Cloudflare WorkersThe same apps as the hosted MCP App ServerThe MCP App Server on your own server
Project instructionsClaude ProjectsA link that opens the diagram in draw.io, with no installation

Show diagrams in the chat​

Use the MCP App Server if you want diagrams to appear in your chats, in Claude, ChatGPT, GitHub Copilot in VS Code, Cursor and other assistants that show apps in the conversation. Assistants that run in a terminal answer with a link that opens the diagram in draw.io. To edit the diagram, click Open in draw.io and it will open in a new tab in the draw.io editor.

To use: In Claude, connect draw.io from the connectors directory. In other assistants, add the hosted endpoint https://mcp.draw.io/mcp as a remote MCP server. See the setup for each assistant.

The hosted server needs no account and doesn't store your diagrams. See the privacy policy for draw.io in AI assistants.

Quick diagrams: Ask for a quick flowchart or swimlane diagram, for example "Quickly draw…" or "A rough sketch is fine." The assistant then only lists the steps, and the MCP App Server lays out the diagram, three to four times faster. See ask for a quick diagram.

Create diagram files in your project​

Install the draw.io plugin in Claude Code, Codex CLI, GitHub Copilot CLI or Antigravity to generate .drawio files from your prompts. No MCP setup is required.

AssistantInstall
Claude Code/plugin marketplace add jgraph/drawio-mcp, then /plugin install drawio@drawio
Codex CLIcodex plugin marketplace add jgraph/drawio-mcp, then codex plugin add drawio@drawio
GitHub Copilot CLIcopilot plugin marketplace add jgraph/drawio-mcp, then copilot plugin install drawio@drawio
CursorCopy the plugins/cursor folder to ~/.cursor/plugins/local/drawio and reload the window. The Cursor plugin also shows diagrams in the Agent chat.
Antigravityagy plugin install https://github.com/jgraph/drawio-mcp/tree/main/plugins/antigravity

Name the output in your prompt, for example "Draw the login flow as PNG" or "Draw the ER diagram of a blog as a link I can open in the browser". Without one, you get a .drawio file. Exported files contain the diagram, so they stay editable in draw.io.

Install draw.io Desktop to export to image files and to lay out diagrams automatically. It is not needed for .drawio files or links.

Refer to the documentation for installation and usage instructions for each assistant.

Open diagrams in the draw.io editor​

The MCP Tool Server is an npm package that allows any MCP client, such as Claude Desktop, to generate draw.io diagrams and open them in a new tab in the draw.io editor in your browser. It can import CSV data and Mermaid diagrams, and read and change single pages of .drawio files on your computer.

To use: Install with npx @drawio/mcp. This needs Node.js.

Refer to the documentation for configuration and usage options.

Run the MCP App Server on your own server​

Run the MCP App Server with the jgraph/drawio-mcp Docker image to keep your diagrams on your own network:

docker run --rm -p 127.0.0.1:3001:3001 jgraph/drawio-mcp

VS Code, Cursor and other assistants on your computer connect to http://localhost:3001/mcp. Claude and ChatGPT need a public HTTPS address, for example through a tunnel. Refer to the documentation to run it with Node.js or Cloudflare Workers.

Generate an embedded diagram URL​

Provide Claude.ai with project instructions so that it can generate a draw.io diagram embedded in a URL via Python, with no installation necessary. This supports the .drawio format as well as importing Mermaid code and CSV data.

Refer to the documentation for setup and usage instructions.

Input formats​

The assistant writes each diagram in one of these formats. It picks one by itself, and you can ask for a format.

OptionFormats the assistant writes
MCP App Serverdraw.io XML, Mermaid, PlantUML, CSV, and a list of steps for a quick flowchart or swimlane diagram
Plugin with the draw.io skilldraw.io XML and Mermaid
MCP Tool Serverdraw.io XML, Mermaid and CSV
Project instructionsdraw.io XML, Mermaid and CSV

draw.io XML is the content of a .drawio file. See the .drawio file format.

Output formats​

OutputHow to get it
Interactive diagram in the chatThe MCP App Server in Claude, ChatGPT, VS Code or Cursor
Diagram in the draw.io editorOpen in draw.io in the viewer, the MCP Tool Server, or the link in a terminal
PNG or SVG fileThe small arrow next to Download in the viewer, then Download PNG or Download SVG, in apps that allow downloads. Or Open in draw.io, then File > Export as. Or the plugins with draw.io Desktop.
PDF fileOpen in draw.io, then File > Export as. Or the plugins with draw.io Desktop.
.drawio fileDownload in the viewer, in apps that allow downloads, or the plugins
draw.io XML on the clipboardCopy in the viewer. Paste it into draw.io.
PNG image on the clipboardThe small arrow next to Copy in the viewer, then Copy as PNG, in apps that allow it

When no diagram appears​

  • Claude: Check that the draw.io connector is turned on for the chat, in the chat's connector menu.
  • ChatGPT: Type @, pick draw.io, then ask for the diagram.
  • VS Code: Use Copilot Chat in Agent mode, and check that the server is started.
  • Terminals, such as GitHub Copilot CLI and Codex CLI: There is no viewer in a terminal. Open the link, or use the plugin to create files.