Get started
Pick your assistant. Most need only the address of the hosted server.
- Claude
- Claude Code
- ChatGPT
- GitHub Copilot
- Cursor
- Other assistants
Recommended The MCP App Server. Diagrams appear in the chat.
- Open draw.io in the Claude connectors directory and connect it.
- Start a new chat and describe the diagram you want.
- Click Open in draw.io below the diagram to edit it in the draw.io editor.
You can also add the server as a custom connector in the Claude settings, with this URL:
https://mcp.draw.io/mcp
Recommended The draw.io plugin. It creates .drawio files in your project, and can export them to PNG, SVG or PDF.
- Add the plugin marketplace and install the plugin in Claude Code:
/plugin marketplace add jgraph/drawio-mcp
/plugin install drawio@drawio
- Ask Claude Code for a diagram. Add
png,svgorpdfto your request to export it, orurlto open it in draw.io in your browser.
Exports to PNG, SVG and PDF need draw.io Desktop. To open each diagram in the draw.io editor instead, add the MCP Tool Server:
claude mcp add drawio -- npx -y @drawio/mcp
Recommended The MCP App Server. Diagrams appear in the chat.
- Open ChatGPT Plugins, select +, then Add custom MCP server.
- Enter a name, for example draw.io, and under Connection the URL below. The server needs no sign-in, so leave authentication off.
- Confirm the warning with I understand and want to continue, select Create as a plugin, and install it.
- In a new conversation, type
@, pick draw.io, and ask for a diagram.
https://mcp.draw.io/mcp
If the option to add a custom MCP server is missing, your workspace admin may have turned it off.
Recommended The MCP App Server in VS Code 1.109 or later. Diagrams appear in Copilot Chat.
- Add the server to
.vscode/mcp.jsonin your workspace, or run MCP: Open User Configuration to add it for every workspace:
{
"servers": {
"drawio": {
"type": "http",
"url": "https://mcp.draw.io/mcp"
}
}
}
- Click Start above the server entry, and confirm that you trust the folder if VS Code asks.
- Ask Copilot Chat in Agent mode to create a diagram.
GitHub Copilot CLI: add the hosted server from your terminal. A terminal can't show the diagram, so you get a link that opens it in draw.io.
copilot mcp add --transport http drawio https://mcp.draw.io/mcp
To create .drawio files and exports in your project instead, install the draw.io plugin for Copilot CLI:
copilot plugin marketplace add jgraph/drawio-mcp
copilot plugin install drawio@drawio
Recommended The MCP App Server in Cursor 2.6 or later. Diagrams appear in the Agent chat.
- Use the one-click install, or add the server to
~/.cursor/mcp.json(all projects) or.cursor/mcp.json(this project):
{
"mcpServers": {
"drawio": {
"url": "https://mcp.draw.io/mcp"
}
}
}
- Enable the server when prompted, or under Cursor Settings > MCP.
- Ask the Agent to create a diagram.
Add the hosted server as a remote MCP server in any assistant that supports MCP. In assistants that support MCP Apps, diagrams appear in the chat. In the others, the server answers with a link that opens the diagram in draw.io.
https://mcp.draw.io/mcp
Codex CLI: install the draw.io plugin from the same marketplace:
codex plugin marketplace add jgraph/drawio-mcp
codex plugin add drawio@drawio
Any MCP client on your computer: run the MCP Tool Server, which opens each diagram in the draw.io editor in your browser:
npx @drawio/mcp
The README on GitHub has the setup for Claude Desktop, OpenCode and self-hosting.
Choose a setup
Every variant creates native draw.io diagrams. They differ in where the diagram appears and what you install.
MCP App Server
Shows diagrams right in the chat, in Claude, ChatGPT, VS Code and Cursor. It is hosted at mcp.draw.io, so there is nothing to install.
MCP App Server documentation →MCP Tool Server
An npm package for MCP clients on your computer. It opens each diagram in the draw.io editor in your browser, and also reads CSV data and Mermaid.
@drawio/mcp on npm →Skills and plugins
The draw.io skill for Claude Code, Codex CLI, GitHub Copilot and Cursor creates .drawio files in your project, and can export them to PNG, SVG or PDF.
Plugin documentation →Docker image
Run the MCP App Server on your own machine or server with the jgraph/drawio-mcp image, so diagrams stay on your network.
jgraph/drawio-mcp on Docker Hub →GitHub repository
The source code of every variant, and its technical documentation for each client and for self-hosting.
jgraph/drawio-mcp on GitHub →| Setup | Where the diagram appears | What you install | Choose it for |
|---|---|---|---|
| MCP App Server | In the chat, with Open in draw.io to edit it | Nothing, it is hosted at mcp.draw.io | Claude, ChatGPT, VS Code and Cursor |
| MCP Tool Server | In the draw.io editor, in a new browser tab | The npm package @drawio/mcp | MCP clients on your computer, CSV data and Mermaid |
| Skills and plugins | As .drawio files, PNG, SVG or PDF exports, or a link | A plugin, and draw.io Desktop for image exports | Claude Code, Codex CLI, GitHub Copilot and Cursor |
| Docker image | In the chat, like the hosted server | Docker, on your machine or server | Keeping diagrams on your own network |
Examples
Each diagram is the unedited result of the prompt below it. Copy a prompt and try it in your assistant, or open a diagram in draw.io.
“Draw an online shop's order process as a diagram: a flowchart with at least two decisions and one retry loop (if the payment fails, retry up to 3 times).”
“Draw the OAuth 2.0 authorization code flow as a diagram: a sequence diagram between the user, the browser, the client app, the authorization server and the resource server.”
“Draw a UML class diagram for an online store: Customer, Order, OrderItem, Product and Payment, with their main attributes, a few methods and the relationships between them.”
“Draw the AWS architecture of a photo-sharing app as a diagram, using CloudFront, S3, API Gateway, Lambda, DynamoDB and Cognito.”
“Make a mind map for planning a family vacation.”
“Draw a floor plan of a two-bedroom apartment: a living room with an open kitchen, two bedrooms, a bathroom and a hallway with the entrance. Show the walls, doors, windows and the main furniture.”
“Draw the circuit diagram of a 5 V power supply: a 230 V transformer, a bridge rectifier, a smoothing capacitor, a 7805 voltage regulator, an output capacitor and an LED with its resistor as a power indicator.”
“Draw a P&ID for a simple heating process: a feed tank, a pump, a control valve, a heat exchanger heated by steam and a product tank, with a flow transmitter, a temperature transmitter and a temperature controller.”
“Fill in a business model canvas for a meal-kit delivery startup.”
“Make an infographic of the five steps to launch a product: research, design, build, test and launch, each with an icon and a one-line description.”
Privacy and security
- The hosted server has no accounts and no sign-in. It can't access your files or anything else on your device.
- It receives only what your assistant sends to draw a diagram. It never receives your conversation.
- It doesn't store your diagrams, and we don't use your data to train AI models.
- To keep diagrams on your own network, run the Docker image or the MCP Tool Server instead.
Read the privacy policy for draw.io in AI assistants, how draw.io works with AI models and LLMs, and where your diagram goes with each setup under Data residency and offline use.
Questions and troubleshooting
The diagram doesn't appear in the chat
Diagrams appear in the chat in assistants that support MCP Apps: Claude, ChatGPT, VS Code with GitHub Copilot 1.109 or later, and Cursor 2.6 or later. In other assistants, such as Claude Code or GitHub Copilot CLI, the server answers with a link that opens the diagram in draw.io.
How do I change a diagram?
Ask your assistant for the change in the same chat, for example another colour theme, icons or a missing step. To edit the diagram yourself, click Open in draw.io. See change and style diagrams for examples.
Which diagram types can my assistant draw?
Flowcharts, UML, ER, architecture, cloud and network diagrams, mind maps, timelines, floor plans, circuits and many more, with more than 10,000 shapes from the draw.io libraries, including AWS, Azure, Google Cloud, Kubernetes and Cisco. The gallery shows one example of each type with its prompt.
I can't add a custom MCP server in ChatGPT
Your workspace admin may have turned off the option to add a custom MCP server. Ask your admin to turn it on.
VS Code doesn't use the draw.io tools
Click Start above the server entry in mcp.json, trust the folder when VS Code asks, and switch Copilot Chat to Agent mode. Check that the draw.io tools are turned on under Configure Tools in the chat input.
Do I need draw.io Desktop?
Only for the plugins, to export diagrams to PNG, SVG or PDF and to lay them out automatically. You don't need it for .drawio files, links or the MCP servers.
Which AI model draws the diagram?
The model of your assistant writes the diagram. The draw.io server turns it into a draw.io diagram. Write prompts compares the models, the time and the cost.
Versions and changes
The hosted server is updated for you. For the packages, check the current version before you update.
Learn more
Write better prompts, change and style your diagrams, and see an example of every diagram type.