PlugWiki
drawio-mcp-server logo

Draw.io MCP Server by lgazo: Setup for Claude, Cursor and Other Apps

CommunityLocal
Getnpmdrawio-mcp-serverlgazo/drawio-mcp-server

Lets Claude, Cursor or Codex create, edit and export Draw.io diagrams from a prompt, in an editor served from your own computer.

This is a community server by lgazo, not made by the Draw.io team. It runs on your computer with npx and opens a built-in Draw.io editor in your browser. You can instead connect your own Draw.io tab with a browser extension.

No account or key is needed. On first start it downloads the Draw.io editor files from the official Draw.io GitHub releases.

Good for

  • Engineers who want architecture diagrams drawn from a description
  • Teams that want to update existing Draw.io files with an assistant
  • Anyone converting Mermaid text into editable diagrams

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install drawio-mcp-server

Claude Code

  1. 1

    Copy this prompt.

    Add the drawio-mcp-server server to Claude Code. Run this command:
    
    claude mcp add drawio -- npx -y drawio-mcp-server --editor
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js 22+.

Read-only mode: There is no read-only mode. The assistant can add, change and delete shapes in the open diagram.

The config uses the --editor flag so the server hosts its own Draw.io editor. After restarting your app, open http://localhost:3000/ to see the diagram. Without the flag you need the Draw.io MCP browser extension and Draw.io open in your browser. Add --host 127.0.0.1 to the arguments to keep the editor off other network interfaces. The Claude Desktop JSON matches the README; other apps' configs are adapted from it. The README also offers an installer command and a Claude Code plugin.

Built from the package data we hold. Not yet tested by us.

Tools

  • Adds a rectangle to a page

    Adds a new rectangle shape on a page of the open Draw.io document, with position, size, text and style.

    Try: “Add a rectangle labelled API Gateway at the top of the page.”

    Write · add-rectangle

  • Adds a shape from the Draw.io library by name

    Adds a new shape to a page by its library name, such as an AWS or Cisco icon, so the assistant can place proper icons.

    Try: “Add the Cisco router icon and label it Edge.”

    Write · add-cell-of-shape

  • Connects two shapes with a line

    Creates an edge between two shapes. If both ends are the same shape, a loop style is applied automatically.

    Try: “Connect the API Gateway to the Orders service with an arrow.”

    Write · add-edge

  • Changes an existing shape

    Updates only the properties you give for a shape, such as its text, size, position or style, and leaves the rest as it was.

    Try: “Make the Database shape wider and change its text to Postgres.”

    Write · edit-cell

  • Changes an existing line

    Updates the properties of a connecting line and can set waypoints to control its route.

    Try: “Route the line from Queue to Worker around the Cache box.”

    Write · edit-edge

  • Restyles a shape to match a library shape

    Changes the look of an existing shape so it matches a named shape from the library.

    Try: “Change the Server box to the AWS Lambda icon.”

    Write · set-cell-shape

  • Stores a custom attribute on a shape

    Sets or updates a custom data attribute on an existing shape.

    Try: “Tag the Billing service with owner=payments.”

    Write · set-cell-data

  • Groups a shape inside another

    Makes one shape a child of another, so moving the parent moves its children.

    Try: “Put the three services inside the Backend container.”

    Write · set-cell-parent

  • Deletes a shape or line

    Deletes a shape or line from the target page by its ID.

    Try: “Delete the unused Legacy box from the diagram.”

    Delete · delete-cell-by-id

  • Lists the shapes and lines on a page

    Returns the shapes and lines on a page in pages of results, with essential fields only.

    Try: “List everything on page 1 of this diagram.”

    Read · list-paged-model

  • Shows the shape you have selected

    Returns details of the shape currently selected in the editor. The editor may switch to the target page first.

    Try: “What do I have selected right now?”

    Read · get-selected-cell

  • Lists shape library categories

    Returns the shape categories available in the Draw.io library.

    Try: “Which shape categories can you use?”

    Read · get-shape-categories

Read from the source code

Permissions

medium risk · 4 things to watch

Medium risk

The assistant can add, change and delete shapes and overwrite pages in the open diagram. Keep a copy of important diagrams and bind the server to localhost with the host flag.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • The local editor port has no sign-in and no bind address by default

    The docs say the bind address is chosen by the OS, but the code passes none unless you set the host flag, and Node then listens on every network interface for the editor and the extension connection. The HTTP routes also allow any origin. Add the host flag set to 127.0.0.1 on shared networks, and do not combine it with the HTTP transport option on an untrusted network. github.com

  • It can delete shapes and overwrite pages

    delete-cell-by-id removes shapes, and import-diagram in replace mode overwrites a page. There is no read-only mode, so keep backups of diagrams you care about. github.com

  • It downloads editor files on first run

    The package fetches the latest Draw.io web build from the jgraph/drawio GitHub releases and caches it, so the first start needs internet access. npmjs.com

  • export-diagram can write to a path

    When you give a file path, the export is saved there. Check the path the assistant picks. github.com

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Talks toapi.github.com and the jgraph/drawio release download, to fetch editor files. Your own browser over a local port
Sign-in and keysNone. No key or account.

Questions

Is the lgazo Draw.io MCP server official?

No. It is a community project by lgazo, not published by the draw.io (diagrams.net) team. JGraph, the maker of draw.io, ships its own official server in github.com/jgraph/drawio-mcp (hosted at mcp.draw.io, Apache-2.0); see the draw.io MCP page on PlugWiki at /mcp/drawio. The official one creates diagrams from XML or Mermaid and opens them in the editor, while this one edits a live editor shape by shape with 30 tools.

Do I need the browser extension?

No. Start the server with the editor flag and it serves its own Draw.io editor at http://localhost:3000/. The extension is the alternative if you want to use your own Draw.io tab.

What do I need installed?

Node.js 22 or higher and an MCP app such as Claude Desktop, Claude Code, Zed, Codex or OpenCode. No account or API key.

How do I add it to Claude Code?

The README gives a Claude Code plugin route and an installer command that writes the config for Claude Code, Claude Desktop, Codex, Zed or OpenCode. The install box above shows the plain config for each app.

Can it delete things from my diagram?

Yes. The delete tool removes shapes and lines from the diagram, and importing in replace mode overwrites a page. Export can also write a file to a path you or the assistant give.

Does the built-in editor work in Claude Desktop?

The README says apps that support MCP Apps, including Claude Desktop, VS Code Copilot and others, can show the editor inside the conversation. The host must be able to reach localhost.

Can I use it in ChatGPT or n8n?

No setup is documented for them. The server runs on your computer and serves its pages on localhost, so hosted apps cannot reach it.

Information

updated Nov 2, 2026

Publisher
Community
Package
drawio-mcp-server
Registry
npm
Transport
stdio, Streamable HTTP
Auth
None
Version
2.4.0
License
MIT
Last commit
Oct 31, 2026
Open issues
4

GitHubnpmChangelogIssues

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 5
  1. README.md · github.com
  2. TOOLS.md · github.com
  3. CONFIG.md · github.com
  4. drawio-mcp-server · npmjs.com
  5. index.ts (v2.4.0) · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.