Draw.io

v1.0.0Developer Toolsstable

Enables AI agents to programmatically create, modify, and analyze Draw.io diagrams through the Model Context Protocol. Supports generating architectural diagrams, flowcharts, and visualizations with bidirectional communication between AI systems and

draw-io-mcp-servermcpai-integration
Share:
1,243
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 enables ai agents to programmatically create, modify, and analyze draw.io diagrams through the model context protocol. supports generating architectural diagrams, flowcharts, and visualizations with b...

Enables AI agents to programmatically create, modify, and analyze Draw.io diagrams through the Model Context Protocol. Supports generating architectural diagrams, flowcharts, and visualizations with bidirectional communication between AI systems and

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

Features

  • Enables AI agents to programmatically create, modify, and an

Use Cases

Create and modify diagrams programmatically through AI.
Generate architectural diagrams and flowcharts.
Visualize system designs with bidirectional AI communication.
lgazo

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx draw-io-mcp-server

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 (drawio-mcp-server) enables AI agents to programmatically create, inspect, and modify Draw.io diagrams through the Model Context Protocol, establishing a bidirectional communication channel between AI systems and the Draw.io desktop application or VS Code extension. It supports generating architectural diagrams, flowcharts, sequence diagrams, and cloud infrastructure visualisations using built-in AWS, GCP, Azure, and Cisco stencil libraries that are auto-discovered at runtime. Multiple AI agents can safely operate on the same diagram concurrently thanks to FIFO serialisation, and diagrams can be imported and exported in XML, SVG, PNG, and Mermaid formats.

Prerequisites

  • Node.js 18 or later (for npx)
  • Draw.io desktop application installed, OR the Draw.io VS Code extension
  • The Draw.io app or VS Code extension must be open with a file for the MCP server to connect to
  • An MCP-compatible client such as Claude Desktop, Claude Code, or Cursor
1

Install Draw.io desktop or VS Code extension

The MCP server connects to a running Draw.io instance. Install the desktop app from diagrams.net or the Draw.io Integration extension in VS Code, then open a .drawio or .xml diagram file.

2

Test the server via npx

Run the server once from the terminal to confirm it starts and can connect to Draw.io. The --editor flag is required to enable the bidirectional editing protocol.

npx -y drawio-mcp-server --editor
3

Add the server to your MCP client config

Add the following block to your claude_desktop_config.json or equivalent MCP host configuration file.

{
  "mcpServers": {
    "drawio": {
      "command": "npx",
      "args": ["-y", "drawio-mcp-server", "--editor"]
    }
  }
}
4

For Claude Code, use the mcp add-json command

Claude Code users can register the server with a single CLI command.

claude mcp add-json drawio '{"type":"stdio","command":"npx","args":["-y","drawio-mcp-server","--editor"]}'
5

Restart your MCP client and open a diagram

Restart the MCP client. Ensure a Draw.io file is open in the desktop app or VS Code. The server's tools will be ready: document discovery, shape inspection, shape/edge editing, page and layer management, and import/export.

Draw.io Examples

Client configuration

claude_desktop_config.json entry for the Draw.io MCP server.

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

Prompts to try

These prompts generate, modify, and inspect Draw.io diagrams through the MCP tools.

- "Create an AWS architecture diagram showing an ALB, two EC2 instances, an RDS database, and an S3 bucket"
- "Add a new page called 'Data Flow' to the open diagram and draw a sequence diagram of the login process"
- "Create a three-tier web application diagram with presentation, logic, and data layers on separate layers"
- "Import this Mermaid flowchart into the current diagram: graph TD; A-->B; B-->C"
- "List all pages in the open diagram and describe the shapes on each page"
- "Export the current diagram page as SVG"

Troubleshooting Draw.io

Server starts but cannot find an open Draw.io document

Ensure the Draw.io desktop app or VS Code extension is open and has a diagram file loaded. The MCP server connects to a running Draw.io instance — it cannot create diagrams without an open host application.

npx drawio-mcp-server fails with a package not found error

Run `npm install -g drawio-mcp-server` to install the package globally, then restart and try the npx command again. Alternatively, pin the version: `npx -y drawio-mcp-server@latest --editor`.

Concurrent agent edits corrupt the diagram

The server uses FIFO serialisation for safe concurrent access, but ensure all agents are using the same server instance (not separate server processes). If running multiple AI agents, route all their diagram calls through the same MCP server process.

Frequently Asked Questions about Draw.io

What is Draw.io?

Draw.io is a Model Context Protocol (MCP) server that enables ai agents to programmatically create, modify, and analyze draw.io diagrams through the model context protocol. supports generating architectural diagrams, flowcharts, and visualizations with bidirectional communication between ai systems and 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 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": { "draw-io-mcp-server": { "command": "npx", "args": ["-y", "draw-io-mcp-server"] } } }

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