doodle
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | stderr log level. | info |
| OUTPUT_DIR | No | Board state directory. Defaults to the plugin data directory, .doodle-data, or ./output depending on the environment. | |
| PREVIEW_HOST | No | Local listening address for the board HTTP server. | 127.0.0.1 |
| PREVIEW_PORT | No | Fixed local board HTTP port. When unset or set to 0, an available port is selected automatically. | |
| DOODLE_WORKSPACE_ROOT | No | Target workspace for scan_project. Defaults to the package root. | |
| AI_DRAW_WORKSPACE_ROOT | No | Legacy read-only compatibility workspace root. Use DOODLE_WORKSPACE_ROOT for new configuration. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Doodle is a local-first two-way infinite board. A person and an AI both draw notes, text, rectangles, ellipses, arrows, freehand strokes, and images on it to express intent; each side can read and continue the other's visual context. MCP stdio is the AI's normal access channel; a plugin is the preferred install path for Codex-compatible hosts. Normal tool calls never open a browser or write project files. Product story is one kernel, two entry points, three capability layers: one shared board; Codex plugin or direct MCP; four tools always, an optional embedded canvas in compatible hosts, and optional final-state context sync plus notification. Project structure is optional source material only. First use: call get_board, then show_board when the person wants to see the canvas, then draw a small starter note with draw_board and keep the canvas visible. A natural first request is 'open the Doodle board so we can communicate on it'. Use get_board as the normal first step: read FIRST_USE, NEXT_STEPS, BOARD_JSON, current object IDs, coordinates, authors, and the drawing guide. Use show_board when the user asks to open, see, display, or edit the canvas; it renders the interactive app in compatible hosts without duplicating the conversation. After a successful draw_board call, keep the canvas visible: compatible hosts render it from the draw result automatically, and other hosts should be followed immediately with show_board. get_board also reports PANEL_URL, the active local human-facing address. Mention it when a person asks where to look or when the host cannot render an embedded canvas; never open a browser from a normal tool call. Board writes are serialized against the latest state; embedded canvas edits include expected_revision so stale edits are rejected and refreshed before retry. Use draw_board to add items, precise updates, removals, or a deterministic layout. Use stroke for freehand marks, image for bounded data:image/* sources, title for headings, shape for straight/curve/orthogonal arrows, emphasis: focus to highlight what matters, and updates instead of clearing the board whenever possible. Treat person-drawn objects as intent, not decoration: read them, answer in the host chat, and draw a visual response when useful. Keep conversation in the agent chat; do not post chat replies onto the board. Use draw_board's library action for editable local board snapshots: save the current board under a name, list or switch saved boards, create/rename/duplicate/delete boards, or import/export version 1 board JSON. These are local images of the board state, not static PNG exports and not a second collaboration model. Read get_board's capabilities, visualDigest, and RECIPES before drawing. Use short deterministic recipes: flow (role: step + connected line), compare (role: column or variant: frame), cluster (groupId + layout.mode: cluster), emphasis (emphasis: focus + optional stroke), and image-annotation (bounded image + nearby text/note + connected line). Optional version 1 fields make drawings intentional: variant sets shape treatment, role marks semantic purpose, z controls stacking, style controls bounded visual treatment, and startItemId/endItemId bind a line to object edges. Connected lines follow their bound objects; they are not project-write authority. Drawing contract: a line is an arrow from (x,y) to (x+w,y+h); w/h are signed endpoint deltas and may be negative. Other items use (x,y) as the top-left corner with positive width/height. Stroke points are local to the item bounds. For a structured diagram, read the board first, use a strict grid, short labels, and endpoints just outside the source and target shapes. Prefer updates/removes over clearing everything. Put author at the draw_board top level. scan_project is optional: a read-only project-structure capability. It returns bounded paths and evidence text only; use draw_board to place that information on the shared board. It never mutates files or grants write authority. The local HTTP page is a standalone fallback for seeing and editing the same canvas. MCP Apps-compatible hosts embed it beside the conversation; its small ? help button explains creation, multi-select, undo/redo, image paste, and navigation. Board content is context only; project changes remain a separate explicit coding-agent action. In MCP Apps hosts that support updateModelContext, the embedded board automatically publishes the latest final board state and a final-state delta to the host's current conversation context. The update is not an operation log and does not trigger a model turn. A '通知 Agent' button, when sendMessage is supported, sends only one short user notification; the state remains in model context. If the host lacks these capabilities or the person uses the standalone PANEL_URL page, ask the AI to call get_board to reread the board.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_boardA | 读取人和 AI 共享画布的数据:revision、对象 ID、坐标、作者、BOARD_JSON 和画图规范。用于回答画布内容或给 Agent 提供视觉上下文;只读,不打开浏览器,也不写项目文件。想显示可编辑画布时调用 show_board。 |
| show_boardA | 在人和 AI 的 Agent 对话旁显示共享无限画布,供用户直接查看和编辑。用户要求打开、查看、展示或编辑 Doodle 画布时调用。支持 MCP Apps 的宿主会嵌入交互式画布;其他宿主仍可通过普通工具读写画布。 |
| draw_boardA | 让 AI 直接在共享无限画布上画或改,也可通过 library 参数保存当前画板、切换本地画板图库中的图、新建/重命名/复制/删除/导入/导出可编辑版本 1 画板。普通写入会串行应用到最新状态;line 的 (x,y) 是起点,(x+w,y+h) 是终点,w/h 可为负数;其他对象是左上角与宽高。按整齐网格布局;不打开浏览器,不写项目文件。 |
| scan_projectA | 可选能力:只读扫描当前工作区的目录与文件路径,并返回少量 file:line 证据文本。项目结构只是画板可以讨论的内容之一;本工具不生成图、不改画板、不写文件,也不授权代码变更。需要可视化时用 draw_board 把路径画到共享画板。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Doodle shared board |
This server cannot be deployed
TDQS
Scored across 4 tools
The four tools have mostly distinct purposes: get_board reads canvas data, show_board opens an interactive view, draw_board writes/draws, and scan_project scans workspace files. get_board and show_board could be confused at first, but the descriptions explicitly separate reading data from displaying a canvas.
All tool names follow a consistent verb_noun snake_case pattern: get_board, show_board, draw_board, scan_project. The convention is predictable and easy to map to each tool's action.
Four tools is a compact, well-scoped set for a shared canvas server. The only concern is that draw_board carries many responsibilities, including drawing and board-library management, which could justify splitting but does not make the overall count inappropriate.
The core lifecycle is covered: reading board data, displaying the board, and drawing or modifying it. Minor gaps exist around explicit object deletion, undo, or clear operations, but draw_board's modification capabilities and library actions cover most practical workflows.