Draw.io
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.
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
Maintainer
Works with
Installation
Manual Installation
npx drawioConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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-serverInstall 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 | shRun 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.tsConfigure 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"
]
}
}
}(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:latestRestart 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.
Draw.io Alternatives — Similar Developer Tools Servers
Looking for alternatives to Draw.io? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Draw.io in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.