Labsco
lgazo logo

Draw.io

β˜… 1,300

from lgazo

Integrates Draw.io's diagramming capabilities with AI agents, enabling programmatic diagram control and analysis.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

Draw.io MCP server

Let's do some Vibe Diagramming with the most wide-spread diagramming tool called Draw.io (Diagrams.net).

Discord channel Build project Verified on MseeP Version

Key Highlights

  • Enable Draw.io MCP in IFrames v2.1.0

  • AWS, GCP, Azure, Cisco19, and CiscoSafe stencils auto-discovered at runtime from drawio's sidebar v2.1.0

  • Multi-document targeting with list-documents and target_document selectors for multi-tab workflows v2.1.0

  • Multi-page targeting with required target_page selectors for page-scoped tools v2.1.0

  • Per-document FIFO serialization for live operations, so multiple agents can work on different files safely v2.1.0

  • Page management tools: list-pages, get-current-page, create-page, copy-page, rename-page v2.1.0

  • Import, embed, or expand Mermaid diagrams v2.1.0

  • Firefox support is back, TLS mode is necessary v2.1.0

  • Server supports TLS mode and optionally generates self-signed certificates v2.1.0

  • Import and export diagrams from/to XML, SVG (with embedded XML), or PNG (with embedded XML) v2.0.0

  • Edge geometry control with waypoints and automatic self-connector routing v2.0.0

  • Parent-child relationships for nested shapes and grouping v2.0.0

  • Unified Server and Extension in the same mono-repo v2.0.0

  • Built-in Draw.io editor - no browser extension required

  • MCP server that lets AI agents control Draw.io diagrams

  • Programmatic diagram creation, inspection, and modification via MCP tools

  • Layer management for complex diagrams

  • Works with any MCP client (Claude Desktop, Claude Code, Zed, Codex, etc.)

Introduction

The Draw.io MCP server brings Draw.io diagramming capabilities to AI agents. It provides MCP tools that can create, read, update, and delete diagram elements - letting AI assistants build architectural diagrams, flowcharts, and visual documentation automatically.

Two ways to use:

  1. Built-in editor - Server hosts Draw.io directly, accessible in your browser
  2. Browser extension - Connect to Draw.io running in your browser via extension

Experimental: integration with the draw.io desktop (Electron) app is in progress but currently blocked by an upstream CSP issue β€” see DESKTOP.md.

Features

The server provides MCP tools for:

  • Document discovery - list connected Draw.io document instances and route later calls to a specific tab/file instance
  • Diagram inspection - read shapes, pages, layers, and cell properties
  • Diagram modification - add/edit/delete shapes, edges, and labels on a target page
  • Page management - list pages, inspect the current page, create pages, copy pages, and rename pages without forcing a visible page switch on supported runtimes
  • Layer management - create, switch, and organize layers
  • Vendor shape coverage - AWS, GCP, Azure, Cisco19, and CiscoSafe stencils auto-discovered at runtime from drawio's sidebar, so agents can place icons like mxgraph.gcp2.cloud_run or mxgraph.cisco19.router without hand-curated catalogs
  • Built-in TLS β€” opt-in HTTPS + WSS with manual cert/key or auto-generated self-signed material via a per-user local CA. See CONFIG.md β†’ TLS.

See Tools Reference for the complete list of available tools.

Alternative: Browser Extension

Instead of the built-in editor, you can use the browser extension to connect to Draw.io running in your browser. This works with or without the --editor flag.

  1. Open Draw.io in your browser
  2. Install the Draw.io MCP Browser Extension:
  3. Ensure the extension is connected (green signal overlay on icon)

Configuration without --editor:

Copy & paste β€” that's it
{
  "mcpServers": {
    "drawio": {
      "command": "npx",
      "args": ["-y", "drawio-mcp-server"]
    }
  }
}

See the extension documentation for more details.

Experimental: Draw.io Desktop

Integration with the draw.io desktop (Electron) app is experimental and currently blocked end-to-end by an upstream CSP issue. The plugin loads inside draw.io desktop, but its WebSocket connection back to the MCP server is rejected by draw.io's hard-coded connect-src 'self' policy.

See DESKTOP.md for the full setup steps and the current limitation.

Related Resources

Configuration - CLI flags and advanced options

Tools Reference - Complete MCP tools documentation

Troubleshooting

Prompt examples

Contributing

Architecture

Development

Draw.io Desktop (experimental) - install path and known CSP limitation

Star History

<a href="https://star-history.com/#lgazo/drawio-mcp-server&Date"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=lgazo/drawio-mcp-server&type=Date&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=lgazo/drawio-mcp-server&type=Date" /> <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=lgazo/drawio-mcp-server&type=Date" /> </picture> </a>

Assessments

MSeeP.ai Security Assessment Badge