Gene Library Courses Download Pricing Contact Sign in
drawio logo
design Official Website

Draw.io MCP Server – AI Diagram Creation

Draw.io's official MCP servers let AI agents create and open editable diagrams using draw.io XML, CSV, and Mermaid syntax. Use them for architecture diagrams, flowcharts, organization charts, UML, cloud designs, process maps, and other visual documentation.

#diagramming#flowcharts#visual-documentation

Overview

Draw.io provides official MCP integrations for generating and opening diagrams from AI assistants. The project includes a hosted MCP App server for inline diagrams and a local MCP Tool server for opening editable diagrams directly in the draw.io editor. Together, they support visual workflows based on draw.io XML, CSV, and Mermaid syntax.

What the MCP server enables

Depending on the selected transport, an AI agent can:

  • Render draw.io XML as an interactive diagram inside an MCP Apps-compatible chat.
  • Convert Mermaid definitions into editable draw.io diagrams.
  • Open CSV-driven diagrams such as organization charts and process structures.
  • Search more than 10,000 shapes across draw.io libraries, including AWS, Azure, GCP, Kubernetes, Cisco, UML, BPMN, electrical, and P&ID sets.
  • Use zoom, pan, layers, fullscreen, lightbox, and dark-mode viewing options.
  • Open generated diagrams in the full draw.io editor for further editing.
  • Apply optional ELK layered layout to supported generated diagrams.
  • Target a self-hosted draw.io instance with the local tool server.

When to use it

Use Draw.io MCP when an AI workflow needs an editable technical or business diagram rather than a static image. Typical examples include software architecture, network and cloud diagrams, sequence diagrams, ER diagrams, UML, BPMN flows, organization charts, infrastructure maps, state diagrams, and process documentation.

The hosted MCP App server is best when diagrams should appear directly inside a compatible chat. The local tool server is better for workflows that should open the result in draw.io for hands-on editing.

Connection and authentication

The official hosted endpoint is https://mcp.draw.io/mcp over Streamable HTTP. It requires no installation and does not document an API key, OAuth flow, or bearer token. Full inline rendering requires an MCP host that supports MCP Apps; otherwise, the tool returns diagram XML as text.

For local stdio workflows, Draw.io publishes the official @drawio/mcp package:

npx -y @drawio/mcp

The optional DRAWIO_BASE_URL environment variable can point the local tool server to a self-hosted draw.io instance.

Key considerations

Diagram data sent to the hosted MCP App server leaves the local machine as part of the MCP request. The local tool server keeps diagram content in the generated URL fragment, which browsers do not transmit to the server. The hosted inline viewer still loads draw.io viewer code, and the local tool server loads the draw.io web application unless a self-hosted base URL is configured. Review generated diagrams for correctness, sensitive data, readability, and layout quality before sharing.

Supported Transports

streamable_http

URL: https://mcp.draw.io/mcp

stdio

Command: npx

Args:

  • -y
  • @drawio/mcp

Frequently Asked Questions

When should an AI agent use the Draw.io MCP server?
Use it when a task benefits from an editable visual diagram, such as architecture maps, flowcharts, organization charts, UML, sequence diagrams, ER diagrams, cloud infrastructure, or process documentation.
What does the Draw.io MCP server add to an AI agent's capabilities?
It lets the agent render or open editable draw.io diagrams from XML, CSV, or Mermaid content, search the draw.io shape libraries, and present the result inline or in the full draw.io editor.
What can an AI agent create or manage through Draw.io MCP?
The agent can create diagrams from draw.io XML, CSV, or Mermaid, search more than 10,000 shapes, apply supported layout options, render interactive inline views, and open diagrams in draw.io for manual editing.
How is authentication configured for the Draw.io MCP server?
The official hosted endpoint does not document an API key, OAuth flow, bearer token, or required environment variable. The local stdio package also requires no credential for the default draw.io service, while DRAWIO_BASE_URL can point it to a self-hosted instance.
Which transport should be used for the Draw.io MCP server?
Use Streamable HTTP with https://mcp.draw.io/mcp for hosted inline diagrams in MCP Apps-compatible clients. Use stdio with the official @drawio/mcp package when the workflow should open diagrams directly in the draw.io editor or target a self-hosted draw.io deployment.