What next-ai-draw-io MCP server does
The next-ai-draw-io MCP server lets an AI agent create and modify diagrams on a draw.io canvas. Prompts can produce architecture diagrams, flowcharts, sequence diagrams, and other visualizations. The server uses the same drawing rules and icon libraries as the associated web application, including AWS, Azure, GCP, and Kubernetes libraries.
AI-generated changes appear on the canvas as they are made. The agent can also work with selected shapes, allowing a request to target part of an existing diagram rather than replacing the whole document. The resulting file remains a regular draw.io diagram that can be edited directly in the canvas.
How it works
Configure the server as an MCP server in the client that runs your AI agent. The supplied command uses npx to start @next-ai-drawio/mcp-server@latest. After installation, ask the agent for a diagram or an edit, and the preview opens in the bundled draw.io editor.
The server includes a screenshot capability so the agent can inspect the rendered diagram and correct it. It also exposes version history, allowing AI changes to be compared, restored, or undone. A diagram can contain multiple pages, and the agent can request downloads in .drawio, .png, .svg, or .drawio.svg formats.
The editor ships inside the package, so the preview works offline after installation. Set DRAWIO_BASE_URL when the preview should use an external draw.io instance instead. Diagrams are automatically saved under ~/.next-ai-drawio/, which allows work to survive a restart.
Setup and configuration
Add the following MCP entry to a compatible client configuration:
{
"mcpServers": {
"drawio": {
"command": "npx",
"args": ["@next-ai-drawio/mcp-server@latest"]
}
}
}
Claude Code can add it with:
claude mcp add --scope user drawio -- npx @next-ai-drawio/mcp-server@latest
The package is also available as a Claude Code community-marketplace plugin for Claude Code 2.1.275 or later. Personal drawing rules can be placed in ~/.next-ai-drawio/instructions.md.
Tools and capabilities
The next-ai-draw-io MCP server supports:
- Generating and editing draw.io diagrams through natural-language requests
- Working with selected shapes and reading the selected canvas content
- Inspecting a rendered diagram with a screenshot tool
- Undoing AI changes and managing version history
- Creating and editing multi-page diagrams
- Exporting diagrams as
.drawio, .png, .svg, or .drawio.svg
- Using AWS, Azure, GCP, Kubernetes, and other available icon libraries
- Saving diagrams automatically for recovery after a restart
It is intended for AI-agent workflows where the agent needs to produce a visual artifact while retaining draw.io's manual editing model.
Limitations and notes
The README does not specify named MCP tool identifiers or a required API key for the MCP package itself. It does note that capable language models are preferable because diagrams are generated as structured draw.io XML; smaller models may produce broken diagrams. The hosted web demo has a usage limit, but that limitation is described for the demo rather than the MCP server.
The documented client setup names Claude Desktop, Claude Code, Cursor, Codex, and VS Code. The server is distributed through npm and requires a client that can launch MCP servers through the shown command configuration.