excalidraw-mcp
Generate 25+ types of hand-drawn Excalidraw diagrams - flowcharts, sequence, architecture, mind maps, ER, UML, kanban, bar/line/radar charts - from structured input with Sugiyama auto-layout and CJK support. Reads and modifies .excalidraw files, exports SVG. Python, local, no API keys required.
README
excalidraw-mcp
Generate 25+ types of beautiful hand-drawn diagrams with AI — flowcharts, sequence, architecture, mind maps, ER, class, state, timeline, pie/bar/line/radar charts, kanban, wireframes, decision trees, and more — with Sugiyama hierarchical layout, CJK support, and zero learning curve.
By Maaker.AI
Showcase
Every image below was generated by a single tool call — no coordinates, no manual layout. The .excalidraw sources live in docs/showcase/; drag any of them onto excalidraw.com to keep editing.
| Flowchart (branches + cycle + CJK) | Layered architecture |
|---|---|
Install
Claude Code (recommended)
claude mcp add excalidraw -- uvx maaker-excalidraw-mcp
Claude Desktop
Add to your MCP config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"excalidraw": {
"command": "uvx",
"args": ["maaker-excalidraw-mcp"]
}
}
}
opencode / Cursor / any MCP client
{
"mcp": {
"excalidraw": {
"type": "local",
"command": ["uvx", "maaker-excalidraw-mcp"],
"enabled": true
}
}
}
(opencode shown; Cursor and other clients use the same uvx maaker-excalidraw-mcp command in their MCP config format.)
pip
pip install maaker-excalidraw-mcp
Tools
| Tool | Description |
|---|---|
create_flowchart |
Flowcharts with Sugiyama layout — branches, merges, cycles, groups |
create_architecture_diagram |
Layered architecture diagrams with connections |
create_sequence_diagram |
UML sequence diagrams with lifelines and messages |
create_class_diagram |
UML class diagrams with attributes, methods, relationships |
create_state_diagram |
UML state machines with initial/final states |
create_er_diagram |
Entity-Relationship diagrams with cardinality |
create_mindmap |
Tree-style mind maps with auto-colored branches |
create_timeline |
Timeline/Gantt charts with overlapping event handling |
create_pie_chart |
Pie charts with labeled slices and percentages |
create_kanban_board |
Kanban boards with columns and cards |
create_network_diagram |
Network topology with typed nodes (server, DB, etc.) |
create_quadrant_chart |
2x2 priority/positioning matrices |
create_user_journey |
User journey maps with emotion indicators |
create_wireframe |
UI wireframe mockups with device frames |
create_org_chart |
Organizational charts (top-down hierarchy) |
create_swot_analysis |
SWOT analysis 2x2 color-coded matrices |
create_table |
Grid tables with auto-sized columns and alternating row colors |
create_bar_chart |
Vertical bar charts with auto-scaled bars and labels |
create_line_chart |
Line charts with multi-series support |
create_radar_chart |
Radar/spider charts with multi-series overlay |
create_decision_tree |
Decision trees with diamond decisions and rectangular outcomes |
import_mermaid |
Import Mermaid syntax (flowchart, sequence, class, state) |
list_diagram_types |
List all available diagram types |
modify_diagram |
Add/remove nodes and connections in existing diagrams |
read_diagram |
Analyze existing .excalidraw files |
export_diagram |
Export diagrams to SVG format |
Quick Examples
Flowchart
Just tell your AI assistant:
"Create a flowchart: User Request → Load Balancer → API Server → Database"
The AI will call create_flowchart with structured data, and you'll get a .excalidraw file with:
- Sugiyama hierarchical layout — proper handling of branches, merges, cycles, and disconnected subgraphs
- Auto-calculated box sizes based on text content
- Perfectly centered text (including Chinese/CJK characters)
- Smart arrow routing with proper edge binding
- Hand-drawn style that looks great in docs and presentations
- 4 directions: LR (left-to-right), RL, TB (top-to-bottom), BT
Architecture Diagram
"Create an architecture diagram with Frontend (React, Next.js), Backend (API Server, Auth Service), and Database (PostgreSQL, Redis) layers"
Generates a layered diagram with components organized by tier, automatic sizing, and connections between layers.
Read & Modify
"Read the diagram at ./my-system.excalidraw and add a 'Cache' node connected to the API Server"
Works with existing .excalidraw files — read their structure, add/remove nodes, add connections.
Why excalidraw-mcp?
vs Official Excalidraw MCP (excalidraw/excalidraw-mcp)
| Feature | Official MCP | excalidraw-mcp |
|---|---|---|
| Approach | Raw JSON — AI manually places every element | Structured input — say what you want, get a diagram |
| Layout | AI calculates coordinates | Sugiyama hierarchical auto-layout |
| Branches/Merges | AI must figure out positioning | Automatic — handled by layout engine |
| CJK text | No width estimation | Accurate CJK/mixed-script width calculation |
| Text centering | AI must calculate x/y offsets | Automatic centering in containers |
| Arrow binding | AI must manage bindings | Automatic fixedPoint + orbit binding |
| Local files | Cannot read/write local files | Full read, modify, save support |
| Distribution | Remote URL / .mcpb | uvx / pip (standard Python) |
| Token usage | Needs read_me call to learn format |
Format knowledge built-in |
vs Mermaid-based tools
- Free layout: Not constrained by Mermaid syntax limitations
- Hand-drawn style: Native Excalidraw look, not rendered code blocks
- Editable output: Drag the
.excalidrawfile to excalidraw.com to continue editing
Tool Reference
create_flowchart
Input:
nodes: [{label: "Step 1", color?: "blue", shape?: "rectangle"}]
edges: [{from: "Step 1", to: "Step 2", label?: "next"}]
direction?: "LR" | "RL" | "TB" | "BT" (default: "LR")
title?: "My Flowchart"
output_path?: "/path/to/output.excalidraw"
Output: Path to generated .excalidraw file
Colors: blue, green, purple, yellow, red, gray, orange, pink
Shapes: rectangle (default), diamond (decisions), ellipse (start/end)
create_architecture_diagram
Input:
layers: [{
name: "Frontend",
color?: "blue",
components: [{label: "React"}, {label: "Next.js"}]
}]
connections?: [{from: "React", to: "API Server"}]
output_path?: "/path/to/output.excalidraw"
Output: Path to generated .excalidraw file
modify_diagram
Input:
file_path: "/path/to/existing.excalidraw"
add_nodes?: [{label: "New Node", color?: "green", x?: 100, y?: 100}]
remove_labels?: ["Old Node"]
add_connections?: [{from: "A", to: "B"}]
output_path?: "/path/to/output.excalidraw"
Output: Path to modified file
read_diagram
Input:
file_path: "/path/to/diagram.excalidraw"
Output: Structured description (shapes, connections, colors)
export_diagram
Input:
file_path: "/path/to/diagram.excalidraw"
format: "svg"
Output: Path to exported SVG file
Technical Details
Sugiyama Hierarchical Layout
Uses the grandalf library for proper directed graph layout:
- Layer assignment: Nodes placed in layers based on graph topology
- Crossing minimization: Multi-pass optimization to reduce edge crossings
- Coordinate assignment: Balanced positioning within layers
- Cycle handling: Feedback edge detection for cyclic graphs
- Disconnected subgraphs: Automatic side-by-side placement
CJK Width Estimation
Accurate text width calculation for mixed Chinese/English text:
| Character Type | Width (at fontSize=20) |
|---|---|
| CJK characters | ~22px per character |
| ASCII letters/digits | ~11px per character |
| Spaces | ~5px |
Arrow Binding
Uses Excalidraw's modern fixedPoint + orbit binding (not the deprecated focus/gap format):
{
"startBinding": {
"elementId": "box1",
"fixedPoint": [1.0, 0.5001],
"mode": "orbit"
}
}
Arrows automatically connect at the correct edge based on relative positions.
Development
git clone https://github.com/maaker-ai/excalidraw-mcp.git
cd excalidraw-mcp
uv sync --dev
uv run pytest
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 模型以安全和受控的方式获取实时的网络信息。