Next AI Draw.io MCP Server
Lets a coding agent draw and edit draw.io diagrams, with a live preview in your browser
What it does
Next AI Draw.io is a diagram tool with a web app, a desktop app and this MCP server. The server gives an agent tools to create a draw.io diagram from XML, edit cells by id, read back the current diagram including your manual edits and selection, take a screenshot to check its own work, and export to .drawio, .png or .svg.
It opens a preview on a local port where you and the agent work on the same canvas. The draw.io editor ships inside the package, so the preview works offline, and diagrams are saved under ~/.next-ai-drawio/ with the last 20 versions.
It is a community project with one main author, not draw.io's own server; the package README compares it with draw.io's official @drawio/mcp and others. On a machine without a display the preview does not open by itself and the agent has to hand you the URL.
Tools
Listed by starting the server ourselves on Nov 27, 2026. The grouping uses the server's own annotations.
Read-only · 7
get_drawing_guideget_shape_librarylist_saved_diagramsget_diagramget_selectionscreenshot_diagramlist_pages
Writes or acts · 9
start_sessioncreate_new_diagramload_diagramedit_diagramexport_diagramadd_pagerename_pagedelete_pagerestore_version
Install
Claude Code
Not yet tested by usThe project's README gives this command; --scope user makes the server available in every project. We have not run it in Claude Code.
claude mcp add --scope user drawio -- npx @next-ai-drawio/mcp-server@latest
Launch command (any stdio client)
Tested Nov 27, 2026 on Linux arm64 container, stdio test clientWe started the server with this command in a clean Linux container and confirmed it completes the MCP handshake and answers tools/list:
npx -y @next-ai-drawio/mcp-server@latest
We ran it with BROWSER=none, since the container has no display, and did not draw a diagram.
Use the same command and arguments in any client that launches local servers. We have not yet tested it inside a specific client.
Before you adopt it
6 of 6 key facts checked- Tools and what they can changeExactly what an agent can read, write or delete
- 16 tools: 7 read-only, 9 that write or act, 0 marked destructive by the server. No tool carries a destructive mark, but create_new_diagram and load_diagram replace the whole diagram and delete_page removes a page.Checked Nov 27, 2026 · source
- Required credentials and scopesLeast-privilege setup with no first-run failure
- Started and listed its tools with no credentials.Checked Nov 27, 2026 · source
- Tool-definition token costContext used on every request
- About 5,226 tokens for the tool definitions (size of the tools/list reply divided by four; an estimate, not a tokeniser count).Checked Nov 27, 2026 · source
- Package and versionThe exact package or image you will run, and who publishes it
- @next-ai-drawio/mcp-server 0.4.15 on npm, published by the repository's authorChecked Nov 27, 2026 · source
- Where your data goesLocal only, or through the vendor's cloud; any telemetry
- Local: the preview is served from your machine on port 6002 (the next free port up to 6020 if taken), the draw.io editor is bundled in the package, and diagrams are saved to ~/.next-ai-drawio. Set DRAWIO_DATA_DIR=off to stop saving.Checked Nov 27, 2026 · source
- Last releaseThe spec and upstream APIs change fast
- 0.4.15 on npm, published 2026-11-14Checked Nov 27, 2026 · source
- Resources and promptsWhat it exposes beyond tools
- 0 resources and 1 prompt listed.Checked Nov 27, 2026 · source
- Known errors and fixesSaves an hour of debugging
- In Codex CLI, `codex exec` without full access fails with "MCP tool call requires approval"; the README gives a config.toml setting that approves the drawio tools.Checked Nov 27, 2026 · source
- Runtime requirementsNode, Python, Docker, operating system
- Node.js 18 or later (package engines). The preview needs a browser on the same machine; set BROWSER=none to have the URL returned instead.Checked Nov 27, 2026 · source
