
Excalidraw
io.github.debu-sinhaPublished by GitHub account debu-sinhav1.0.2Updated Oct 24, 2026
Security-hardened Excalidraw MCP server with auth, rate limiting, and 14 tools
Overview
A local Excalidraw MCP server that lets an assistant draw, edit, arrange and export diagrams as Excalidraw elements, rendered inline in chat.
- What you can do
- Create, update, delete and query diagram elements such as rectangles, ellipses, diamonds, arrows, text, lines and freedraw strokes, including batches of up to 100 elements at once. Group, ungroup, align, distribute, lock and unlock elements. Convert Mermaid diagrams into Excalidraw elements. Render elements as an inline SVG widget with streaming animations, and export the canvas as SVG or PNG. Read a reference cheatsheet of element types, colors and sizing tips. Optionally sync a shared canvas across browser clients in real time.
- When to use it
- Useful when you want an assistant to produce architecture diagrams, flowcharts or sketches directly in the chat instead of describing them in text, or when several clients should collaborate on one live canvas. Standalone mode needs no setup for most users.
- Requirements
- Runs locally over stdio, installed from npm (excalidraw-mcp-server) or run with npx; Node.js is needed. Standalone mode requires no keys or server. Connected mode needs the optional canvas server started separately, an API key in EXCALIDRAW_API_KEY (minimum 32 characters) and the canvas URL in CANVAS_SERVER_URL; other settings such as CORS_ALLOWED_ORIGINS, rate limits and persistence are environment variables.
Installation
In SourceWeft
- Open Excalidraw in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
excalidraw-mcp-server
The only Excalidraw MCP server with security hardening, inline diagram rendering, and real-time canvas sync.
[CI] [npm] [npm downloads] [License: MIT] [Node]
[Demo: architecture diagram being drawn element-by-element in real-time through WebSocket sync]
What it does
Ask your AI to draw a diagram, and it appears right inside the chat. The MCP server gives Claude Desktop, ChatGPT, VS Code, and Cursor a full set of drawing tools backed by the Excalidraw format -- with API authentication, rate limiting, and input validation on every operation.
v2.0 adds MCP Apps support: diagrams stream inline as interactive SVG widgets with draw-on animations, and you can export any diagram to excalidraw.com with one click.
Two modes, zero config
Standalone mode (default) -- just install and go. The server runs with an in-process element store. No canvas server, no API keys, no setup. Your MCP client calls the tools, and diagrams render inline.
Connected mode -- start the optional canvas server for real-time browser sync. Multiple clients can collaborate on the same canvas through authenticated WebSocket connections. File persistence keeps state across restarts.
The server auto-detects which mode to use: if a canvas server is reachable, it connects to it. Otherwise it falls back to standalone.
Architecture
Diagram created with excalidraw-mcp-server -- edit in Excalidraw
Features
MCP Apps (v2.0)
- Inline diagram rendering in Claude Desktop, ChatGPT, and VS Code
- Streaming SVG with draw-on animations as elements arrive
- Export to excalidraw.com with one click
- Element reference cheatsheet via
read_metool
16 MCP tools
- Create, update, delete, and query elements (rectangle, ellipse, diamond, arrow, text, line, freedraw)
- Batch create up to 100 elements at once
- Group, ungroup, align, distribute, lock, unlock
- Mermaid diagram conversion
- SVG and PNG export
Security
- API key authentication with constant-time comparison
- Origin-restricted CORS (no wildcards)
- WebSocket auth with token and origin validation
- Standard and strict rate limiting tiers
- Bounded Zod schemas with
.strict()on every endpoint - Helmet.js security headers with CSP
Infrastructure
- Real-time WebSocket sync across browser clients
- Optional atomic-write file persistence
- Structured pino audit logging
Install
Or run directly:
Quick start
Standalone (recommended for most users)
Just point your MCP client at the server. No canvas server needed.
Then ask your AI: "Draw an architecture diagram showing a load balancer, three app servers, and a database"
Connected mode (real-time browser sync)
Point your MCP client at the server with the same API key:
MCP tools
Security comparison
Configuration
All settings via environment variables. Copy .env.example to .env and adjust as needed.
MCP client configuration
Claude Desktop
Add to claude_desktop_config.json:
Cursor
Add to .cursor/mcp.json in your project root:
VS Code
Add to your MCP settings:
For connected mode, add "env": { "EXCALIDRAW_API_KEY": "<key>", "CANVAS_SERVER_URL": "http://127.0.0.1:3000" } to the config above. Replace <key> with the key from node scripts/generate-api-key.cjs.
Development
Project structure
Migrating from v1.x
Zero-config upgrade. All 14 original tools work identically -- create_view and read_me are additive. The canvas server is now optional (standalone mode activates automatically).
Existing MCP client configs (stdio transport, tool names) continue to work without changes.
License
Source: README.md at commit 89c019d
Tools
0Version history
1- v1.0.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts