Skip to content
Back to search

drawio-mcp-server

MCP serverGitHubIncomplete

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/lgazo--drawio-mcp-server/badge.svg)](/listings/lgazo--drawio-mcp-server)

HTML

<a href="/listings/lgazo--drawio-mcp-server"><img src="/api/listings/lgazo--drawio-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Configure your MCP host

**Fastest path:**

- **Claude Code:** `/plugin marketplace add lgazo/drawio-mcp-server` then `/plugin install drawio`. - **Any other host:** `npx drawio-mcp-server install <host>` where `<host>` is `claude-code`, `claude-desktop`, `codex`, `zed`, `opencode`, or `all`.

See [docs/PLUGINS.md](./docs/PLUGINS.md) for the full reference, flags, and uninstall, and [docs/release.md](./docs/release.md) for how releases are cut.

<details> <summary>Manual install (JSON snippet, Claude Desktop example)</summary>

Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:

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

</details>

For other MCP clients and detailed configuration (including pnpm options), see [Configuration](./CONFIG.md).

2. Open the editor

After restarting your MCP host, open: **http://localhost:3000/**

3. Start diagramming

Example prompts you can try:

> "Create an event-driven architecture diagram showing a message queue with producers, consumers, and three backend services"

> "Create a three-page event-driven architecture diagram. Use three agents in parallel for service topology, message flow, and retry/failure handling, with each agent assigned to a separate target page."

> "Draw a CRUD API diagram with a database, API gateway, and four microservices with their endpoints"

> "Add a new layer called 'Background' and move all decorative elements to it, then create a new layer for annotations"

Your AI assistant can now control the diagram using MCP tools.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 23 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "drawio-mcp-server",
  3. "owner": { "name": "lgazo", "url": "https://github.com/lgazo" },
  4. "plugins": [
  5. {
  6. "name": "drawio",
  7. "source": {
  8. "source": "local",
  9. "path": "./packages/drawio-mcp-claude-plugin"
  10. },
  11. "description": "Draw.io MCP server + built-in editor + slash commands",
  12. "version": "0.2.0",
  13. "homepage": "https://github.com/lgazo/drawio-mcp-server",
  14. "keywords": ["drawio", "mcp", "diagrams", "diagramming", "architecture"],
  15. "license": "MIT",
  16. "category": "mcp",
  17. "policy": {
  18. "installation": "standard",
  19. "authentication": "none"
  20. }
  21. }
  22. ]
  23. }
README.md · README · 203 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Draw.io MCP server
  2. [English](./README.md) · [简体中文](./README.zh-CN.md)
  3. Let's do some Vibe Diagramming with the most wide-spread diagramming tool called Draw.io (Diagrams.net).
  4. [![Discord channel](https://shields.io/static/v1?logo=discord&message=draw.io%20mcp&label=chat&color=5865F2&logoColor=white)](https://discord.gg/dM4PWdf42q)
  5. [![Build project](https://github.com/lgazo/drawio-mcp-server/actions/workflows/server-ci.yml/badge.svg)](https://github.com/lgazo/drawio-mcp-server/actions/workflows/server-ci.yml)
  6. [![Verified on MseeP](https://mseep.ai/badge.svg)](https://mseep.ai/app/5fc2b7fe-8ceb-4683-97bd-6d31e07b5888)
  7. [![Version](https://img.shields.io/npm/v/drawio-mcp-server)](https://npmjs.com/package/drawio-mcp-server)
  8. [![Bundle size](https://img.shields.io/bundlephobia/minzip/drawio-mcp-server)](https://bundlephobia.com/package/drawio-mcp-server)
  9. ## Key Highlights
  10. - Browser extension UI and documentation localized to Simplified Chinese (zh-CN) ![v2.4.0](https://img.shields.io/badge/v2.4.0-blue)
  11. - Claude Code plugin: `/plugin marketplace add lgazo/drawio-mcp-server` then `/plugin install drawio`, with `/drawio-open` and `/drawio-status` slash commands ![v2.3.0](https://img.shields.io/badge/v2.3.0-blue)
  12. - `npx drawio-mcp-server install <host>` writes the MCP config for `claude-code`, `claude-desktop`, `codex`, `zed`, `opencode`, or `all` ![v2.3.0](https://img.shields.io/badge/v2.3.0-blue)
  13. - Document persistence tools: `set-document-title` and `save-document` ![v2.3.0](https://img.shields.io/badge/v2.3.0-blue)
  14. - Draw.io library API version compatibility mechanism
  15. - Enable Draw.io MCP in IFrames
  16. - AWS, GCP, Azure, Cisco19, and CiscoSafe stencils auto-discovered at runtime from drawio's sidebar
  17. - Multi-document targeting with `list-documents` and `target_document` selectors for multi-tab workflows
  18. - Multi-page targeting with required `target_page` selectors for page-scoped tools
  19. - Per-document FIFO serialization for live operations, so multiple agents can work on different files safely
  20. - Page management tools: `list-pages`, `get-current-page`, `create-page`, `copy-page`, `rename-page`
  21. - Import, embed, or expand [Mermaid](https://mermaid.js.org/) diagrams
  22. - Firefox support is back, TLS mode is necessary
  23. - Server supports TLS mode and optionally generates self-signed certificates
  24. - Import and export diagrams from/to XML, SVG (with embedded XML), or PNG (with embedded XML)
  25. - Edge geometry control with waypoints and automatic self-connector routing
  26. - Parent-child relationships for nested shapes and grouping
  27. - Unified Server and Extension in the same mono-repo
  28. - Built-in Draw.io editor - no browser extension required
  29. - MCP server that lets AI agents control Draw.io diagrams
  30. - Programmatic diagram creation, inspection, and modification via MCP tools
  31. - Layer management for complex diagrams
  32. - Works with any MCP client (Claude Desktop, Claude Code, Zed, Codex, etc.)
  33. ## Introduction
  34. 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.
  35. Two ways to use:
  36. 1. **Built-in editor** - Server hosts Draw.io directly, accessible in your browser
  37. 2. **Browser extension** - Connect to Draw.io running in your browser via extension
  38. Experimental: integration with the **draw.io desktop (Electron) app** is in progress but currently blocked by an upstream CSP issue — see [DESKTOP.md](./DESKTOP.md).
  39. ## Requirements
  40. - **Node.js** (v22 or higher; tested against v22 LTS and v24 LTS) - Runtime environment for the MCP server
  41. - **MCP client** - Claude Desktop, Claude Code, Zed, Codex, OpenCode, or any MCP-compatible host
  42. ### For Built-in Editor
  43. No additional requirements - runs out of the box with `--editor` flag.
  44. ### For Browser Extension
  45. - **Browser extension** - [drawio-mcp-extension](./packages/drawio-mcp-extension/README.md)
  46. - Draw.io open in your browser
  47. ### Optional
  48. - **pnpm** - Preferred package manager (npm works fine too)
  49. ## Quick Start
  50. ### 1. Configure your MCP host
  51. **Fastest path:**
  52. - **Claude Code:** `/plugin marketplace add lgazo/drawio-mcp-server` then `/plugin install drawio`.
  53. - **Any other host:** `npx drawio-mcp-server install <host>` where `<host>` is `claude-code`, `claude-desktop`, `codex`, `zed`, `opencode`, or `all`.
  54. See [docs/PLUGINS.md](./docs/PLUGINS.md) for the full reference, flags, and uninstall, and [docs/release.md](./docs/release.md) for how releases are cut.
  55. <details>
  56. <summary>Manual install (JSON snippet, Claude Desktop example)</summary>
  57. Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
  58. ```json
  59. {
  60. "mcpServers": {
  61. "drawio": {
  62. "command": "npx",
  63. "args": ["-y", "drawio-mcp-server", "--editor"]
  64. }
  65. }
  66. }
  67. ```
  68. </details>
  69. For other MCP clients and detailed configuration (including pnpm options), see [Configuration](./CONFIG.md).
  70. ### 2. Open the editor
  71. After restarting your MCP host, open: **http://localhost:3000/**
  72. ### 3. Start diagramming
  73. Example prompts you can try:
  74. > "Create an event-driven architecture diagram showing a message queue with producers, consumers, and three backend services"
  75. > "Create a three-page event-driven architecture diagram. Use three agents in parallel for service topology, message flow, and retry/failure handling, with each agent assigned to a separate target page."
  76. > "Draw a CRUD API diagram with a database, API gateway, and four microservices with their endpoints"
  77. > "Add a new layer called 'Background' and move all decorative elements to it, then create a new layer for annotations"
  78. Your AI assistant can now control the diagram using MCP tools.
  79. ## Features
  80. The server provides MCP tools for:
  81. - **Document discovery** - list connected Draw.io document instances and route later calls to a specific tab/file instance
  82. - **Diagram inspection** - read shapes, pages, layers, and cell properties
  83. - **Diagram modification** - add/edit/delete shapes, edges, and labels on a target page
  84. - **Page management** - list pages, inspect the current page, create pages, copy pages, and rename pages without forcing a visible page switch on supported runtimes
  85. - **Layer management** - create, switch, and organize layers
  86. - **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
  87. - **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](./CONFIG.md#tls-https--wss).
  88. See [Tools Reference](./TOOLS.md) for the complete list of available tools.
  89. ## MCP Apps support
  90. On MCP Apps-capable hosts (Claude Desktop, QuixiDesk, MCPJam, VS Code Copilot), the `show-diagram` tool opens the diagram as an interactive draw.io editor directly inside the conversation. The framed editor displays the diagram, connects to the server's WebSocket bridge, and registers there as a live document: it appears in `list-documents` (in embed mode) and agent tool calls (e.g. `add-rectangle`) apply to it, verified in headless E2E. Syncing user-side edits made in the framed editor so the agent sees them remains pending real-browser verification.
  91. Enable it by running the server with the `--editor` flag; no other configuration is needed. On hosts without MCP Apps support, `show-diagram` falls back to returning plain diagram XML text.
  92. Limitation: the MCP host must be able to reach `http://localhost:<http-port>`, where the locally served draw.io editor is framed. Native desktop hosts like Claude Desktop work; remote browser sessions may not be able to.
  93. See the [`show-diagram` tool](./TOOLS.md#mcp-apps-tools) for details.
  94. ## Installation
  95. The server runs as part of your MCP host. Detailed configuration for all supported clients (Claude Desktop, Claude Code, Zed, Codex, oterm) including npm and pnpm options is available in [Configuration](./CONFIG.md).
  96. ## Alternative: Browser Extension
  97. Instead of the built-in editor, you can use the [browser extension](./packages/drawio-mcp-extension/README.md) to connect to Draw.io running in your browser. This works with or without the `--editor` flag.
  98. 1. Open [Draw.io in your browser](https://app.diagrams.net/)
  99. 2. Install the Draw.io MCP Browser Extension:
  100. - [Chrome Web Store](https://chrome.google.com/webstore/detail/drawio-mcp-extension/okdbbjbbccdhhfaefmcmekalmmdjjide)
  101. - [Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/addon/drawio-mcp-extension/)
  102. 3. Ensure the extension is connected (green signal overlay on icon)
  103. Configuration without `--editor`:
  104. ```json
  105. {
  106. "mcpServers": {
  107. "drawio": {
  108. "command": "npx",
  109. "args": ["-y", "drawio-mcp-server"]
  110. }
  111. }
  112. }
  113. ```
  114. See the [extension documentation](./packages/drawio-mcp-extension/README.md) for more details.
  115. ## Experimental: Draw.io Desktop
  116. Integration with the [draw.io desktop](https://github.com/jgraph/drawio-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.
  117. See [DESKTOP.md](./DESKTOP.md) for the full setup steps and the current limitation.
  118. ## Related Resources
  119. [Configuration](./CONFIG.md) - CLI flags and advanced options
  120. [Tools Reference](./TOOLS.md) - Complete MCP tools documentation
  121. [Troubleshooting](./TROUBLESHOOTING.md)
  122. [Prompt examples](./docs/examples/index.md)
  123. [Contributing](./CONTRIBUTING.md)
  124. [Architecture](./ARCHITECTURE.md)
  125. [Development](./DEVELOPMENT.md)
  126. [Draw.io Desktop (experimental)](./DESKTOP.md) - install path and known CSP limitation
  127. ## Star History
  128. <a href="https://star-history.dera.page/#lgazo/drawio-mcp-server&type=Date">
  129. <picture>
  130. <source media="(prefers-color-scheme: dark)" srcset="https://star-history.dera.page/svg?repos=lgazo/drawio-mcp-server&type=Date&theme=dark" />
  131. <source media="(prefers-color-scheme: light)" srcset="https://star-history.dera.page/svg?repos=lgazo/drawio-mcp-server&type=Date" />
  132. <img alt="Star History Chart" src="https://star-history.dera.page/svg?repos=lgazo/drawio-mcp-server&type=Date" />
  133. </picture>
  134. </a>
  135. ## Assessments
  136. [![MSeeP.ai Security Assessment Badge](https://mseep.net/pr/lgazo-drawio-mcp-server-badge.png)](https://mseep.ai/app/lgazo-drawio-mcp-server)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.