# Next AI Draw.io

This MCP server lets an agent build draw.io diagrams from project files and show them on a browser canvas you can edit. Useful when you and the agent share diagram work.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 36398
- Author: DayuanJiang
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/DayuanJiang/next-ai-draw-io/tree/HEAD/packages/mcp-server
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/next-ai-drawio

## What it does

The agent uses its own tools to read project code and documents, then creates a diagram on a draw.io canvas in your browser. You can edit the canvas yourself, and the server reads those changes before the agent makes another edit. Existing `.drawio` and `.drawio.svg` files can be loaded; diagrams can be saved as `.drawio`, `.png`, `.svg`, or `.drawio.svg`.

Agent changes are briefly marked on the canvas, and Ctrl+Z reverts them. The server can inspect a diagram screenshot for overlaps and restore earlier versions. Add your own drawing guidance in `~/.next-ai-drawio/instructions.md`. It runs through `npx`, with the draw.io editor bundled in the package, and needs an MCP-capable client. Codex asks for approval before tools that modify a diagram run.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add next-ai-drawio -- npx -y @next-ai-drawio/mcp-server
```

### Codex

**Platform CLI**
```bash
codex mcp add mcp-server -- npx -y @next-ai-drawio/mcp-server
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@next-ai-drawio/mcp-server"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@next-ai-drawio/mcp-server"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp-server npx -y @next-ai-drawio/mcp-server
```

## When to use it
- Draw a project architecture from its code and documents
- Load and revise an existing `.drawio` diagram
- Ask the agent to change shapes selected on the canvas
- Inspect a diagram screenshot and fix overlaps
- Export a diagram as `.png` or `.svg`

## Example prompts
- Read this project and draw its architecture on the draw.io canvas.
- Open `architecture.drawio` and rearrange the selected shapes.
- Check a screenshot of the diagram and fix overlapping elements.

## Similar
- [tldraw](https://affpapa.org/en/nevibecode/mcp/tldraw.md) — MCP server · ★ 51091
- [Figma-Context-MCP](https://affpapa.org/en/nevibecode/mcp/figma-context-mcp.md) — MCP server · ★ 16062

From the same set: [dayuanjiang/next-ai-draw-io](https://affpapa.org/en/nevibecode/by/dayuanjiang/next-ai-draw-io.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
