Draw MCP Server

MCP server for Next AI Draw.io - AI-powered diagram generation with real-time browser preview

Remote serverstreamable-http

What is the Draw MCP server?

MCP server for Next AI Draw.io - AI-powered diagram generation with real-time browser preview. Exposed over MCP by the draw mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

MCP (Model Context Protocol) server that enables AI agents like Claude Desktop and Cursor to generate and edit draw.io diagrams with real-time browser preview.

  • Real-time Preview — Diagrams appear and update in your browser as the AI creates them
  • Version History — Restore previous diagram versions with visual thumbnails - click the clock button (bottom-right) to browse and restore earlier states
  • Natural Language — Describe diagrams in plain text - flowcharts, architecture diagrams, etc
  • Edit Support — Modify existing diagrams with natural language instructions
  • Export — Save diagrams as .drawio files
  • Self-contained — Embedded server, works offline (except draw.io UI which loads from embed.diagrams.net by default, configurable via DRAWIO_BASE_URL)

Adding it to your client

Being a remote server, there is no local install. You register the endpoint with your client, authorise it once, and the tools appear.

Its toolset

Everything the assistant can do here goes through one of these:

  • start_session — Opens browser with real-time diagram preview
  • create_new_diagram — Create a new diagram from XML (requires xml argument)
  • edit_diagram — Edit diagram by ID-based operations (update/add/delete cells)
  • get_diagram — Get the current diagram XML
  • export_diagram — Save diagram to a .drawio file
  • Cursor — The Cursor tool exposed by this server

Configuration

You will need 2 environment variables: DRAWIO_BASE_URL, PORT. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Caveats

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the draw mcp server does with a few real requests.

When to reach for it

This sits in the browser automation group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Draw's toolset — start_session, create_new_diagram, edit_diagram and 3 more — is a fair guide to whether it matches your workflow. It is maintained by hj1003862396; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
start_sessionOpens browser with real-time diagram preview
create_new_diagramCreate a new diagram from XML (requires xml argument)
edit_diagramEdit diagram by ID-based operations (update/add/delete cells)
get_diagramGet the current diagram XML
export_diagramSave diagram to a .drawio file
CursorThe Cursor tool exposed by this server.

How to install the Draw MCP server

{
  "mcpServers": {
    "drawio": {
      "command": "npx",
      "args": ["@next-ai-drawio/mcp-server@latest"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
DRAWIO_BASE_URLEndpoint or connection string the server talks to.Yes
PORTConfiguration value read at startup.Optional

Example prompts to try

  • Use Draw to start session.
  • Use Draw to create new diagram.
  • Use Draw to edit diagram.

Frequently asked questions

It connects Draw to MCP-compatible AI assistants such as Claude and Cursor, exposing 6 tools (start_session, create_new_diagram, edit_diagram, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Draw directly.