Excalidraw MCP Server
Enables AI agents to programmatically generate, edit, and view Excalidraw diagrams, featuring tools for adding shapes, text, and arrows with real-time preview and bi-directional synchronization.
Click on "Install 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 ServerCreate a flowchart showing how a user logs into our app"
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 Server
An MCP (Model Context Protocol) server that empowers AI agents (like Claude, Cursor, Windsurf) to create, edit, and manage Excalidraw diagrams directly within your conversation.
Why Excalidraw? Its hand-drawn aesthetic and JSON-based format are perfect for rapid, programmable diagramming. This server bridges standard MCP clients with a local Excalidraw instance, enabling AI-powered visual thinking.
β¨ Features
Feature | Description |
π¨ Real-time Preview | Changes appear instantly in a local browser window via WebSocket |
π Smart Layout | Automatically calculates text width and binds labels to containers |
π Multi-Session | Switch between different diagrams seamlessly |
π§ Mermaid Support | Convert Mermaid syntax to Excalidraw diagrams instantly |
π¦ Export Options | Export to PNG, SVG, or JSON formats |
ποΈ Templates | Built-in architecture diagram templates |
Related MCP server: Excalidraw MCP Server
π Quick Start
You don't need to clone this repo. Just configure your MCP client:
Claude Code (cc)
claude mcp add excalidraw -- npx -y @scofieldfree/excalidraw-mcpCodex CLI
codex mcp add excalidraw -- npx -y @scofieldfree/excalidraw-mcpCursor / Windsurf
Go to Settings > MCP β Add New MCP Server:
Field | Value |
Name |
|
Type |
|
Command |
|
Cline (VS Code Extension)
Open Cline settings and add to MCP Servers:
{
"mcpServers": {
"excalidraw": {
"command": "npx",
"args": ["-y", "@scofieldfree/excalidraw-mcp"]
}
}
}GitHub Copilot
Use the Copilot CLI to interactively add:
/mcp addAlternatively, create or edit ~/.copilot/mcp-config.json:
{
"mcpServers": {
"excalidraw": {
"type": "local",
"command": "npx",
"tools": ["*"],
"args": ["-y", "@scofieldfree/excalidraw-mcp"]
}
}
}Kiro
Follow the MCP Servers documentation. Add to .kiro/settings/mcp.json:
{
"mcpServers": {
"excalidraw": {
"command": "npx",
"args": ["-y", "@scofieldfree/excalidraw-mcp"]
}
}
}opencode
opencode mcp add excalidraw -- npx -y @scofieldfree/excalidraw-mcpVS Code
One-click install:
Or install via CLI:
# For VS Code
code --add-mcp '{"name":"excalidraw","command":"npx","args":["-y","@scofieldfree/excalidraw-mcp"]}'
# For VS Code Insiders
code-insiders --add-mcp '{"name":"excalidraw","command":"npx","args":["-y","@scofieldfree/excalidraw-mcp"]}'Claude Desktop
Add to your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"excalidraw": {
"command": "npx",
"args": ["-y", "@scofieldfree/excalidraw-mcp"]
}
}
}π οΈ Available Tools
Tool | Description |
| Start browser preview and open Excalidraw editor |
| Add shapes, text, arrows to the canvas |
| Modify existing element properties |
| Remove elements from canvas |
| Retrieve current diagram state |
| Convert Mermaid syntax to Excalidraw |
| Add a pre-built architecture diagram template |
| Create a new diagram or clear existing |
| Export diagram to PNG, SVG, or JSON |
| List all active diagram sessions |
| Delete a diagram session |
π¬ Usage Examples
Example 1: Create a Simple Diagram
You say:
"Draw a flowchart with three boxes: Input β Process β Output"
AI uses:
start_session β add_elements (3 rectangles + 2 arrows)Example 2: Convert Mermaid to Excalidraw
You say:
"Convert this Mermaid diagram to Excalidraw:
graph LR: A[User] --> B[API Gateway] --> C[Service] --> D[(Database)]"
AI uses:
start_session β create_from_mermaidExample 3: Architecture Diagram
You say:
"Create an architecture diagram for a microservices system"
AI uses:
start_session β add_template_architecture (or) add_elements with custom layoutποΈ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI Agent (Claude/Cursor) β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β MCP Protocol (JSON-RPC over stdio)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Excalidraw MCP Server β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
β β Tool Router ββββ State Store ββββ WebSocket Broadcast β β
β βββββββββββββββ βββββββββββββββ ββββββββββββ¬βββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββ
β WebSocket
βΌ
βββββββββββββββββββββββββββββββββββββ
β Browser (Excalidraw Editor) β
βββββββββββββββββββββββββββββββββββββπ§ Development
Prerequisites
Node.js >= 18
pnpm >= 9
Setup
# Clone the repository
git clone https://github.com/Scofieldfree/excalidraw-mcp.git
cd excalidraw-mcp
# Install dependencies
pnpm install
# Start development server
pnpm devScripts
Command | Description |
| Start dev server (backend + frontend) |
| Build for production |
| Run TypeScript type checking |
| Run ESLint |
| Create a new release version |
π¦ Project Structure
excalidraw-mcp/
βββ packages/
β βββ mcp-server/ # Core MCP server + Excalidraw frontend
β βββ src/
β β βββ index.ts # Entry point
β β βββ state.ts # Session state management
β β βββ http-server.ts
β β βββ tools/ # MCP tool implementations
β βββ web/ # Excalidraw React frontend
βββ docs/ # Documentation
βββ package.json # Workspace configurationπ Troubleshooting
Port Already in Use
The server automatically finds an available port starting from 3100. If you need a specific port, set the PORT environment variable.
Browser Doesn't Open
Ensure you have a default browser configured. The server uses the open package to launch the browser.
WebSocket Connection Failed
Check if any firewall or antivirus is blocking WebSocket connections on localhost.
π€ Contributing
Contributions are welcome! Please read our Contributing Guide for details.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'feat: add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
π License
MIT Β© Scofieldfree
π Links
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceEnables AI agents to programmatically control a live Excalidraw canvas through element-level CRUD operations and real-time synchronization. It allows agents to iteratively build, inspect, and refine diagrams while providing visual feedback via screenshots and scene descriptions.Last updated1,985MIT
- Alicense-qualityDmaintenanceEnables AI agents to programmatically control a live Excalidraw canvas with element-level CRUD operations and real-time synchronization. It supports iterative diagramming through scene descriptions, screenshots, and advanced layout tools for collaborative AI-human workflows.Last updated1,985MIT
- Alicense-qualityCmaintenanceEnables AI agents to collaboratively draw and annotate Excalidraw diagrams in real-time via MCP tools, synced to a browser canvas.Last updated3Apache 2.0
- Alicense-qualityDmaintenanceEnables 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.Last updated1,9858MIT
Related MCP Connectors
AI agent draws editable hand-drawn diagrams (flowchart, ER, architecture) via MCP, not static images
Real-time collaborative whiteboard β AI agents and humans edit the same board live over MCP.
Generate dynamic Mermaid diagrams and charts with AI assistance. Customize styles and export diagrβ¦
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Scofieldfree/excalidraw-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server