Skip to content
Content
MCP

drawio

Ships with drawio-mcp: The official draw.io MCP (Model Context Protocol) server that enables LLMs to create and open diagrams in the draw.io editor. ▶ Watch the video and set up draw.io in your AI…

From plugin
drawio-mcp
5.9k1 skill1 MCP

Claude Code

> /plugin marketplace add jgraph/drawio-mcp
> /plugin install drawio@drawio

Security report

Found

Low risk

  • Known flaws

    Not published

  • Signed build

    Not published

  • Maintained

    Nov 20, 2026

    Last push

  • Licence

    Apache-2.0

  • Runs as

    Remote

    mcp.draw.io

  • Deprecated

    Not published

Signals from public registries, not an audit. Checked Nov 20, 2026.

drawio-mcp README

Draw.io MCP Server

The official draw.io MCP (Model Context Protocol) server that enables LLMs to create and open diagrams in the draw.io editor.

An AI assistant turns a prompt for a customer refund flowchart into an editable draw.io diagram in the chat, with Open in draw.io, Copy and Download diagram buttons

▶ Watch the video and set up draw.io in your AI assistant on drawio.com/mcp.

Four Ways to Create Diagrams

This repository offers four approaches for integrating draw.io with AI assistants. Pick the one that fits your setup:

MCP App ServerMCP Tool ServerAssistant PluginsProject Instructions
How it worksRenders diagrams inline in chatOpens diagrams in your browserGenerates .drawio files, optional PNG/SVG/PDF export or browser URLClaude generates draw.io URLs via Python
Diagram outputInteractive viewer embedded in conversationdraw.io editor in a new tab.drawio, .drawio.png / .svg / .pdf, or browser URLClickable link to draw.io
Requires installationNo (hosted at mcp.draw.io)Yes (npm package)One-line plugin install (draw.io Desktop only for PNG/SVG/PDF export)No — just paste instructions
Supports XML, CSV, Mermaid✅ All three, and PlantUML✅ All threeXML and Mermaid (Mermaid converted by draw.io Desktop or an installed Chrome, Edge or Chromium)✅ All three
Editable in draw.ioVia "Open in draw.io" button✅ Directly✅ DirectlyVia link
Works withClaude.ai, ChatGPT, VS Code, Cursor, GitHub Copilot CLI, any MCP Apps hostClaude Desktop, Cursor, OpenCode, Gemini CLI, any MCP clientClaude Code, Codex CLI, GitHub Copilot, Cursor, Antigravity, OpenCodeClaude.ai (with Projects)
Best forInline previews in chatLocal desktop workflowsLocal development workflowsQuick setup, no install needed

Mermaid in, editable draw.io out

Every way takes Mermaid and gives a native draw.io diagram, not a picture of one: shapes, connectors that end on the shapes they join, and labels that are the shapes' own text, so the diagram can be edited, moved and restyled in draw.io like one drawn there. draw.io converts Mermaid with its own parser and layout, the same in the editor, draw.io Desktop, the tool server and the app server's viewer: the 28 diagram types of the Mermaid reference, plus swimlane, use case, agent flow, railroad and Cynefin diagrams.

  • App Server: flowcharts, ER and sequence diagrams are converted on the server into editable cells, laid out and styled in the calm theme (see MCP App Server); the inline viewer converts the other types, and "Open in draw.io" opens those with the Mermaid kept on them for editing the source.
  • Tool Server: the draw.io editor converts it when the link opens.
  • Plugins: draw.io Desktop's CLI converts it to a .drawio file, or without Desktop the skill's mermaid-to-drawio.js runs the same converter in an installed Chrome, Edge or Chromium.

mcp-app-server/test/mermaid-types.test.js converts a diagram of each type both ways and checks the result. In a few types some parts still come out as drawings: loose lines in timelines, tree views, Ishikawa, railroad, event modeling and Cynefin diagrams, radar curves as images, and names beside their shapes in architecture and Wardley diagrams (details).


Guides

User guides with tested prompts and examples are in the draw.io documentation, and the setup for each assistant is on drawio.com/mcp:

The gallery is generated from docs/images/gallery/gallery.json and the editable light and dark SVGs next to it; drawio.com reads them when the site is built.


MCP App Server

The MCP App server renders draw.io diagrams inline in AI chat interfaces using the MCP Apps protocol. Instead of opening a browser tab, diagrams appear directly in the conversation as interactive iframes.

The official hosted endpoint is available at:

https://mcp.draw.io/mcp

Add this URL as a remote MCP server in Claude.ai, ChatGPT, VS Code (GitHub Copilot), Cursor, GitHub Copilot CLI, or any MCP Apps-compatible host — no installation required. On Claude.ai, draw.io is also listed in the connector directory and can be added from there in one click; in ChatGPT and Codex, in the plugin directory. In Cursor (≥ 2.6), diagrams render inline in the Agent chat (one-click install); on older builds, use the stdio @drawio/mcp tool server instead. In GitHub Copilot CLI, run copilot mcp add --transport http drawio https://mcp.draw.io/mcp; a terminal can't show diagrams inline, so it gets a link that opens each diagram in draw.io.

You can also run the server locally via Node.js or the jgraph/drawio-mcp Docker image, or deploy your own instance to Cloudflare Workers.

Tools:

  • create_diagram — Renders draw.io XML, Mermaid (28 diagram types), PlantUML or draw.io CSV as an interactive diagram inline in chat. Mermaid flowcharts, ER and sequence diagrams, PlantUML sequence and activity diagrams and CSV are converted on the server into editable draw.io shapes, laid out and styled, and a syntax error comes back with its line and how to fix it
  • search_shapes — Searches 10,000+ shapes across all draw.io libraries (AWS, Azure, GCP, P&ID, electrical, Cisco, Kubernetes, UML, BPMN, etc.) by keyword, supplemented by the draw.io icon service (brand logos and general-purpose concept icons) when the built-in libraries have no good match. Returns exact style strings that can be used directly in XML. Use this to find the correct shape before calling create_diagram.
  • get_drawio_reference — Returns the XML or Mermaid generation reference, which the model reads once per format before its first diagram.
  • create_semantic_diagram — The fast mode for flowcharts and swimlane diagrams, used only when you ask for a quick or cheap diagram (see below).

Fast mode. Ask for speed or economy in so many words, in any language, and the model describes a flowchart or swimlane diagram instead of placing every shape: the steps, the lanes, the transitions and a row and a column per step. The server lays it out, routes the lines and styles it. For example:

  • "Quickly draw a flowchart of returning a book at a library kiosk: scan the library card, scan the book, check for a reservation or a late fee, then print a receipt. Just a rough sketch is fine."
  • "Draw a swimlane diagram for requesting a new laptop, with lanes for Employee, Manager and IT. Keep it cheap: use as few tokens as possible."

Without such words, and for every other diagram type, the model uses create_diagram, which places the shapes with more care. In the benchmark of 15 November 2026 (Claude Code with Sonnet 5.5 and Opus 5.5, 20 prompts in English and German written for the test, three runs each), the models chose the right tool in 118 of 120 sessions. With the wish, the diagram came 3 to 4 times sooner (Sonnet 14 s instead of 46 s, Opus 27 s instead of 108 s), with less than half the output tokens. In blind comparisons with the diagrams the models placed themselves, the fast ones won 0.61 (Sonnet) and 0.67 (Opus) of the judgements, but each model lost on one flowchart without lanes. Limits:

  • It draws flowcharts and swimlanes only, in the calm theme, without styles of your choosing. A flowchart asked for as a "rough sketch" therefore comes in the calm theme, not with the hand-drawn look create_diagram gives a sketch.
  • Flowcharts without lanes get up to 24 steps; larger ones are drawn with create_diagram.

Self-hosted servers leave the tool out with DRAWIO_SEMANTIC_TYPES=off. Details are in shared/semantic/FAST-MODE.md.

Mermaid, PlantUML and CSV. Besides draw.io XML, create_diagram takes Mermaid, PlantUML and draw.io CSV. The model picks a format, or uses the one you ask for or paste. These types are converted on the server into editable draw.io shapes, laid out and styled, and the model gets the diagram back as draw.io XML:

  • Mermaid: flowcharts (flowchart, graph), ER diagrams and sequence diagrams
  • PlantUML: sequence diagrams, and activity diagrams in the new syntax
  • CSV: draw.io's CSV import format with the tree, flow and none layouts; each row keeps its columns as shape data

A syntax error comes back to the model with its line and how to fix it, so the model can correct the source and send it again. Everything else goes to the viewer, which converts it with draw.io's own converters, as Arrange > Insert > Advanced does in the editor, and the model gets a note that says so: the other Mermaid types (class, state, Gantt, mind map, …), the other PlantUML types (class, use case, component, state, activity in the old syntax, …) and CSV with # list, # container, the circle layout or a custom layout. Self-hosted servers leave all of it to the viewer with DRAWIO_CONVERT=off.

One example per format, each converted on the server. Mermaid, a flowchart with a decision shape and labelled connectors:

flowchart LR
  A[Order received] --> B{Paid?}
  B -->|yes| C[Ship order]
  B -->|no| D[Send reminder]

PlantUML, a sequence diagram with a lifeline for each participant and a line for each message:

@startuml
Customer -> Shop: Place order
Shop --> Customer: Confirmation
@enduml

CSV, an org chart drawn as a tree, each shape keeping its name and manager as shape data:

# label: %name%
# connect: {"from": "manager", "to": "name", "invert": true}
# layout: verticaltree
name,manager
CEO,
CTO,CEO
CFO,CEO

Full documentation →

Note: Diagrams appear inline in hosts that support the MCP Apps extension, such as Claude.ai, ChatGPT, VS Code with GitHub Copilot and Cursor. In other hosts, such as GitHub Copilot CLI, the tool still works and answers with a link that opens the diagram in draw.io.


MCP Tool Server

The original MCP server that opens diagrams directly in the draw.io editor. Supports XML, CSV, and Mermaid.js formats with lightbox and dark mode options. Published as @drawio/mcp on npm.

Quick start: npx @drawio/mcp

@jgraph
Ships withdrawio-mcp
5.9k1 skill1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
5.9k
Star history of jgraph/drawio-mcp on GitHub, a chart by star-history.com

More MCP servers from other plugins.

prompts.chat

prompts.chat

MCP

Ships with promptschat: f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open…

@gh-f@gh-fInstall MCP
emdash-docs

emdash-docs

MCP

Ships with emdash: A full-stack TypeScript CMS built on Astro. EmDash takes the ideas that made WordPress dominant --…

emdashtoday15k
@emdash-cms@emdash-cmsInstall MCP
openmotion

openmotion

MCP

Ships with openmotion: OpenMotion is a full-stack agentic video studio and an open-source alternative to Claude Motion and…

openmotiontoday13k
@nexu-io@nexu-ioInstall MCP
codegraph

codegraph

MCP

Ships with webiny-js: Open-source content platform. Self-hosted on AWS serverless. Built as a TypeScript framework you extend…

webiny-js4d8.1k
@webiny@webinyInstall MCP

Questions about drawio.

Which coding agents can use drawio?
drawio works in any agent that reads an MCP config file: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf. Each agent reads it from its own file; this page names the file for each one.
How do I add drawio to Claude Code?
Run these in order, one at a time. 1. In Claude Code: /plugin marketplace add jgraph/drawio-mcp 2. In Claude Code: /plugin install drawio@drawio
Is drawio safe to install?
Low risk. Signals from public registries, not an audit.