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 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| 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 | |
TDQS
Scored across 5 tools
Each tool targets a distinct phase of the diagram workflow: session startup, creation, modification, retrieval, and export. The descriptions explicitly clarify the boundary between create_new_diagram and edit_diagram, preventing misselection.
All tool names follow a verb_noun pattern in snake_case (start_session, edit_diagram, get_diagram, export_diagram; create_new_diagram includes an adjective but still starts with a verb). There is no mixed case or inconsistent verb tense.
With 5 tools covering the complete lifecycle of a draw.io diagram, the count is well-scoped. It is not too small to be limiting nor too large to be confusing.
The tool set covers the full workflow: start a session, create a new diagram, read the current state, apply modifications (including add/update/delete operations), and export. No critical gaps are apparent for the stated purpose of diagram creation and editing.