Get the FREE Ultimate OpenClaw Setup Guide →

drawio

Draw.io Model Context Protocol (MCP) Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio lgazo-drawio-mcp-server npx -y drawio-mcp-server --editor

How to use

The Draw.io MCP server brings the Draw.io diagramming experience into MCP-enabled workflows. It exposes MCP tools that let AI agents inspect, create, modify, and organize diagram elements such as shapes, edges, and layers. Built-in support includes a diagram editor that can be served locally, allowing agents to drive diagramming tasks through MCP commands, as well as an option to connect via a browser extension for interaction with a Draw.io instance running in your browser. The server is designed to work with any MCP client (Claude Desktop, Claude Code, Zed, Codex, OpenCode, etc.), enabling automated diagram generation and documentation workflow at scale. You can run the editor directly (via the --editor mode) or connect to a remote Draw.io instance through the extension workflow described in the project documentation.

How to install

Prerequisites:

  • Node.js v20 or higher
  • Optional: pnpm (recommended) or npm

Install steps (local or global):

  1. Using npx (no global install required):
npx -y drawio-mcp-server --editor
  1. Global npm install (optional):
npm install -g drawio-mcp-server
  1. Verify installation and run the server (example):
drawio-mcp-server --editor
  1. If you intend to run without the built-in editor, omit the --editor flag and configure via your MCP host as needed.

After installation, follow the host-specific configuration instructions in the README to integrate the server with Claude, Zed, Codex, OpenCode, or other MCP clients.

Additional notes

Tips and notes:

  • The server exposes a local editor at http://localhost:3000 when started with the --editor flag.
  • If you prefer the browser-extension workflow, you can connect Draw.io running in your browser to the MCP server via the extension; see the extension documentation for details.
  • Port and host binding can be customized via MCP host configuration if needed.
  • Environment variables can be provided by the MCP client (for example, to set authentication or endpoints). If unused, you can keep env as an empty object in client configs.
  • This server supports typical MCP tooling for diagrams: read/write shapes, edges, labels, and layers, as well as layer management operations.

Related MCP Servers

Sponsor this space

Reach thousands of developers