doodle
Summary: Doodle gives you a shared, local-first Excalidraw-style whiteboard where both you and the AI can read, draw on, and edit the same infinite canvas.
get_board— Read the shared board (revision, object IDs, coordinates, author,BOARD_JSON, drawing guide); passsince_revisionfor only changed objects plus aHANDOFFof human edits, and choose token-cheap views (summary/structure/detail/full).show_board— Open the interactive canvas beside the chat in MCP Apps hosts, with a localPANEL_URLfallback for text-only hosts.draw_board— Create/edit the canvas: semanticdiagramrecipes (auto-layout + arrows), object-levelitems/updates/remove_ids/layout, styles (color, variants, roles, emphasis, groups, connectors), andlibraryboard management (list/get/create/save/switch/rename/duplicate/delete/import/export), plus optionalexpected_revisionconflict checks.scan_project— Read-only workspace scan returning bounded paths,file:lineevidence, and a ready-to-passDIAGRAM_DRAFT_JSONsketch fordraw_board.diagram.Safe by design: all read-only tools are non-destructive and closed-local; no browser opening, no project file writes, no cloud uploads — state lives in local
.doodle/board.json.
Uses Excalidraw as the sole interactive editing and rendering canvas for the shared board, deriving Excalidraw elements from authoritative Board v1 state so humans and AI can view and edit the same visual context.
Doodle
一张本地优先的双向画板:人和 AI 都能在上面画图表达意思,并读取对方留下的视觉上下文。
Doodle 只有一个内核:人和 AI 共用的无限画板。AI 通过 MCP 工具在 Agent 里画,人直接在画布上画;任何一方都能接着改,画板本身就是沟通媒介。对话仍留在宿主聊天里——Doodle 不创建第二套会话。
AI 用 draw_board 画 ──▶ 你在 Excalidraw 上直接拖拽 / 改字 / 画箭头 / 涂鸦圈重点
▲ │
│ ▼
AI 读取 HANDOFF 增量 ◀── 终态同步进当前对话上下文(或点击「通知 Agent」)对外只有两个入口:直接 MCP / npx(任意宿主,不必 clone)和 Codex 插件(推荐给 Codex 用户,一条命令)。宿主能力分三层:四个工具始终可用;支持 MCP Apps 时把同一张画布显示在对话旁;支持 updateModelContext / sendMessage 时增加自动同步和短提醒。宿主不渲染画布时,get_board 返回的 PANEL_URL 是本地兜底页。
自 0.8.0 起自研 DOM 画布已移除,Excalidraw 是唯一的编辑/渲染画布。Board v1 仍是唯一持久状态和 AI 权威入口,Excalidraw 元素只由它派生,不存在第二份画布状态。
为什么选择 Doodle?
市面上大多数画图类 MCP 都是单向输出:AI 吐出一张图,哪里不对,你还是得回到聊天框里打一大段字让它重画。Doodle 把“人改画布”真正接回了 Agent 循环:
真正的双向
HANDOFF增量回传:你在画布上拖动、改字或涂鸦删改后,Doodle 会自动计算只有人改过的部分(过滤 AI 自己上一轮写入的噪音),把终态同步回 Agent。极致克制的 4 个工具:只有
get_board、show_board、draw_board、scan_project。相比动辄 20+ 工具的 MCP Server,大幅节省模型上下文 Token。零配置、纯本地、MIT 开源:一条
npx -y doodle-mcp即开即用,无需任何 API Key、无需登录账号、不上传云端,状态仅保存在本地.doodle/board.json。全宿主可用:支持 MCP Apps 的客户端(Codex、Claude Desktop、Cursor、VS Code)直接在对话旁内嵌画布;终端/纯文本宿主也会自动提供本地浏览器
PANEL_URL兜底。Excalidraw 原生体验(
0.8.0+):支持手绘笔迹(按下即出墨)、只擦笔迹的橡皮擦、框选批量整理、Ctrl/⌘+V贴图、本地「图库」管理多张可编辑画板,以及导出 PNG / JPG / SVG 分享快照。
和同类画图 MCP 对比
维度 | Doodle ( | 同类画图 MCP |
交互方向 | 人机双向(人改画布后通过 | 多数为AI 单向出图(人改后通常需要截图或文字重述) |
MCP 工具数 | 4 个(上下文开销极低) | 常见 15–26+ 个 |
安装与密钥 |
| 部分需配置大模型 Key 或克隆本地构建 |
命令行宿主兜底 | 自带本地 | 多数无独立回退页面 |
开源协议与维护 | MIT 协议,持续迭代 | 部分仓库缺少 License 或已停更 |
Related MCP server: Lousa
30 秒上手
方式一:任意 MCP 宿主(npx -y doodle-mcp,无需 clone 仓库)
把下面对应客户端的零配置片段加入宿主配置(也保存在 examples/mcp-config/),重启 MCP 会话后对 AI 说:「打开 Doodle 画板,我们先用画板交流。」 这条路径不需要 clone 仓库,也不等于公共插件目录发布。注意 npm 发布版可能落后于仓库版本,当前差异见安装与配置。
claude mcp add doodle -- npx -y doodle-mcp{
"mcpServers": {
"doodle": {
"command": "npx",
"args": ["-y", "doodle-mcp"]
}
}
}{
"mcpServers": {
"doodle": {
"command": "npx",
"args": ["-y", "doodle-mcp"]
}
}
}{
"servers": {
"doodle": {
"type": "stdio",
"command": "npx",
"args": ["-y", "doodle-mcp"]
}
}
}[mcp_servers.doodle]
command = "npx"
args = ["-y", "doodle-mcp"]方式二:和 AI 共用同一张画板(Codex 插件,推荐 Codex 用户)
npm run setup:codex一条命令装好依赖、构建自包含插件、注册本地 marketplace、安装 doodle@doodle,并打印首句提示。开启一个新的 Codex 会话,然后说:
打开 Doodle 画板,我们先用画板交流。兼容 MCP Apps 的宿主会直接显示画布,AI 先读画板再放一个起步对象。你选工具点按或拖拽即可画;双击对象改字、双击空白新建便签;空白处拖拽框选后可批量移动 / 删除 / 成组 / 整理;Ctrl/⌘+Z 撤销、方向键微调、Ctrl/⌘+V 粘贴图片。左上角「图库」是覆盖式抽屉,不挤压 Excalidraw 工具栏,支持保存/切换可编辑 JSON 画板,也可导出 PNG / JPG / SVG 分享快照。人画完后宿主会同步终态,也可点「通知 Agent」发一句短提醒。宿主不显示画布时,向 AI 要 PANEL_URL。
方式三:只想自己画两笔(不需要 AI)
npm run doodle启动本地画板并打开浏览器,终端里印出地址和几个基本手势;关掉终端就停止。空画板首次打开有可关闭的引导卡。
四个 MCP 工具
工具 | 权限标注 | 用途 |
| 只读 | 读取共享画布。首次返回完整画图规范,之后自动精简;传 |
| 只读 | 在对话旁打开可交互画布,回复中也直接给出 |
| 写入(可覆写) | 写入面:新增、精确更新、删除、确定性布局、连接线、变体/角色/样式/层级,以及 |
| 只读 | 可选只读扫描项目结构,返回有界相对路径与 |
show_board 与 scan_project 都不创建图库、不改会话、不授权代码变更。
安装与配置
Codex 插件:npm run setup:codex 只在你主动运行时调用 Codex CLI(npm install → npm run build → codex plugin marketplace add → codex plugin add doodle@doodle)。重复运行安全,--dry-run 只预览命令。插件包装的是同一个自包含 stdio MCP 服务,不依赖仓库里的 dist/ 或绝对路径。npm run build:submission 生成提交审核用的 ZIP;公共插件目录发布还需 OpenAI 侧资格与审核,材料见 docs/SUBMISSION.md。
直接 MCP stdio:发布版用 npx -y doodle-mcp,本地检出可用 node dist/index.js(先 npm run build)。默认自动选空闲端口、隔离状态目录,并从启动环境推断工作区;只有宿主在项目外启动时才需要 DOODLE_WORKSPACE_ROOT。
0.9.2已发布到 npm,latest指向0.9.2;npx -y doodle-mcp可直接启动四个工具。Codex 插件也可通过上面的npm run setup:codex安装。
变量 | 默认值 | 说明 |
| 空闲端口 | 固定本地画板 HTTP 端口;未设置或为 |
|
| 本地监听地址 |
| plugin data / | 画板状态目录 |
| 包根目录 |
|
|
| stderr 日志级别 |
状态文件是所选目录下的 .doodle/board.json(version 1,独立状态,应忽略,勿提交)。AI_DRAW_WORKSPACE_ROOT 与旧的 output/.ai-draw/board.json 仅作只读兼容保留。
PANEL_URL 属于当前 MCP server 进程,宿主退出即失效——这是正常生命周期。需要脱离会话的预览就运行 npm run preview:board(只起画板 HTTP 服务,不注册工具、不装后台服务,Ctrl+C 停止)。
开发
npm install
npm run check # 完整验收:lint / build / test / 仓库守卫 / 插件守卫 / doctor / 打包
npm run doctor
npm run preview:board新增或移除 MCP 工具、协议字段、插件打包或安全边界时,必须同步 AGENTS.md、架构、决策、测试、示例、CI 与两个离线守卫。四个工具都带显式 MCP annotations:get_board / show_board / scan_project 只读、非破坏、封闭本地,draw_board 是可删除或覆盖对象的破坏性写入。
文档
完整索引在 docs/README.md。常看的几个:
想了解 | 看这里 |
产品定义与边界 | |
怎么让 AI 画好图 | |
源码结构、HTTP 与安全模型 | |
目标、验收与实测结果 | |
当前有效的技术决策 | |
出问题先看这里 | |
安全 / 隐私 / 条款 | |
给 AI coding agent 的操作手册 |
英文版快速上手见 README.en.md。版本记录见 CHANGELOG.md,路线图见 ROADMAP.md。
License
MIT. See LICENSE.
Available Tools
4 toolsdraw_boardADestructive
让 AI 直接在共享无限画布上画或改。三个互斥的用法:diagram 用语义 nodes/edges 一次画完一张图,复杂图优先用它;items/updates/remove_ids/layout 做对象级增删改;library 管理本地可编辑画板库。要画两个以上互相关联的对象(流程、树、对比、状态机)时默认用 diagram —— 它自动排版并连好线;手算 x/y/w/h 会让模型反复微调几何,实测 diagram 平均 1.6 轮画完而手写 items 要 4.8 轮。只有在放单个独立对象、或要精确落在已有对象旁边时才直接写 items。改已有内容用 updates 复用已有 id,不要整板重建。author 放顶层,items 里不要再写。line 的 (x,y) 是起点,(x+w,y+h) 是终点,w/h 可为负数;其他对象是左上角与宽高。写入串行应用到最新状态;不传 expected_revision 即追加(并发安全),传了则严格校验。不打开浏览器,不写项目文件。
Inputs: items, author, layout, diagram, +5 more.
get_boardARead-only
读取人和 AI 共享画布的数据:revision、对象 ID、坐标、作者、BOARD_JSON 和画图规范。用于回答画布内容或给 Agent 提供视觉上下文;只读,不打开浏览器,也不写项目文件。重复读取同一画板时传 since_revision,只返回变化的对象。画布保真元数据不会出现在返回里。想显示可编辑画布时调用 show_board。
Inputs: view, include_guide, since_revision, include_canvas_fidelity.
scan_projectARead-only
可选能力:只读扫描当前工作区的目录与文件路径,并返回少量 file:line 证据文本,同时给一份可直接传给 draw_board.diagram 的草图(DIAGRAM_DRAFT_JSON)。项目结构只是画板可以讨论的内容之一;本工具不生成图、不改画板、不写文件,也不授权代码变更。要可视化时把草图传给 draw_board。
Inputs: max_depth, max_files, include_evidence.
show_boardARead-only
在人和 AI 的 Agent 对话旁显示共享无限画布,供用户直接查看和编辑。用户要求打开、查看、展示或编辑 Doodle 画布时调用。支持 MCP Apps 的宿主会嵌入交互式画布;其他宿主仍可通过普通工具读写画布。
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
get_board (reading canvas data) and show_board (displaying the interactive canvas UI) target the same resource and require careful reading of the descriptions to separate read-only data access from UI rendering. scan_project and draw_board are clearly distinct, and the descriptions explicitly cross-reference each other, which mitigates most confusion.
All four tools follow a strict verb_noun snake_case pattern: get_board, show_board, scan_project, draw_board. The convention is predictable and the verbs map cleanly to read/display/scan/write actions.
Four tools is a tight, well-scoped surface for a shared canvas server, with each tool earning its place (read, display, discover project context, write). No redundant or filler tools.
The surface covers the full lifecycle: reading with incremental revision support, interactive display, rich writing via diagram/items/updates/remove_ids/library, and project scanning for content. Minor gaps exist (no undo/history or whole-board deletion/export), but agents can work around these with remove_ids and revision-based reads.
Maintenance
Related MCP Connectors
Real-time collaborative whiteboard — AI agents and humans edit the same board live over MCP.
Online whiteboard your AI agent draws on: live shared canvases, solo or with your team.
A shared Excalidraw board that people and agents draw on together
AI agent draws editable hand-drawn diagrams (flowchart, ER, architecture) via MCP, not static images
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA shared whiteboard for you and your AI agent I wanted my AI agent and me to be able to point at the same thing. Any MCP-capable agent can read the canvas, draw on it, drop thought bubbles, animate elements, and react when you sketch something.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to draw animated, hand-drawn diagrams on a live whiteboard through MCP tools, allowing users to visually explain concepts and edit scenes interactively.45 npmAGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to collaboratively read, write, draw, and diagram on a shared real-time whiteboard canvas with live human edits.1MIT
- AlicenseNot gradedqualityCmaintenanceA local-first whiteboard MCP server that enables AI agents to create, inspect, and update canvas diagrams and shapes collaboratively via 13 semantic tools.6MIT