fcp-drawio

fcp-drawio

MCP server that enables LLMs to create and edit draw.io diagrams using high-level intent commands, with automatic layout and styling.

Category
Visit Server

README

fcp-drawio

MCP server for creating and editing draw.io diagrams through intent-level commands.

What It Does

fcp-drawio lets LLMs build architecture diagrams, flowcharts, and system maps by describing what they want -- not how to draw it. The LLM sends high-level operations like add svc AuthService theme:blue and connect AuthService -> UserDB, and fcp-drawio renders them into fully styled draw.io XML with automatic layout via ELK. Built on the FCP framework.

<p align="center"> <img src="docs/images/multiplayer-game-backend.png" alt="Multiplayer Game Backend architecture diagram" width="700"> <br> <em>Multiplayer game backend — 20 nodes, 5 swim lanes, auto-layout (<a href="https://app.diagrams.net/#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fos-tack%2Ffcp-drawio%2Fmain%2Fdocs%2Fexamples%2Fmultiplayer-game-backend.drawio">open in draw.io</a>)</em> </p>

Quick Example

drawio([
  'add svc AuthService theme:blue',
  'add db UserDB theme:green near:AuthService dir:right',
  'connect AuthService -> UserDB label:queries',
])

Response:

+svc AuthService @(200,200 140x60) blue
+db UserDB @(400,200 120x80) green
~AuthService->UserDB "queries" solid
digest: 3s 1e 0g

This produces a draw.io diagram with a blue rounded-rectangle service node, a green database cylinder, and a labeled edge between them -- all positioned automatically.

Available MCP Tools

Tool Purpose
drawio(ops) Batch mutations -- add shapes, connect, style, group, layout
drawio_query(q) Inspect the diagram -- map, list, describe, connections, find
drawio_session(action) Lifecycle -- new, open, save, checkpoint, undo, redo
drawio_help() Full reference card

Component Library

Type Shape Use For
svc Rounded rect Services, components
db Cylinder Databases, storage
api Hexagon APIs, gateways
queue Parallelogram Queues, streams
cloud Cloud External services
actor Person Users, personas
doc Document Files, reports
box Rectangle Generic
decision Diamond Decisions, conditions
circle Ellipse States, events
process Double-bordered rect Predefined processes
triangle Triangle Warnings, deltas

Themes

Apply color themes to any shape: blue, green, red, orange, purple, yellow, gray, dark.

Installation

Requires Node >= 22.

npm install @ostk-ai/fcp-drawio

MCP Client Configuration

{
  "mcpServers": {
    "drawio": {
      "command": "node",
      "args": ["node_modules/@ostk-ai/fcp-drawio/dist/index.js"]
    }
  }
}

Architecture

4-layer architecture:

MCP Server (Intent Layer)
  src/server/ -- Parses op strings, resolves refs, dispatches
        |
Semantic Model (Domain Brain)
  src/model/ -- In-memory entity graph, event sourcing
        |
Layout (ELK)
  Auto-layout via elkjs -- flow:TB, flow:LR, near/dir positioning
        |
Serialization (XML)
  src/serialization/ -- Semantic model <-> mxGraphModel XML

Supporting modules:

  • src/parser/ -- Operation string parser
  • src/lib/ -- Component library, themes, stencils, draw.io CLI integration

See docs/examples/ for example diagrams (including the multiplayer game backend) and docs/ for design documents.

Development

npm install
npm run build     # tsc
npm test          # vitest, 465 tests
npm run test:watch
npm run dev       # tsc --watch

License

MIT

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