Draw.io MCP Server

by @lgazo

Draw.io MCP Server

Draw.io MCP Server gives assistants control over diagrams in a browser. It can host its own editor or connect through an extension, with explicit document and page selection for larger diagramming sessions.

Design & Creative1,487nodeMIT

Server facts

Draw.io MCP Server

GitHub stars

1,487

Last commit

Oct 13, 2026

Runtime

node

License

MIT

Project

Author
lgazo
License
MIT

Tech

Runtime
node
Transports
stdio
Remote access
No

Activity

GitHub stars
1,487
Last commit
Data as of

Tags

  • Diagram Editing
  • Drawio
  • Mermaid
  • Multi Page
  • Visual Documentation

Overview

A diagramming session can contain several files and several pages, so this server makes targeting part of its editing model. It discovers connected documents, routes requests through a document selector, and requires a page selector for operations scoped to one page. Live actions are queued in order for each document; different files can therefore receive work from different agents without sharing one document queue. Page operations cover discovery, creation, copying, and renaming, while layers provide another way to organize diagram content. Editing reaches individual labels, connectors, and shapes, including nesting and grouping. Connector geometry can use waypoints, with automatic routing for self-connections.

Users can enter through the included browser editor or connect an existing Draw.io browser session using an extension. The included editor is served locally and does not need that extension. Diagram interchange covers XML and editable XML embedded within PNG or SVG images. Mermaid content can be imported, embedded, or expanded. Vendor stencils are found in the running editor's sidebar, including cloud and network icon collections, rather than selected from a separately curated list. Setup needs an MCP host and at least Node.js 22. TLS is optional for the server generally, but required for the documented Firefox support. The desktop Electron path is different: its experimental integration currently cannot complete the connection because of an upstream CSP restriction.

Install & configure

Requirements

  • Node.js version 22 or above
  • MCP host to launch the server
  • Browser to open the included editor
Documented launch / install command
npx -y drawio-mcp-server --editor

This is the README's included-editor configuration. Restart the MCP host, then browse to http://localhost:3000/ for the editor UI; that address is not the MCP transport endpoint. An extension-based session can omit --editor. Do not assume the blocked desktop path works like either browser option.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

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

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

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

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

VS Code configuration
{
  "servers": {
    "drawio-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "drawio-mcp-server",
        "--editor"
      ],
      "env": {}
    }
  }
}

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

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

Read the Windsurf setup guide

Config file · Project scope: .mcp.json at the repository root

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "mcpServers": {
    "drawio-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "drawio-mcp-server",
        "--editor"
      ],
      "env": {}
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Tools

Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
list-documentsFind connected diagram instances before choosing the document to edit.
get-current-pageIdentify the active page in a diagram.
list-pagesDiscover the pages belonging to a document.
copy-pageMake another copy of an existing diagram page.
rename-pageUpdate the label used for a diagram page.
create-pageIntroduce an additional page in the diagram.

Use cases

  • Assign diagram work to explicit pages while keeping a multi-file session organized.
  • Refine connectors, labels, and grouped shapes in an existing architecture drawing.
  • Bring Mermaid material into a Draw.io editing session.
  • Exchange image exports that retain the diagram's editable XML.
  • Use discovered cloud or network stencils when building visual documentation.

Strengths

  • The bundled browser editor eliminates an extension requirement for that connection path.
  • Document queues and explicit page targets make the destination of edits unambiguous.
  • Combines diagram interchange with live editing of pages, layers, and elements.
  • Discovers vendor icons from the active editor instead of maintaining a separate icon catalog.

Limitations

  • Runtime requirements start at Node.js 22.
  • Firefox needs a TLS-enabled connection.
  • The experimental desktop integration is presently blocked by upstream CSP behavior.

Draw.io MCP Server setup notes

  • Draw.io MCP Server's stdio example needs a client that launches local processes.

Frequently asked questions

Run with --editor to use the locally hosted Draw.io interface. The extension is the alternative for attaching an existing browser session.

Related MCP servers