Draw.io

v1.0.0Developer Toolsstable

A Model Context Protocol (MCP) server for programmatic diagram generation using Draw.io (Diagrams.net). This server generates Draw.io XML directly — no browser extension or Draw.io instance required.

aiazurediagrammcpmcp-server
Share:
71
Stars
0
Downloads
0
Weekly
0/5

What is Draw.io?

Draw.io is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server for programmatic diagram generation using draw.io (diagrams.net). this server generates draw.io xml directly — no browser extension or draw.io instance required.

A Model Context Protocol (MCP) server for programmatic diagram generation using Draw.io (Diagrams.net). This server generates Draw.io XML directly — no browser extension or Draw.io instance required.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A Model Context Protocol (MCP) server for programmatic diagr

Use Cases

Programmatic diagram generation with Draw.io
Create flowcharts and architecture diagrams via API
simonkurtz-MSFT

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 15, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx drawio

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Draw.io

The Draw.io MCP server enables AI agents to programmatically generate and edit Draw.io (Diagrams.net) diagrams without requiring a browser extension or running Draw.io instance. It exposes over a dozen tools covering shape discovery across 700+ Azure icons, cell and edge manipulation, page and layer management, and XML import/export. This is ideal for teams who want Claude or other AI assistants to automatically produce architecture diagrams, flowcharts, or network maps as part of a developer workflow.

Prerequisites

  • Deno runtime installed (https://deno.com) for running from source, or Docker for the container approach
  • Git to clone the repository: https://github.com/simonkurtz-MSFT/drawio-mcp-server
  • An MCP-compatible client such as Claude Desktop or VS Code with the MCP extension
  • No external API keys required — the server generates Draw.io XML locally
1

Clone the repository

Clone the Draw.io MCP server source code from GitHub so you can run it locally with Deno.

git clone https://github.com/simonkurtz-MSFT/drawio-mcp-server.git
cd drawio-mcp-server
2

Install Deno

The server is written in TypeScript and runs on Deno. Install it via the official installer if you don't already have it.

curl -fsSL https://deno.land/install.sh | sh
3

Run the server (stdio mode)

Start the MCP server in stdio transport mode, which is what Claude Desktop and most MCP clients expect. The server requires network, read, and environment permissions.

deno run --allow-net --allow-read --allow-env src/index.ts
4

Configure Claude Desktop

Add the server to your claude_desktop_config.json so Claude Desktop can launch it automatically. Replace the path with the absolute path where you cloned the repo.

{
  "mcpServers": {
    "drawio": {
      "command": "deno",
      "args": [
        "run",
        "--allow-net",
        "--allow-read",
        "--allow-env",
        "/absolute/path/to/drawio-mcp-server/src/index.ts"
      ]
    }
  }
}
5

(Optional) Run via Docker

If you prefer Docker over Deno, pull the pre-built image and expose port 8080. Then configure your MCP client to connect via HTTP instead of stdio.

docker pull simonkurtzmsft/drawio-mcp-server:latest
docker run -d --name drawio-mcp-server -p 8080:8080 simonkurtzmsft/drawio-mcp-server:latest
6

Restart Claude Desktop and verify

Restart Claude Desktop after saving the config. You should see the Draw.io tools available (search-shapes, add-cells, export-diagram, etc.) when you ask Claude to create a diagram.

Draw.io Examples

Client configuration (Claude Desktop)

Add this block to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent path on Windows/Linux.

{
  "mcpServers": {
    "drawio": {
      "command": "deno",
      "args": [
        "run",
        "--allow-net",
        "--allow-read",
        "--allow-env",
        "/Users/yourname/drawio-mcp-server/src/index.ts"
      ]
    }
  }
}

Prompts to try

Ask Claude to create or modify diagrams using natural language. The server maintains diagram state through XML passed back and forth between tool calls.

- "Create a three-tier web architecture diagram with a load balancer, two app servers, and a database"
- "Search for Azure Container Instances icons and add one to my current diagram"
- "Add an HTTPS edge between the web tier and the API tier in my diagram"
- "Export my current diagram as Draw.io XML so I can open it in diagrams.net"
- "Create a new page in the diagram and draw a sequence flow for user login"

Troubleshooting Draw.io

Deno permission errors when starting the server

Ensure you pass all three flags: --allow-net, --allow-read, and --allow-env. The server needs network access to serve MCP, read access for the icon library, and env access for configuration variables.

Claude Desktop does not show Draw.io tools after adding config

Verify the absolute path to src/index.ts is correct and Deno is on your PATH. Run the command manually in your terminal first to confirm it starts without errors, then restart Claude Desktop.

Diagram state is lost between tool calls

The server is stateless per call by design. You must pass the full diagram_xml returned from one tool call into the next tool call. Ask Claude to carry forward the diagram XML explicitly in multi-step diagram edits.

Frequently Asked Questions about Draw.io

What is Draw.io?

Draw.io is a Model Context Protocol (MCP) server that model context protocol (mcp) server for programmatic diagram generation using draw.io (diagrams.net). this server generates draw.io xml directly — no browser extension or draw.io instance required. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Draw.io?

Follow the installation instructions on the Draw.io GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Draw.io?

Draw.io works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Draw.io free to use?

Yes, Draw.io is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "drawio": { "command": "npx", "args": ["-y", "drawio"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Draw.io?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides