Next AI Draw.io

A draw.io MCP server for Claude Code, Cursor, Codex and VS Code

Your AI agent reads your project's files and draws the diagram on a live draw.io canvas in your browser. Edit it by hand at any time: the agent reads your changes before it edits again.

$ claude mcp add --scope user drawio -- npx @next-ai-drawio/mcp-server@latest

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-community

Restart 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:

ServerHow you see and change the diagramA good fit when
This server, @next-ai-drawio/mcp-serverHow 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 restoredA good fit whenYou and the AI take turns on the same diagram
draw.io's official @drawio/mcpHow 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 backA 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/mcpHow 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 serverA 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 CLIHow you see and change the diagramA skill that writes .drawio files; PNG, SVG and PDF export needs draw.io DesktopA good fit whenYou want diagram files in your repository without an MCP server
lgazo/drawio-mcp-serverHow 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 pagesA good fit whenYou want fine-grained tools, several documents at once, or Mermaid import

Tools

ToolWhat it does
start_sessionOpen the preview and return the drawing guide; session_id continues a saved diagram
create_new_diagramDraw a new diagram from mxCell XML
edit_diagramAdd, update or delete cells by id, all or nothing
get_diagramThe current XML, including your edits in the browser
get_selectionThe shapes you selected in the preview
screenshot_diagramA PNG of a page, for the AI to check
load_diagramexport_diagramOpen a .drawio or .drawio.svg file; save .drawio, .png, .svg or .drawio.svg
restore_versionGo back to an earlier version; a redo stays possible
list_saved_diagramsDiagrams saved by earlier sessions, newest first
get_drawing_guideget_shape_libraryThe drawing rules again; the icon styles of a library such as aws4
list_pagesadd_pagerename_pagedelete_pagePages (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.