Draw.io MCP server

An MCP server for draw.io: the agent builds and edits diagrams, works with layers, pages and cloud provider shapes

MCP server

Medium risk

We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.

Why this level

  • Runs a local server and connects to the editor over websocket
  • Creates and changes diagrams and can save them to files
All reasons and checks

lgazo/drawio-mcp-server

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/lgazo-drawio-mcp-server

Detects the agents on your machine, checks the risk and pins the version.

Other ways to install

Run in a terminal

claude mcp add --transport stdio drawio -- npx -y drawio-mcp-server --editor

Or add to the file .mcp.json, in the project

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

If the file already exists, add the server inside the mcpServers key.

Install in Cursor

The button opens the agent and offers to add the server. If nothing happens, copy the config below.

Add to the file ~/.cursor/mcp.json, for all projects

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

If the file already exists, add the server inside the mcpServers key. For a single project, put the same block into .cursor/mcp.json.

Install in VS Code

The button opens the agent and offers to add the server. If nothing happens, copy the config below.

Run in a terminal

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

Or add to the file .vscode/mcp.json, in the project

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

If the file already exists, add the server inside the servers key.

Run in a terminal

codex mcp add drawio -- npx -y drawio-mcp-server --editor

Or add to the file ~/.codex/config.toml, for all projects

[mcp_servers.drawio]
command = "npx"
args = ["-y", "drawio-mcp-server", "--editor"]

If the file already exists, append the block to the end.

Add to the file ~/.gemini/settings.json, for all projects

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

If the file already exists, add the server inside the mcpServers key.

Add to the file ~/.config/devin/mcp_config.json, for all projects

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

If the file already exists, add the server inside the mcpServers key. Legacy Cascade keeps the MCP config in ~/.codeium/windsurf/mcp_config.json.

Formerly Windsurf.

Add to the file cline_mcp_settings.json, for all projects

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

If the file already exists, add the server inside the mcpServers key. Open the settings file in Cline: MCP Servers tab, Configure MCP Servers.

Add to the file .roo/mcp.json, in the project

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

If the file already exists, add the server inside the mcpServers key.

A fork of Roo Code, same .roo folders.

Add to the file opencode.json, in the project

{
  "mcp": {
    "drawio": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "drawio-mcp-server",
        "--editor"
      ]
    }
  }
}

If the file already exists, add the server inside the mcp key.

Add to the file ~/.config/zed/settings.json, for all projects

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

If the file already exists, add the server inside the context_servers key.

Add to the file .codeassistant/mcp.json, in the project

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

If the file already exists, add the server inside the mcpServers key.

You will need: Node.js

Checked against the repository on Sep 25, 2026, commit afbd4be.

Text for your agent

In Claude Code run /plugin marketplace add lgazo/drawio-mcp-server, then /plugin install drawio. In other hosts run npx drawio-mcp-server install <host>, where host is claude-code, claude-desktop, codex, opencode or all, and open the built-in editor at http://localhost:3000/.

Other ways from the author
/plugin marketplace add lgazo/drawio-mcp-server
/plugin install drawio

Adds the plugin with the /drawio-open and /drawio-status slash commands.

This is third-party code. Review the repository files before installing.

What it does

The server gives the agent a set of MCP tools to control draw.io diagrams. With them it can create, read, change and delete shapes, edges and labels, work with layers and pages, and import and export diagrams as XML, SVG and PNG. It supports importing and embedding Mermaid diagrams. Shape sets for AWS, GCP, Azure and Cisco are picked up from the draw.io sidebar at runtime, so the agent places the right icons without a pre-built catalog. You can work through the built-in editor that the server hosts, or through a browser extension connected to draw.io in your browser.

Who it is for. For developers, architects and technical writers who need to build diagrams straight from a chat with the agent.

Good fit when

  • You need to build an architecture diagram or flowchart from a description
  • You need to edit an existing draw.io diagram together with the agent
  • You need to bring a Mermaid diagram into editable draw.io form

Not a fit when

  • You only need to view a finished image without editing
  • You cannot run a local server or install a browser extension

Example request

Build an event-driven architecture diagram with a message queue, producers, consumers and three services

Limitations

The server needs Node.js 22 or newer and runs as part of an MCP host. It requires either the built-in editor with the --editor flag or the browser extension with draw.io open in the browser. Integration with the draw.io desktop Electron app is marked experimental and is currently blocked by a CSP restriction on the draw.io side. A TLS mode with HTTPS and WSS is opt-in, and the server can generate self-signed certificates itself.

How to disable. Remove the drawio entry from your client's MCP configuration. If you installed it as a Claude Code plugin, remove it via /plugin.

MCP

Transport
stdio
Authentication
not required

Security check

  • Runs a local server and connects to the editor over websocket
  • Creates and changes diagrams and can save them to files

README in short

The README presents an MCP server for draw.io that gives agents tools to create, read, change and delete diagram elements. You can work through the built-in editor with the --editor flag or through a browser extension. The fastest install is the Claude Code plugin via /plugin or the npx drawio-mcp-server install command for the target host, with a manual mcpServers config snippet also provided. It lists layers, pages, XML, SVG and PNG import and export, Mermaid import and runtime pickup of AWS, GCP, Azure and Cisco shapes. It states that Node.js 22 or newer is required and that draw.io desktop integration is still experimental. MIT licensed.

FAQ

Do I need the browser extension?

Not necessarily. You can run the built-in editor with the --editor flag; the extension is a second option for working with draw.io directly in the browser.

Does the draw.io desktop app work?

Not yet. Integration with the Electron desktop app is experimental and is blocked by a CSP restriction on the draw.io side.

Editors’ pick

A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review

PluginMedium riskNo VPN needed292.5KRepository stars
Editors’ pick

Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture

SkillLow risk271.4KRepository stars
Editors’ pick

GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation

CLIMedium riskNo VPN needed139.3KRepository stars

Reference MCP servers

Model Context Protocol servers

Official

Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything

MCP serverMedium risk90.6KRepository stars
Foxx AIDraw.io MCP server

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.