fcp-drawio
MCP server that enables LLMs to create and edit draw.io diagrams using high-level intent commands, with automatic layout and styling.
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 parsersrc/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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。