drawio-mcp-server

drawio-mcp-server

Enables creating and editing draw.io diagrams from structured descriptions, rendering them as interactive inline SVGs, and providing access to the full draw.io editor for further modification and export.

Category
Visit Server

README

drawio-mcp-server

An MCP (Model Context Protocol) server for draw.io / diagrams.net with an interactive, editable diagram UI.

It exposes tools to build a diagram from a structured description (nodes + edges) and render it on an embedded, editable draw.io canvas right inside the client — where the user can keep editing and export to PNG, SVG, or XML.

Modeled on googlemaps-mcp-server: same MCP-App pattern (data tools return content, a UI tool returns an embedded interactive HTML resource), but no authentication — draw.io is fully client-side, so there are no API keys and no OAuth.

Prerequisites

  • Node.js 18+
  • pnpm

Setup

  1. Install:
pnpm install
  1. Build and run:
pnpm dev

The server starts on port 3000 and exposes the MCP endpoint at /mcp.

Environment Variables

Variable Required Description
PORT No Port to listen on (default: 3000)

Endpoints

Endpoint Description
/mcp MCP endpoint (GET, POST, DELETE) — no auth required
/health Health check

MCP Tools

create_diagram

Build a draw.io diagram from a structured description and return valid mxGraph XML.

Parameters:

  • nodes (required) — array of { id, label?, shape?, x?, y?, width?, height?, fillColor?, strokeColor? }. shape is one of rectangle, rounded, ellipse, diamond, process, terminator, cylinder, cloud, hexagon, parallelogram.
  • edges — array of { source, target, label?, dashed? } referencing node ids.
  • directionvertical (default) or horizontal, used by the auto-layout when positions are omitted.

Positions are auto-laid-out (layered, centered) when x/y are omitted — just describe what connects to what.

render_diagram

Display the diagram inline. Renders ready-made mxGraph xml (typically the output of create_diagram); building from a description lives in create_diagram, so this tool only renders.

Parameters: xml (the diagram to render — omit for an empty placeholder), title (optional).

The diagram renders as interactive inline SVG (zoom / pan / fullscreen lightbox) via the draw.io viewer script, plus an "Edit in draw.io" button that opens the full web editor in a new tab with the diagram preloaded (where you can edit and export to PNG/SVG/XML).

Why a script, not an iframe: MCP Apps render inside a sandboxed iframe that allows in-document scripts but blocks nested iframes (CSP frame-src 'none'). So the UI loads the draw.io viewer (viewer.diagrams.net/js/viewer-static.min.js) as a <script> and draws inline SVG — the same mechanism the google-maps MCP app uses to render its map. Embedding embed.diagrams.net as a nested iframe renders blank.

Resources

ui://drawio/editor

The diagram UI rendered by render_diagram, served as an MCP App resource. It loads the draw.io viewer as an in-document script and draws the diagram as inline SVG.

Client Configuration

{
  "mcpServers": {
    "drawio": {
      "type": "streamable-http",
      "url": "http://localhost:3000/mcp"
    }
  }
}

For a deployed server, replace the URL with your public endpoint, e.g. https://your-app.up.railway.app/mcp.

Deployment

The server is stateless and keyless — deploy the built dist/ and run pnpm start behind any HTTPS host (Railway, Fly, etc.). The only configuration is the optional PORT.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured