Logo vun Draw.io MCP 服务器

Draw.io MCP 服务器

CommunautéitBeléift
lgazo

Draw.io Model Context Protocol (MCP) Server

Editeurlgazo
Repositorydrawio-mcp-server
SproochTypeScript
Forks
131
Stären
1.5K
Disponibel Tools
28
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Draw.io MCP 服务器 stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 28 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    1.5K Stären an 131 Forks aus dem verlinkte Repository.

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

  • 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

  • npx drawio-mcp-server install <host> writes the MCP config for claude-code, claude-desktop, codex, zed, opencode, or all v2.3.0

  • Document persistence tools: set-document-title and save-document v2.3.0

  • Draw.io library API version compatibility mechanism v2.2.0

  • Enable Draw.io MCP in IFrames

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

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

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

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

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

  • 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.

Requirements

  • Node.js (v22 or higher; tested against v22 LTS and v24 LTS) - Runtime environment for the MCP server
  • MCP client - Claude Desktop, Claude Code, Zed, Codex, OpenCode, or any MCP-compatible host

For Built-in Editor

No additional requirements - runs out of the box with --editor flag.

For Browser Extension

Optional

  • pnpm - Preferred package manager (npm works fine too)

Quick Start

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 for the full reference, flags, and uninstall, and docs/release.md for how releases are cut.

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

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

For other MCP clients and detailed configuration (including pnpm options), see Configuration.

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.

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.

Installation

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.

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:

json
{
  "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

Assessments

MSeeP.ai Security Assessment Badge

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

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

Disponibel Tools

  • get-selected-cell

    This tool retrieves the selected cell on the target page of the current Draw.io document. If the target page is not currently visible, Draw.io may switch the visible page first because selection is UI-bound.

  • add-rectangle

    This tool allows you to add a new Rectangle vertex cell on the target page of the current Draw.io document.

  • add-edge

    This tool creates an edge, sometimes called also a relation, between two vertexes (cells). When source and target are the same shape (self-connector), a loop edge style is automatically applied if no custom style is provided.

  • delete-cell-by-id

    Deletes a cell from the target page, whether it is a vertex or edge.

  • get-shape-categories

    Retrieves available shape categories from the diagram's library. Library is split into multiple categories.

  • get-shapes-in-category

    Retrieve all shapes in the provided category from the diagram's library. A shape primarily contains style based on which you can create new vertex cells.

  • get-shape-by-name

    Retrieve a specific shape by its name from all available shapes in the diagram's library. It returns the shape and also the category it belongs.

  • add-cell-of-shape

    This tool allows you to add a new vertex cell on the target page of the current Draw.io document by its shape name.

  • set-cell-shape

    Updates the visual style of an existing vertex cell to match a library shape by name.

  • set-cell-data

    Sets or updates a custom attribute on an existing cell.

  • edit-cell

    Update properties of an existing vertex/shape cell by its ID. Only provided fields are modified; unspecified properties remain unchanged.

  • edit-edge

    Update properties of an existing edge by its ID. Only provided fields are modified; unspecified properties remain unchanged. Supports setting waypoints for edge geometry control.

  • list-paged-model

    Retrieves a paginated view of all cells (vertices and edges) on the target page. This tool provides access to the complete model data with essential fields only, sanitized to remove circular dependencies and excessive data.

  • list-layers

    Lists all available layers on the target page with their IDs and names.

  • set-active-layer

    Sets the active layer for creating new elements. All subsequent element creation will happen in this layer. If the target page is not currently visible, Draw.io may switch the visible page first because active-layer state is UI-bound.

  • move-cell-to-layer

    Moves a cell from its current layer to a target layer.

  • set-cell-parent

    Sets the parent of a cell, making it a child of the specified parent cell. This allows creating hierarchical relationships where moving the parent also moves its children.

  • get-active-layer

    Gets the currently active layer information for the target page. If the target page is not currently visible, Draw.io may switch the visible page first because active-layer state is UI-bound.

  • create-layer

    Creates a new layer on the target page.

  • export-diagram

    Export the target page or current diagram as SVG, PNG, or XML. Returns the diagram data as base64 (PNG) or text (SVG/XML). Optionally saves to a file.

  • import-diagram

    Import a diagram from XML, SVG with embedded XML, or PNG with embedded XML into the current Draw.io instance. target_page is required for replace and add, and optional for new-page.

  • import-mermaid

    Insert a Mermaid diagram into the target Draw.io page. Conversion runs inside the Draw.io editor via its bundled Mermaid pipeline (EditorUi.parseMermaidDiagram). mode='native' converts supported Mermaid types into native mxGraph cells; unsupported types fall back to an embedded image cell. mode='embed' always emits a single image cell that preserves the Mermaid source for re-editing inside Draw.io. target_page is required for replace and add, and optional for new-page.

  • list-documents

    Lists all connected Draw.io document instances with their stable instance IDs and basic metadata.

  • list-pages

    Lists all pages in the current Draw.io document with their index, id, name, and current-page flag.

  • get-current-page

    Gets the currently visible page metadata, including index, id, name, and whether it is active.

  • create-page

    Appends a new blank page to the current Draw.io document without changing the visible page when the runtime supports background page insertion.

  • copy-page

    Creates a copy of an existing page in the target/current Draw.io document, appends the copy to the end of the page list, and returns the copied page metadata. When possible, the previously visible page is restored after the copy is created.

  • rename-page

    Renames the selected page without changing the visible page.

Draw.io MCP 服务器 MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Draw.io MCP 服务器 verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Draw.io MCP 服务器 als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Draw.io MCP 服务器 an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "lgazo-drawio-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "drawio-mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Draw.io MCP 服务器. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Draw.io MCP 服务器.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Draw.io MCP 服务器?
Draw.io MCP 服务器
Jo. Ech hunn et gelies.
Dat hunn ech mat Draw.io MCP 服务器 fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Draw.io MCP 服务器 benotzt?

Draw.io MCP 服务器 ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Draw.io MCP 服务器 MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Draw.io MCP 服务器 mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Draw.io MCP 服务器 MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Draw.io MCP 服务器 verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Draw.io MCP 服务器 MCP mat TypingMind?

Draw.io MCP 服务器 leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Draw.io MCP 服务器 MCP an TypingMind zur Verfügung?

Draw.io MCP 服务器 stellt 28 MCP-Tools zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Draw.io MCP 服务器 MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Draw.io MCP 服务器 eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇