Install
$ claude mcp add --scope user drawio -- npx @next-ai-drawio/mcp-server@latest--scope user makes the tools available in every project. Without it, they exist only in the folder where you ran the command.
Or install it as a plugin from the Claude Code community marketplace (Claude Code 2.1.275 or later):
/plugin install next-ai-drawio --marketplace anthropics/claude-plugins-communityRestart the client, then ask, for example, "Read this repo and draw its architecture". The preview opens in your browser and the diagram appears as it is drawn.
What it does
Draws from your project
The agent reads your code and documents with its own tools. Existing .drawio and .drawio.svg files open too.
Every change is a version
The AI's changes are outlined for a few seconds and one Ctrl+Z takes them back. The last 20 versions sit next to the canvas to restore or compare.
You and the AI share the canvas
Edit by hand at any time, or select shapes and say "these". The AI reads your edits before it edits again.
Real icons
The web app's drawing rules and shape libraries for AWS, Azure, GCP, Kubernetes, Cisco and more, so the AI uses real icon names.
Checks its own work
The AI can look at a screenshot of the rendered diagram and fix overlapping shapes.
Export, offline and saved
Save .drawio, .png, .svg or .drawio.svg. The draw.io editor ships inside the package and works offline, and every diagram is saved for a later conversation.
Choosing a draw.io MCP server
Several MCP servers draw draw.io diagrams. As of October 2026 they differ like this:
| Server | How you see and change the diagram | A good fit when |
|---|---|---|
This server, @next-ai-drawio/mcp-server | How you see and change the diagramA live draw.io canvas in your browser. The AI reads it back, including your hand edits and selection; its changes are outlined, Ctrl+Z takes them back, and earlier versions can be restored | A good fit whenYou and the AI take turns on the same diagram |
draw.io's official @drawio/mcp | How you see and change the diagramOpens each diagram from XML, CSV or Mermaid in the draw.io editor in a new tab; no tool reads it back | A good fit whenYou want the diagram in the full draw.io editor and edit it yourself from there |
draw.io's hosted MCP app, https://mcp.draw.io/mcp | How you see and change the diagramShows the diagram inside the chat in Claude.ai, ChatGPT, VS Code or Cursor, with nothing to install; the diagram is sent to draw.io's server | A good fit whenYou work in a chat app and want to see the diagram in the conversation |
| draw.io's plugin for Claude Code, Codex CLI and Copilot CLI | How you see and change the diagramA skill that writes .drawio files; PNG, SVG and PDF export needs draw.io Desktop | A good fit whenYou want diagram files in your repository without an MCP server |
lgazo/drawio-mcp-server | How you see and change the diagramA draw.io editor on localhost, or your own draw.io through a browser extension; tools create, read, update and delete single shapes, layers and pages | A good fit whenYou want fine-grained tools, several documents at once, or Mermaid import |
Tools
| Tool | What it does |
|---|---|
start_session | Open the preview and return the drawing guide; session_id continues a saved diagram |
create_new_diagram | Draw a new diagram from mxCell XML |
edit_diagram | Add, update or delete cells by id, all or nothing |
get_diagram | The current XML, including your edits in the browser |
get_selection | The shapes you selected in the preview |
screenshot_diagram | A PNG of a page, for the AI to check |
load_diagramexport_diagram | Open a .drawio or .drawio.svg file; save .drawio, .png, .svg or .drawio.svg |
restore_version | Go back to an earlier version; a redo stays possible |
list_saved_diagrams | Diagrams saved by earlier sessions, newest first |
get_drawing_guideget_shape_library | The drawing rules again; the icon styles of a library such as aws4 |
list_pagesadd_pagerename_pagedelete_page | Pages (tabs) |
Configuration and troubleshooting
Environment variables, your own drawing rules, a self-hosted draw.io and fixes for common problems are in the docs and the README.