Excalidraw MCP Agent
Generates Excalidraw diagrams from natural language prompts or structured descriptions, with support for shapes, arrows, and auto-layout geometry, and can open diagrams directly on excalidraw.com.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Excalidraw MCP AgentCreate a diagram for a microservices architecture with API gateway, services, and database."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Excalidraw MCP Agent π¨
Local Model Context Protocol (MCP) server that generates beautifully formatted, hand-drawn Excalidraw diagrams (.excalidraw) directly from natural language text prompts or structured descriptions.
π Features
Prompt-to-Diagram Generator: Create complex architecture diagrams, flowcharts, and system pipelines directly from free-text prompts (
generate_diagram_from_prompt).Structured MCP Control: Fine-grained shape control (
create_excalidraw_diagram) supporting Rectangles, Diamonds, Ellipses, and Arrow labels.Dynamic Geometry Engine:
Auto-calculates box dimensions and text metrics to eliminate text clipping.
Native Virgil hand-drawn font rendering with 100% mathematical text centering inside containers.
Smart perimeter intersection math (
getNodeEdgePoint) preventing arrows from crossing through shapes.Directional perpendicular arrow label offsets preventing line collisions.
Excalidraw Browser Integration: Open generated diagrams directly on excalidraw.com via
open_excalidraw_diagram.
Related MCP server: Excalidraw MCP Server
π¦ Installation & Setup
1. Clone & Install Dependencies
git clone https://github.com/Anuraj4/Excalidraw-MCP-Agent.git
cd Excalidraw-MCP-Agent
npm install2. Link Binary Globally
Link the package binary globally so any MCP client can run excalidraw-mcp-agent:
npm linkβοΈ MCP Client Configuration
Add the server entry to your MCP client configuration file (e.g. Claude Desktop, Cursor, VS Code, or Antigravity Desktop):
Option A: Using the Globally Linked Command (Recommended)
{
"mcpServers": {
"excalidraw": {
"command": "excalidraw-mcp-agent",
"env": {
"EXCALIDRAW_WORKSPACE": "C:\\path\\to\\your\\workspace"
}
}
}
}Option B: Using Node Directly
{
"mcpServers": {
"excalidraw": {
"command": "node",
"args": [
"C:\\path\\to\\Excalidraw-MCP-Agent\\src\\server.js"
],
"env": {
"EXCALIDRAW_WORKSPACE": "C:\\path\\to\\your\\workspace"
}
}
}
}π οΈ Available MCP Tools
Tool | Description |
| Generates a complete Excalidraw diagram directly from a natural language prompt string. |
| Generates a diagram from structured |
| Lists all |
| Launches excalidraw.com in your browser to inspect or edit a file. |
π¨ Diagram Palette & Style Guidelines
The builder applies color palettes and shape semantics automatically according to standard architectural conventions:
Component Type | Color | Shape |
Actors / Users / Clients |
| Ellipse |
Ingestion / Data Sources |
| Rectangle |
Processing / Logic |
| Rectangle |
Database / Vector DB / Storage |
| Rectangle |
Decisions / Conditionals |
| Diamond |
Output / ERP / External Systems |
| Rectangle |
Exceptions / Errors / Warnings |
| Rectangle |
π‘ Prompt Examples
Once configured, simply interact with your AI assistant using prompts like:
RAG Architecture:
"Create an Excalidraw diagram for a RAG system: User uploads PDFs -> Chunking & embedding -> Vector DB -> User query -> Similarity search -> LLM answer generation."
Invoice Extraction Pipeline:
"Generate an Excalidraw flowchart for Invoice Data Extraction: Supplier submits invoice -> Document Ingestion -> Classification (Invoice vs Receipt) -> Check valid invoice -> Key data extraction -> Validation rules check -> ERP integration export (if valid) or Exception Queue (if error)."
π§ͺ Testing
Run unit tests and end-to-end stdio MCP integration tests:
npm testπ License
This server cannot be deployed
Maintenance
Related MCP Connectors
Create and edit architecture diagrams from your AI agent; get an SVG and a live editable canvas.
Create, read and live-edit visual boards, Kanban plans, Gantt timelines and diagrams with AI agents.
AI agent draws editable hand-drawn diagrams (flowchart, ER, architecture) via MCP, not static images
Generate dynamic Mermaid diagrams and charts with AI assistance. Customize styles and export diagrβ¦
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables creation, management, and export of Excalidraw drawings through natural language. Supports CRUD operations on drawings and export to SVG, PNG, and JSON formats with file-based storage.82,102 npm-
- AlicenseAqualityCmaintenanceEnables AI agents to programmatically generate, edit, and view Excalidraw diagrams with real-time browser synchronization. It provides a suite of tools for adding shapes, text, and arrows to diagrams through natural language interactions.112,102 npm100MIT
- AlicenseNot gradedqualityCmaintenanceProvides tools for creating, deleting, and querying nodes and edges in Excalidraw diagrams, enabling diagram editing via LLM interfaces.98 npm5MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, modify, and share diagrams on a live Excalidraw canvas through MCP tools, supporting shapes, text, arrows, batch operations, and export to shareable links with images.2,122 npm8MIT