
MCP服务器和Excalidraw的Claude代码技能——程序化画布工具包,通过AI代理创建、编辑和导出图表,支持实时画布同步。
概览
运行一个实时的Excalidraw画布,并由AI代理控制。该仓库提供: - :通过模型上下文协议连接(Claude Desktop、光标、Codex CLI 等)- :Claude Code、Codex CLI 及其他技能启用代理的便携技能 关键词:Excalidraw 代理技能、Excalidraw MCP 服务器、AI 图表、Claude 代码技能、Codex CLI 技能、Claude 桌面 MCP、光标 MCP、Mermaid 到 Excalidraw。 AI代理通过一个提示(4倍速)生成完整的架构图。在YouTube观看完整视频 该仓库包含两个独立的流程: - Canvas服务器:Web UI + REST API + WebSocket 更新(默认 http://127.0.0.1:3000))- MCP 服务器:通过标准平台暴露 MCP 工具;通过 EXPRESS_SERVER_URL 同步到画布 Excalidraw现在有了官方MCP——非常适合快速生成、提示到图表的在线聊天生成。我们解决了另一个问题。 ——官方MCP生成图表。
概述(AI 翻译)
mcp-excalidraw-server 为 AI 代理提供了一个实时的 Excalidraw 画布,用户可以在上面绘制、查看、细化并保存到你的仓库中。你的代理通过程序化创建架构图和流程图,通过截图查看自己的作品,修复布局问题,并导出 .excalidraw 文件,你可以提交到代码旁边。
一块帆布,三种驱动方式:
- Agent Skill + CLI — 推荐给编码代理(Claude Code、Codex CLI、Cursor、OpenCode):
npx -y mcp-excalidraw-server。零配置,自动启动画布,可组合 JSON 输入/输出。 - MCP 服务器 — 支持任何模型上下文协议客户端(Claude Desktop、光标、Codex CLI、Antigravity 等)的 26 个工具。支持 MCP
2026-07-28(server/discover,按请求_meta信封,工具调用无握手),并兼容 2025 年代以initialize开启的客户端。 - REST API — 纯 HTTP 用于 LangChain 和自定义框架。
核心绘图本地运行(Node ≥ 20,MIT授权)——无需API密钥或账户。Mermaid转换可在本地浏览器画布中运行;share为可选选项,并上传加密场景到 excalidraw.com。画布页面从 esm.sh CDN加载Excalidraw的字体。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Excalidraw MCP Server, CLI & Agent Skill
mcp-excalidraw-server gives AI agents a live Excalidraw canvas they can draw on, look at, refine, and save into your repo. Your agent creates architecture diagrams and flowcharts programmatically, sees its own work via screenshots, fixes layout problems, and exports .excalidraw files you can commit next to your code.
One canvas, three ways to drive it:
- Agent Skill + CLI — recommended for coding agents (Claude Code, Codex CLI, Cursor, OpenCode):
npx -y mcp-excalidraw-server. Zero config, auto-starts the canvas, composable JSON in/out. - MCP Server — 26 tools over stdio for any Model Context Protocol client (Claude Desktop, Cursor, Codex CLI, Antigravity, …). Speaks MCP
2026-07-28(server/discover, per-request_metaenvelope, tool calls without a handshake) and stays compatible with 2025-era clients that open withinitialize. - REST API — plain HTTP for LangChain and custom frameworks.
Core drawing runs locally (Node ≥ 20, MIT licensed) — no API keys or accounts. Mermaid conversion runs in the local browser canvas; share is optional and uploads an encrypted scene to excalidraw.com. The canvas page loads Excalidraw’s fonts from the esm.sh CDN.
Demo
AI agent creates a complete architecture diagram from a single prompt (4x speed). Watch full video on YouTube
Table of Contents
- Demo
- What It Is
- How We Differ from the Official Excalidraw MCP
- What’s New
- Installation
- Agent Skill
- CLI Reference
- Headless Rendering
- Configure MCP Clients
- MCP Tools (26 Total)
- Quick Start (From Source / Docker)
- Testing
- FAQ
- Troubleshooting
- Known Issues / TODO
- Development
- License
What It Is
安装
npx -y mcp-excalidraw-server配置
{
"mcpServers": {
"excalidraw": {
"command": "npx",
"args": ["-y", "mcp-excalidraw-server"]
}
}
}