Price Per TokenPrice Per Token

Draw.io MCP Server

by lgazo

0

About

Draw.io MCP Server gives AI agents programmatic control over Draw.io (Diagrams.net) diagrams. It provides MCP tools that enable automatic creation, reading, updating, and deletion of diagram elements, allowing AI assistants to generate architectural diagrams, flowcharts, and visual documentation from code or natural language prompts. Key features include: - Complete diagram manipulation including shapes, connectors, text, and styling - Built-in Draw.io editor that runs in the browser without requiring browser extensions - Support for hierarchical structures with nested shapes, grouping, and parent-child relationships - Layer management for organizing complex multi-layer diagrams - Works with any MCP-compatible client including Claude Desktop, Claude Code, Zed, and Codex - Optional browser extension mode for integration with existing Draw.io web instances

README

Draw.io MCP server

Let's do some Vibe Diagramming with the most wide-spread diagramming tool called Draw.io (Diagrams.net).

[](https://discord.gg/dM4PWdf42q) [](https://github.com/lgazo/drawio-mcp-server/actions/workflows/ci.yml) [](https://mseep.ai/app/5fc2b7fe-8ceb-4683-97bd-6d31e07b5888) [](https://npmjs.com/package/drawio-mcp-server)

Key Highlights

  • Parent-child relationships for nested shapes and grouping
  • Built-in Draw.io editor - no browser extension required
  • MCP server that lets AI agents control Draw.io diagrams
  • Programmatic diagram creation, inspection, and modification via MCP tools
  • Layer management for complex diagrams
  • Works with any MCP client (Claude Desktop, Claude Code, Zed, Codex, etc.)
  • Introduction

    The Draw.io MCP server brings Draw.io diagramming capabilities to AI agents. It provides MCP tools that can create, read, update, and delete diagram elements - letting AI assistants build architectural diagrams, flowcharts, and visual documentation automatically.

    Two ways to use: 1. Built-in editor - Server hosts Draw.io directly, accessible in your browser 2. Browser extension - Connect to Draw.io running in your browser via extension

    Requirements

  • Node.js (v20 or higher) - Runtime environment for the MCP server
  • MCP client - Claude Desktop, Claude Code, Zed, Codex, OpenCode, or any MCP-compatible host
  • For Built-in Editor

    No additional requirements - runs out of the box with --editor flag.

    For Browser Extension

  • Browser extension - drawio-mcp-extension
  • Draw.io open in your browser
  • Optional

  • pnpm - Preferred package manager (npm works fine too)
  • Quick Start

    1. Configure your MCP host

    Add the server to your MCP client configuration:

    Claude Desktop

    Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

    {
      "mcpServers": {
        "drawio": {
          "command": "npx",
          "args": ["-y", "drawio-mcp-server", "--editor"]
        }
      }
    }
    

    Claude Code

    claude mcp add-json drawio '{"type":"stdio","command":"npx","args":["-y","drawio-mcp-server","--editor"]}'
    

    Zed

    Add to ~/.config/zed/settings.json:

    {
      "context_servers": {
        "drawio": {
          "command": "npx",
          "args": ["-y", "drawio-mcp-server", "--editor"],
          "env": {}
        }
      }
    }
    

    Codex

    Edit ~/.codex/config.toml:

    [mcp_servers.drawio]
    command = "npx"
    args = ["-y", "drawio-mcp-server", "--editor"]
    

    OpenCode

    Add to opencode.json in your project root or ~/.config/opencode/opencode.json:

    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "drawio": {
          "type": "local",
          "command": ["npx", "-y", "drawio-mcp-server", "--editor"],
          "enabled": true
        }
      }
    }
    

    For other MCP clients and detailed configuration (including pnpm options), see Configuration.

    2. Open the editor

    After restarting your MCP host, open: http://localhost:3000/

    3. Start diagramming

    Example prompts you can try:

    > "Create an event-driven architecture diagram showing a message queue with producers, consumers, and three backend services"

    > "Draw a CRUD API diagram with a database, API gateway, and four microservices with their endpoints"

    > "Add a new layer called 'Background' and move all decorative elements to it, then create a new layer for annotations"

    Your AI assistant can now control the diagram using MCP tools.

    Features

    The server provides MCP tools for:

  • Diagram inspection - read shapes, layers, and cell properties
  • Diagram modification - add/edit/delete shapes, edges, and labels
  • Layer management - create, switch, and organize layers
  • See Tools Reference for the complete list of available tools.

    Installation

    The server runs as part of your MCP host. Detailed configuration for all supported clients (Claude Desktop, Claude Code, Zed, Codex, oterm) including npm and pnpm options is available in Configuration.

    Alternative: Browser Extension

    Instead of the built-in editor, you can use the browser extension to connect to Draw.io running in your browser. This works with or without the --editor flag.

    1. Open Draw.io in your browser 2. Install the Dr

    Related MCP Servers

    AI Research Assistant

    AI Research Assistant

    hamid-vakilzadeh

    AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar

    Web & Search
    12 8
    Linkup

    Linkup

    LinkupPlatform

    Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages

    Web & Search
    2 24
    Math-MCP

    Math-MCP

    EthanHenrickson

    Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support

    Developer Tools
    22 81