About Drawio MCP Server
Drawio MCP Server is an MCP server published by simonkurtz-MSFT in the Cloud category: a Model Context Protocol (MCP) server for programmatic diagram generation using Draw.io (Diagrams.net). This server generates Draw.io XML directly — no browser extension or Draw.io instance required. Conduid read 31 tools from its source: add-cells, add-cells-to-group, clear-diagram, create-groups, create-layer, create-page and 25 more. No package is published for it, so it installs from a source checkout.
The repository has 82 stars and 18 forks, is licensed MIT, and its last commit was on 15 May 2026. The latest release is 3.0.1 (21 Feb 2026): Reduced container image size — Now stripping debug symbols from the deno compilation. The release before it was 3.0.0 (20 Feb 2026). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include diagram, cloud and azure.
Install
git clone https://github.com/simonkurtz-MSFT/drawio-mcp-serverTools (31)
add-cellsAdd vertices and/or edges. Supports `shape_name` for icon resolution, `temp_id` for within-batch references, and `dry_run` validation.| Parameter | Type | Description |
|---|---|---|
| cells | array | Cell type: 'vertex' for shapes, 'edge' for connections |
| dry_run | boolean | If true, validates the batch without persisting changes. Use to check for errors before committing. |
add-cells-to-groupAssign cells to groups.| Parameter | Type | Description |
|---|---|---|
| assignments * | array | ID of the cell to add to a group |
clear-diagramClear all cells and reset the diagram.create-groupsCreate group/container cells for VNets, subnets, resource groups, etc.| Parameter | Type | Description |
|---|---|---|
| groups | array | X-axis position of the group |
create-layerCreate a new layer.| Parameter | Type | Description |
|---|---|---|
| name * | string | Name for the new layer |
create-pageCreate a new page (tab) in the diagram.delete-cell-by-idRemove a cell (vertex or edge) by ID. Cascade-deletes connected edges for vertices.| Parameter | Type | Description |
|---|---|---|
| cell_id * | string | The ID of a cell to delete. The cell can be either vertex or edge. The ID is located in `id` attribute. |
delete-pageDelete a page and all its contents. Cannot delete the last page.edit-cellsUpdate vertex cell properties (position, size, text, style).| Parameter | Type | Description |
|---|---|---|
| cells | array | ID of the cell to update |
edit-edgesUpdate edge properties (text, source, target, style).| Parameter | Type | Description |
|---|---|---|
| edges | array | Identifier (`id` attribute) of the edge cell to update. The ID must reference an edge. |
export-diagramExport the diagram as Draw.io XML.| Parameter | Type | Description |
|---|---|---|
| background | string | Background color for the diagram (e.g. "#FFFFFF" for white). Use "none" for a transparent background. Defaults to "#FFFFFF" (white). |
| compress | boolean | When true, deflate-compress and base64-encode the diagram content inside the <diagram> element (Draw.io native format). Reduces output size by 60-80%. Defaults to false (plain XML). |
finish-diagramCRITICAL: You MUST call this tool at the end of any transactional workflow to resolve placeholders to real SVG shapes and return production-ready XML. If you do not call this, the user will receive an incomplete diagram. Use this after a transactional workflow and before export-diagram. Compressed output is recommended for large diagrams.| Parameter | Type | Description |
|---|---|---|
| background | string | Background color for the diagram (e.g. "#FFFFFF" for white). Use "none" for a transparent background. Defaults to "#FFFFFF" (white). |
| compress | boolean | When true, deflate-compress and base64-encode the diagram content inside the <diagram> element (Draw.io native format). Defaults to true for efficient output. |
get-active-pageGet the currently active page.get-diagram-statsStatistics about cell counts, bounds, and layer distribution.get-shape-categoriesList all shape categories (General, Flowchart, Azure categories).get-shapes-in-categoryList all shapes in a category by `category_id`.| Parameter | Type | Description |
|---|---|---|
| category_id * | string | Identifier (ID / key) of the category from which all the shapes should be retrieved. |
get-style-presetsGet built-in style presets (Azure colors, flowchart shapes, edge styles).import-diagramImport a Draw.io XML string, replacing the current diagram.| Parameter | Type | Description |
|---|---|---|
| xml * | string | The Draw.io XML string to import |
list-group-childrenList all cells contained in a group.| Parameter | Type | Description |
|---|---|---|
| group_id * | string | ID of the group/container cell |
list-layersList all layers with IDs and names.list-paged-modelPaginated view of all cells with filtering by type.| Parameter | Type | Description |
|---|---|---|
| filter | object | Filter by cell type: 'edge' for connection lines, 'vertex' for vertices/shapes |
| page | number | Zero-based page number for pagination. Page 0 returns the first batch of cells, page 1 returns the next batch, etc. Default is 0. |
| page_size | number | Maximum number of cells to return in a single page. Controls response size and performance. Must be between 1 and 1000. Default is 50. |
list-pagesList all pages with IDs and names.move-cell-to-layerMove a cell to a different layer.| Parameter | Type | Description |
|---|---|---|
| cell_id * | string | ID of the cell to move |
| target_layer_id * | string | ID of the target layer where the cell will be moved |
remove-cell-from-groupRemove a cell from its group, returning it to the active layer.| Parameter | Type | Description |
|---|---|---|
| cell_id * | string | ID of the cell to remove from its group |
rename-pageRename an existing page.search-shapesFuzzy search for shapes including 700+ Azure icons. Pass all queries in the `queries` array.| Parameter | Type | Description |
|---|---|---|
| limit | number | Maximum results to return per query (1-50) |
| queries * | array | Array of ALL search terms — main flow AND cross-cutting services. Gather every shape you need and pass them all here in a SINGLE call. Example: ['front door', 'container apps', 'app service', 'key vault', 'monitor', 'entra id', 'azure policy', 'container registry'] |
set-active-layerSet the active layer for new elements.| Parameter | Type | Description |
|---|---|---|
| layer_id * | string | ID of the layer to set as active |
set-active-pageSwitch to a different page.set-cell-shapeApply library shape styles to existing cells.| Parameter | Type | Description |
|---|---|---|
| cells * | array | Cell ID to update |
suggest-group-sizingSuggest group/container width and height based on vertically stacked children, spacing, and padding. Use before create-groups to avoid overflow.| Parameter | Type | Description |
|---|---|---|
| child_count * | number | Number of children that will be placed in the group |
| child_height | number | Typical child height in pixels |
| child_width | number | Typical child width in pixels |
| horizontal_padding | number | Left/right padding inside the group in pixels |
| min_height | number | Minimum recommended group height |
| min_width | number | Minimum recommended group width |
| vertical_padding | number | Top/bottom padding inside the group in pixels |
| vertical_spacing | number | Vertical spacing between stacked children in pixels |
validate-group-containmentValidate that all child cells of a group are visually inside the group's boundary. Returns out-of-bounds warnings and guidance for fixing placement.| Parameter | Type | Description |
|---|---|---|
| group_id * | string | ID of the group/container cell to validate |
Security checks
Static checks derived from the repository 10 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 2.5K words.
- ✓License declaredThe repository declares the MIT license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by deno.lock.
- ✓No dynamic code executionScanned 14 source files and found no eval, dynamic Function or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
What the source scan found
- Transport
- stdiosrc/index.ts:14
- Starts other programs
- No calls that start other programs
- Outbound network calls
- No outbound network calls
- Writes or deletes files
- No file writes or deletes
- Lockfile
- deno.lock
Pattern matches on the source text of 14 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 2.5K words, fetched a month ago. The original in the repository is authoritative.
Read full README