Next AI Draw.io MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Port for the embedded HTTP server | 6002 |
| DRAWIO_BASE_URL | No | Base URL for the draw.io embed. Set this to use a self-hosted draw.io instance for private deployments. | https://embed.diagrams.net |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| start_sessionA | Start a new diagram session and open the browser for real-time preview. Starts an embedded server and opens a browser window with draw.io. The browser will show diagram updates as they happen. |
| create_new_diagramA | Create a NEW diagram from mxGraphModel XML. Use this when creating a diagram from scratch or replacing the current diagram entirely. CRITICAL: You MUST provide the 'xml' argument in EVERY call. Do NOT call this tool without xml. When to use this tool:
When to use edit_diagram instead:
XML FORMAT - Full mxGraphModel structure: LAYOUT CONSTRAINTS:
EDGE ROUTING RULES:
COMMON STYLES:
|
| edit_diagramA | Edit the current diagram by ID-based operations (update/add/delete cells). ⚠️ REQUIRED: You MUST call get_diagram BEFORE this tool! This fetches the latest state from the browser including any manual user edits. Skipping get_diagram WILL cause user's changes to be LOST. Workflow:
Operations:
For add/update, new_xml must be a complete mxCell element including mxGeometry. Example - Add a rectangle: {"operations": [{"operation": "add", "cell_id": "rect-1", "new_xml": "<mxCell id="rect-1" value="Hello" style="rounded=0;" vertex="1" parent="1"><mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>"}]} Example - Update a cell: {"operations": [{"operation": "update", "cell_id": "3", "new_xml": "<mxCell id="3" value="New Label" style="rounded=1;" vertex="1" parent="1"><mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>"}]} Example - Delete a cell: {"operations": [{"operation": "delete", "cell_id": "rect-1"}]} |
| get_diagramA | Get the current diagram XML (fetches latest from browser, including user's manual edits). Call this BEFORE edit_diagram if you need to update or delete existing elements, so you can see the current cell IDs and structure. |
| export_diagramA | Export the current diagram to a .drawio file. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| diagram-workflow | Guidelines for creating and editing draw.io diagrams |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hj1003862396/draw-flow-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server