Get started
Choose your assistant and follow the setup steps.
- Claude
- Claude Code
- ChatGPT
- Codex
- Copilot
- Cursor
- Antigravity
- Other
Recommended The MCP App Server where 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 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.
draw.io Desktop must be installed to export diagrams. To open a 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 the following URL under Connection:This server needs no sign-in, so leave Authentication off.
https://mcp.draw.io/mcp - 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.
If the option to add a custom MCP server is missing, your workspace administrator may have disabled it.
Recommended The draw.io plugin creates .drawio files in your project, and can export them to PNG, SVG or PDF.
- Add the plugin marketplace and install the plugin in the Codex CLI:
codex plugin marketplace add jgraph/drawio-mcp
codex plugin add drawio@drawio
- Ask Codex for a diagram. Add
png,svgorpdfto your request to export it, orurlto open it in draw.io in your browser.
draw.io Desktop must be installed to export diagrams. To open a diagram in the draw.io editor instead, add the MCP Tool Server:
codex mcp add drawio -- npx -y @drawio/mcp
Recommended The MCP App Server in VS Code 1.109 or later where 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 display the diagram. Follow the link to open it in draw.io.
copilot mcp add --transport http drawio https://mcp.draw.io/mcp
To create .drawio files and export them to 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 where 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.
Recommended The draw.io plugin creates .drawio files in your project, and can export them to PNG, SVG or PDF.
- Install the plugin in the Antigravity CLI.
agy plugin install https://github.com/jgraph/drawio-mcp/tree/main/plugins/antigravity
- Ask for a diagram. Add
png,svgorpdfto your request to export it, orurlto open it in draw.io in your browser.
draw.io Desktop must be installed to export diagrams.
Note: Run the same command again to update the plugin.
Add the hosted server as a remote MCP server in any assistant that supports MCP. In assistants that support MCP Apps, diagrams will appear in the chat.
https://mcp.draw.io/mcp
In assistants that don't support MCP Apps, the server answers with a link that will open the diagram in draw.io.
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
Follow the README on GitHub to set this up for Claude Desktop, OpenCode and self-hosting.
Choose a setup
They all create native draw.io diagrams (files with the .drawio extension). They open diagrams in different locations and may require installations.
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, Cursor and Antigravity 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 the technical documentation for each client and for self-hosting.
jgraph/drawio-mcp on GitHub →| Setup | Where the diagram appears | What to install | Why you would choose this setup |
|---|---|---|---|
| MCP App Server | In the chat, click 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 | Saved .drawio files, PNG, SVG or PDF exports, or a link | A plugin, and draw.io Desktop to export images | Claude Code, Codex CLI, GitHub Copilot, Cursor and Antigravity |
| Docker image | In the chat, like the hosted server | Docker, on your machine or server | To keep diagrams on your own network |
Examples
Each diagram is the unedited result of the prompt written beneath.
Copy a prompt and try it in your assistant, or open the example 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 wireframe of a mobile app login screen: logo, email and password fields, a sign-in button, a forgot-password link and social login buttons.”
“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 requires 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 content.
- It doesn't store your diagram data, and we don't use your data to train any AI models.
- To keep diagrams inside your own network, run the Docker image or the MCP Tool Server instead.
Read the privacy policy for draw.io in AI assistants to see how draw.io works with AI models and LLMs, and where your diagram data is transmitted with each setup in the Data residency and offline use section.
Questions and troubleshooting
Troubleshoot: 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 will open the diagram in draw.io.
Troubleshoot: I can't add a custom MCP server in ChatGPT
Your workspace administrator may have disabled the option to add a custom MCP server. Ask your administrator to enable it.
Troubleshoot: 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.
How do I change a diagram?
Ask your assistant to make a change in the same chat, for example to use another colour theme, different icons or add a missing step. To edit the diagram yourself, click Open in draw.io. See how to get the AI assistant to make changes with 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 generated gallery shows one example of each type with its prompt.
Can the diagrams use SAP icons, or icons from other draw.io libraries?
Yes. The draw.io MCP servers search more than 10,000 draw.io shapes, including SAP, AWS, Azure, Google Cloud, Cisco, Kubernetes and P&ID. Name the icon set in your prompt, for example "Use SAP icons" or "Use the SAP BTP service icons", and the assistant looks up the shapes before it draws the diagram. See the SAP integration example.
Is draw.io in the ChatGPT and Codex plugin directory?
Not yet. The draw.io plugin is in review for OpenAI's plugin directory. Until it is listed, add draw.io in ChatGPT as a custom MCP server, and install the draw.io plugin in Codex from GitHub.
Can I use draw.io in VS Code without the hosted server?
Yes. Run the MCP Tool Server on your computer. It needs Node.js, and will open diagrams in the draw.io editor in your browser. Add it to .vscode/mcp.json:
{
"servers": {
"drawio": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@drawio/mcp"]
}
}
}
To keep the diagrams in Copilot Chat, run the MCP App Server with Docker on your computer, and use http://localhost:3001/mcp as the URL.
Can I edit the diagrams in VS Code?
Yes, with Henning Dieterichs' unofficial draw.io extension for VS Code. It opens .drawio and .drawio.svg files in the draw.io editor inside VS Code.
Do I need to install draw.io Desktop?
Install draw.io Desktop to use draw.io editor plugins, to export diagrams to PNG, SVG or PDF and to lay them out automatically. You don't need it for .drawio files, generating links with embedded diagram information or to use the MCP servers.
Which AI model draws the diagram?
The model of your assistant writes the diagram as text. The draw.io server turns this into a draw.io diagram using native shapes. Compare AI models.
Versions and changes
The hosted server is regularly updated. Check the current version before you update packages.
Learn more
Write better prompts, change and style your diagrams, and browse examples of many different types of generated technical diagrams.