
Excalidraw
io.github.debu-sinha由 GitHub 账号 debu-sinha 发布v1.0.2更新于 Oct 24, 2026
Security-hardened Excalidraw MCP server with auth, rate limiting, and 14 tools
概览
本地运行的 Excalidraw MCP 服务器,让助手以 Excalidraw 元素绘制、编辑、排版并导出图表,并在对话中内联渲染。
- 可以做什么
- 创建、更新、删除和查询图表元素,如矩形、椭圆、菱形、箭头、文本、线条和手绘笔迹,单次可批量创建最多 100 个元素。对元素进行分组、取消分组、对齐、均匀分布、锁定和解锁。将 Mermaid 图表转换为 Excalidraw 元素。把元素渲染为带流式动画的内联 SVG 组件,并将画布导出为 SVG 或 PNG。读取元素类型、颜色和尺寸建议的速查表。可选地在多个浏览器客户端之间实时同步同一画布。
- 适用场景
- 适合让助手直接在对话中生成架构图、流程图或草图,而不是用文字描述;也适合多个客户端协作编辑同一实时画布。多数用户使用独立模式即可,无需额外配置。
- 运行要求
- 通过 stdio 在本地运行,从 npm 安装 excalidraw-mcp-server 或用 npx 启动,需要 Node.js。独立模式不需要密钥或服务器。连接模式需另行启动可选的画布服务器,并在 EXCALIDRAW_API_KEY 中提供至少 32 个字符的 API 密钥,在 CANVAS_SERVER_URL 中填写画布地址;CORS_ALLOWED_ORIGINS、速率限制和持久化等通过环境变量配置。
安装
在 SourceWeft 中
- 打开 控制台中的 Excalidraw,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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
来源:README.md,提交 89c019d
工具
0版本历史
1- v1.0.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分