
Draw.io MCP Server by lgazo: Setup for Claude, Cursor and Other Apps
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.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Runs on your computer and serves on localhost, so ChatGPT cannot reach it.
Runs on your computer and serves on localhost, so n8n cannot reach it.
Install drawio-mcp-server
Claude Code
- 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
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-rectangleAdds 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-shapeConnects 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-edgeChanges 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-cellChanges 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-edgeRestyles 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-shapeStores 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-dataGroups 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-parentDeletes 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-idLists 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-modelShows 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-cellLists shape library categories
Returns the shape categories available in the Draw.io library.
Try: “Which shape categories can you use?”
Read ·
get-shape-categoriesLists the shapes in one category
Returns all shapes in a library category, with the style used to create each.
Try: “Show me the shapes in the AWS compute category.”
Read ·
get-shapes-in-categoryLooks up one library shape
Finds a shape by name in the library and returns it with its category.
Try: “Find the shape called cloud_run.”
Read ·
get-shape-by-nameLists open Draw.io documents
Lists the connected Draw.io documents with stable IDs, so later calls can target one tab or file.
Try: “Which diagrams do you have open?”
Read ·
list-documentsRenames the open document
Renames the current document through its storage provider and keeps the file extension.
Try: “Rename this diagram to Payments architecture.”
Write ·
set-document-titleSaves the open document
Runs Draw.io's own File > Save action. Your storage provider may show a sign-in, conflict or Save As prompt that needs you.
Try: “Save the diagram.”
Write ·
save-documentLists the pages in a document
Lists every page with its index, ID, name and whether it is current.
Try: “What pages does this diagram have?”
Read ·
list-pagesShows the page you are on
Returns the visible page's index, ID and name.
Try: “Which page am I looking at?”
Read ·
get-current-pageAdds a blank page
Appends a new blank page to the document without switching your view when the runtime allows.
Try: “Add a new page for the retry flow.”
Write ·
create-pageDuplicates a page
Copies an existing page to the end of the document and returns the new page's details.
Try: “Copy page 1 so I can try a variation.”
Write ·
copy-pageRenames a page
Renames a page without changing which page is visible.
Try: “Rename page 2 to Message flow.”
Write ·
rename-pageLists layers on a page
Lists the layers on a page with their IDs and names.
Try: “What layers are on this page?”
Read ·
list-layersShows the active layer
Returns the layer new elements are added to. The editor may switch pages first because this state is tied to the screen.
Try: “Which layer am I drawing on?”
Read ·
get-active-layerChooses the layer to draw on
Sets the layer where all new elements will be created.
Try: “Switch to the Annotations layer.”
Write ·
set-active-layerCreates a layer
Creates a new layer on a page.
Try: “Create a layer called Background.”
Write ·
create-layerMoves a shape to another layer
Moves a shape from its current layer to a target layer.
Try: “Move all decorative shapes to the Background layer.”
Write ·
move-cell-to-layerExports the diagram as SVG, PNG or XML
Exports a page or the whole diagram and returns the data, or saves it to a file path if you give one.
Try: “Export the current page as SVG.”
Write ·
export-diagramLoads a diagram from XML, SVG or PNG
Imports a diagram from XML, SVG or PNG with embedded XML. It can replace a page, add to it, or open a new page, so replace mode overwrites what is there.
Try: “Import this XML onto a new page.”
Write ·
import-diagramTurns Mermaid text into a diagram
Inserts a Mermaid diagram into a page, either converted to editable shapes or embedded as one image that keeps the source.
Try: “Convert this Mermaid flowchart into a Draw.io diagram.”
Write ·
import-mermaid
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 to | api.github.com and the jgraph/drawio release download, to fetch editor files. Your own browser over a local port |
|---|---|
| Sign-in and keys | None. 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
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 5Hide
- README.md · github.com
- TOOLS.md · github.com
- CONFIG.md · github.com
- drawio-mcp-server · npmjs.com
- index.ts (v2.4.0) · github.com