Draw Flow
FreeNot checkedGenerates and edits draw.io diagrams with real-time browser preview and version history.
About
Generates and edits draw.io diagrams with real-time browser preview and version history.
README
MCP (Model Context Protocol) server that enables AI agents like Claude Desktop and Cursor to generate and edit draw.io diagrams with real-time browser preview.
Self-contained - includes an embedded HTTP server, no external dependencies required.
Quick Start
{
"mcpServers": {
"drawio": {
"command": "npx",
"args": ["@next-ai-drawio/mcp-server@latest"]
}
}
}
Installation
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"drawio": {
"command": "npx",
"args": ["@next-ai-drawio/mcp-server@latest"]
}
}
}
VS Code
Add to your VS Code settings (.vscode/mcp.json in workspace or user settings):
{
"mcpServers": {
"drawio": {
"command": "npx",
"args": ["@next-ai-drawio/mcp-server@latest"]
}
}
}
Cursor
Add to Cursor MCP config (~/.cursor/mcp.json):
{
"mcpServers": {
"drawio": {
"command": "npx",
"args": ["@next-ai-drawio/mcp-server@latest"]
}
}
}
Cline (VS Code Extension)
- Click the MCP Servers icon in Cline's top menu bar
- Select the Configure tab
- Click Configure MCP Servers to edit
cline_mcp_settings.json - Add the drawio server:
{
"mcpServers": {
"drawio": {
"command": "npx",
"args": ["@next-ai-drawio/mcp-server@latest"]
}
}
}
Claude Code CLI
claude mcp add drawio -- npx @next-ai-drawio/mcp-server@latest
Other MCP Clients
Use the standard MCP configuration with:
- Command:
npx - Args:
["@next-ai-drawio/mcp-server@latest"]
Usage
- Restart your MCP client after updating config
- Ask the AI to create a diagram:
"Create a flowchart showing user authentication with login, MFA, and session management"
- The diagram appears in your browser in real-time!
Features
- Real-time Preview: Diagrams appear and update in your browser as the AI creates them
- Version History: Restore previous diagram versions with visual thumbnails - click the clock button (bottom-right) to browse and restore earlier states
- Natural Language: Describe diagrams in plain text - flowcharts, architecture diagrams, etc.
- Edit Support: Modify existing diagrams with natural language instructions
- Export: Save diagrams as
.drawiofiles - Self-contained: Embedded server, works offline (except draw.io UI which loads from
embed.diagrams.netby default, configurable viaDRAWIO_BASE_URL)
Available Tools
| Tool | Description |
|---|---|
start_session |
Opens browser with real-time diagram preview |
create_new_diagram |
Create a new diagram from XML (requires xml argument) |
edit_diagram |
Edit diagram by ID-based operations (update/add/delete cells) |
get_diagram |
Get the current diagram XML |
export_diagram |
Save diagram to a .drawio file |
How It Works
┌─────────────────┐ stdio ┌─────────────────┐
│ Claude Desktop │ <───────────> │ MCP Server │
│ (AI Agent) │ │ (this package) │
└─────────────────┘ └────────┬────────┘
│
┌────────▼────────┐
│ Embedded HTTP │
│ Server (:6002) │
└────────┬────────┘
│
┌────────▼────────┐
│ User's Browser │
│ (draw.io embed) │
└─────────────────┘
- MCP Server receives tool calls from Claude via stdio
- Embedded HTTP Server serves the draw.io UI and handles state
- Browser shows real-time diagram updates via polling
Configuration
| Variable | Default | Description |
|---|---|---|
PORT |
6002 |
Port for the embedded HTTP server |
DRAWIO_BASE_URL |
https://embed.diagrams.net |
Base URL for the draw.io embed. Set this to use a self-hosted draw.io instance for private deployments. |
Private Deployment (Self-hosted draw.io)
For security-sensitive environments that require private deployment of draw.io:
{
"mcpServers": {
"drawio": {
"command": "npx",
"args": ["@next-ai-drawio/mcp-server@latest"],
"env": {
"DRAWIO_BASE_URL": "https://drawio.your-company.com"
}
}
}
}
You can deploy your own draw.io instance using the official Docker image:
docker run -d -p 8080:8080 jgraph/drawio
Then set DRAWIO_BASE_URL=http://localhost:8080 (or your server's URL).
Troubleshooting
Port already in use
If port 6002 is in use, the server will automatically try the next available port (up to 6020).
Or set a custom port:
{
"mcpServers": {
"drawio": {
"command": "npx",
"args": ["@next-ai-drawio/mcp-server@latest"],
"env": { "PORT": "6003" }
}
}
}
"No active session"
Call start_session first to open the browser window.
Browser not updating
Check that the browser URL has the ?mcp= query parameter. The MCP session ID connects the browser to the server.
License
Apache-2.0
Installing Draw Flow
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/hj1003862396/draw-flow-mcp-serverFAQ
Is Draw Flow MCP free?
Yes, Draw Flow MCP is free — one-click install via Unyly at no cost.
Does Draw Flow need an API key?
No, Draw Flow runs without API keys or environment variables.
Is Draw Flow hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Draw Flow in Claude Desktop, Claude Code or Cursor?
Open Draw Flow on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Playwright
Browser automation, scraping, screenshots
by MicrosoftPuppeteer
Browser automation and web scraping.
by modelcontextprotocolopentabs-dev/opentabs
Plugin-based MCP server + Chrome extension that gives AI agents access to web applications through the user's authenticated browser session. 100+ plugins with a
by opentabs-devrobhunter/agentdeals
1,500+ developer infrastructure deals, free tiers, and startup programs across 54 categories. Search deals, compare vendors, plan stacks, and track pricing chan
by robhunterCompare Draw Flow with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All browse MCPs
