drawio MCP Server
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DRAWIO_ELK_URL | No | Where the ELK layout bundle for postLayout is loaded from, an http(s) URL or a local path. Default: the CDN. | |
| DRAWIO_BASE_URL | No | Editor the diagrams open in, default the public web app. Set it to a self-hosted instance. | |
| DRAWIO_SHAPE_INDEX_URL | No | Where search_shapes loads its shape index from, an http(s) URL or a local path. Default: the CDN. | |
| DRAWIO_ICON_SERVICE_URL | No | Icon service that search_shapes queries when the shape index has no strong match. A self-hosted service base URL, or off to disable it. |
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 | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| open_drawio_xmlA | Opens the draw.io editor with a diagram from draw.io XML. Use it for custom styling, precise positioning and stencil-based diagrams (cloud, network, P&ID, UI mockups, floor plans); prefer open_drawio_mermaid for flowcharts, sequence, class, ER and the other types Mermaid covers. XML rules:
Only when the diagram needs layers, tags, metadata and placeholders, tables, cross-functional grids or dark-mode colors, call get_drawio_reference with format "xml" for the full reference. |
| open_drawio_csvA | Opens the draw.io editor with a diagram generated from CSV data. The CSV format should follow draw.io's CSV import specification which allows creating org charts, flowcharts, and other diagrams from tabular data. |
| open_drawio_mermaidA | Opens the draw.io editor with a diagram generated from Mermaid.js syntax, converted into an editable draw.io diagram. The recommended default for flowcharts, sequence, class, state and ER diagrams, gantt charts, mind maps, timelines, C4, architecture and the other types draw.io's Mermaid parser supports (28 in all). Call get_drawio_reference with format "mermaid" once before your first Mermaid diagram in a conversation: it lists the header keyword and syntax hints for every supported type (a misspelled header yields a blank diagram) and flowchart styling. |
| get_drawio_referenceA | Returns a full draw.io diagram generation reference as Markdown. Format "mermaid": the header keyword and syntax hints for every Mermaid type draw.io supports, flowchart styling and the ELK layout; call it once before the first Mermaid diagram in a conversation. Format "xml": everything beyond the rules in the open_drawio_xml description (layers, tags, metadata and placeholders, tables, cross-functional grids, dark-mode colors, more styles and examples); only needed when a diagram uses those. A reference stays valid for the rest of the conversation. |
| list_pagesA | Lists the pages (diagrams) in a local .drawio file without loading full page content. Returns each page's index, id, name, and approximate stored size in bytes. Call this first on large multi-page files before get_page/set_page, so only the page you actually need gets loaded into context. |
| get_pageA | Reads one page (diagram) from a local .drawio file and returns its raw mxGraphModel XML, decompressing it first if the file stores that page compressed. Use list_pages first to find the index, name, or id of the page you need. |
| set_pageA | Replaces the content of one page (diagram) in a local .drawio file with new mxGraphModel XML, leaving every other page in the file untouched. Compression of the replaced page matches whatever that page's original compression state was. Use list_pages/get_page first to find the target page. |
| search_shapesA | Search the draw.io shape library by keywords. Returns matching shapes with their exact style strings, dimensions, and titles. Covers ~10,000 built-in stencils (cloud architecture, network topology, P&ID, electrical, Cisco, Kubernetes, BPMN) and, when those are sparse, supplements results with the draw.io icon service (brand/product logos and general-purpose concept icons, e.g. 'react', 'slack', 'shopping cart', 'solar panel'). Use ONLY for diagrams that need industry-specific, branded, or pictorial icons. Do NOT use for standard diagram types like flowcharts, UML, ERD, org charts, or mind maps — these use basic geometric shapes (rectangles, diamonds, circles, cylinders) that are already covered in the XML reference. Also skip if the user asks to use basic/simple shapes or says not to search. The style string from the results can be used directly in mxCell style attributes. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
The three open_drawio_* tools share the 'open editor with a diagram' purpose and differ only by input format (CSV/XML/Mermaid), which could cause misselection. However, the descriptions explicitly cross-reference each other ('prefer open_drawio_mermaid for flowcharts', 'do NOT use search_shapes for standard diagrams'), so boundaries are well signposted. The file tools (list_pages/get_page/set_page/reference/search_shapes) are each clearly distinct.
Almost everything follows a clean verb_noun snake_case pattern: list_pages, get_page, set_page, search_shapes, get_drawio_reference. The open_drawio_csv/xml/mermaid trio inserts the product name mid-name, a minor deviation, but consistent with each other and readable.
Eight tools is well-scoped for a draw.io diagram server: three generation entry points, two file-page operations, a page lister, a reference doc, and a shape search. Each tool has a clear reason to exist with no redundancy.
Covers diagram creation (CSV/XML/Mermaid), reading and writing existing .drawio pages, shape lookup, and a reference. Gaps exist around lifecycle: no way to create a new .drawio file, add or delete a page, or list local files, forcing workarounds via set_page. Core workflows are otherwise covered.