
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 分