# drawio-mcp

Generates and edits draw.io XML files straight from natural language prompts. Helpful when you need architecture, UML, or flowchart files in .drawio format.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: yohasacura
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/yohasacura/drawio-mcp
- Updated: 2026-02-09
- HTML: https://affpapa.org/en/nevibecode/mcp/drawio-mcp

## What it does

The server turns text prompts into structured diagram files compatible with diagrams.net. Its interface includes five primary tools: `diagram` handles file lifecycle, `draw` manages nodes and edges, `style` adjusts visual themes, `layout` applies positioning algorithms, and `inspect` queries graph details. Python 3.11 or higher is strictly required in your environment.

It packs over 310 shape templates, 44 connector varieties, and 21 palette themes. Positioning engines cover Sugiyama DAG, trees, grids, and obstacle-avoiding orthogonal edge routing. You can also run layout cleanup to fix overlaps and misaligned labels. Missing a modern Python setup will prevent the server from starting.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add drawio-mcp -- uvx drawio-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from drawio-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add drawio-mcp -- uvx drawio-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from drawio-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "drawio-mcp": {
            "command": "uvx",
            "args": [
                "drawio-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from drawio-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "drawio-mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "drawio-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from drawio-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add drawio-mcp uvx drawio-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from drawio-mcp <command>

## When to use it
- build flowcharts with conditional branching into `.drawio` files
- generate cloud infrastructure diagrams for AWS or Kubernetes
- restructure and align nodes in existing diagram files
- construct UML class structures or database ER schemas

## Example prompts
- Build a user authentication flowchart with failure branches and save it as auth.drawio
- Create an AWS cloud architecture diagram with API Gateway, Lambda, and DynamoDB in aws.drawio
- Generate a UML class diagram for User, Order, and Product, then save to models.drawio

## Similar
- [Reactive Resume](https://affpapa.org/en/nevibecode/mcp/reactive-resume.md) — MCP server · ★ 44908
- [Sui Knowledge Base (kapa.ai)](https://affpapa.org/en/nevibecode/mcp/sui-knowledge-base-kapaai.md) — MCP server · ★ 7785
- [Claude Code Ultimate Guide](https://affpapa.org/en/nevibecode/mcp/claude-code-ultimate-guide.md) — MCP server · ★ 6258
- [Zotero MCP](https://affpapa.org/en/nevibecode/mcp/zotero-mcp.md) — MCP server · ★ 5585
- [RevoGrid DataGrid MCP Pro](https://affpapa.org/en/nevibecode/mcp/revogrid-datagrid-mcp-pro.md) — MCP server · ★ 3451
- [Claude Code Explorer MCP](https://affpapa.org/en/nevibecode/mcp/codeaashu-claude-code-explorer-mcp.md) — MCP server · ★ 3412

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