@dchoueiry/slate-mcp
v0.3.3
Published
MCP bridge that lets a local coding agent (Claude Code or any MCP client) draw on and read from your Slate canvas.
Downloads
705
Maintainers
Readme
slate-mcp
Your coding agent finally has a whiteboard.
slate-mcp is an MCP server that lets Claude Code — or any MCP client — draw on and read from your Slate canvas. Ask your agent to "map this repo's architecture on my board" and watch the diagram animate onto the canvas. Rearrange it by hand, then ask the agent "what did I change?" — it reads your edits back.
Everything runs on your machine: the agent talks to this bridge over stdio, and the bridge talks to your open Slate tab over a localhost WebSocket. It works with both a local dev Slate and the deployed web app (browsers allow https pages to reach ws://127.0.0.1). No cloud, no accounts, no telemetry.
Setup
claude mcp add slate -- npx @dchoueiry/slate-mcpThen open Slate in your browser and ask your agent to draw something. On first use the agent shows you a 4-digit pairing code — type it into the dialog that appears in Slate. That's it; the pairing persists.
What the agent can do
| Tool | What it does |
|---|---|
| list_boards | List your boards |
| read_board | Read every object on a board — including reveal steps and your hand edits (selected objects are marked) |
| get_selection | Read what you currently have selected — select objects, then say "make these blue" or "summarize this" |
| create_board | Create and open a new board |
| add_objects | Draw a batch of stickies/shapes/text/frames/connectors (one undo step, animates in; optional auto-layout). Add reveal:{step,effect} to stage objects for Reveal Mode. Text with w becomes a wrapped text box; a sticky whose first line starts with ai:, img:, search:, … is a live runnable AI node — the agent can build entire flows |
| update_objects | Edit text, colors, positions, wrapped text width, and Reveal Mode metadata |
| delete_objects | Delete objects (never boards) |
| run_node | Run a Slate AI node (ai:, chart:, img:, …) like pressing ▶ |
| get_node_output | Read a node's last output |
| get_run_status | Poll a slow run (video, deep research) |
| render_board | See the board as a PNG — check its own layout, read your freehand ink ("improve what I circled") |
| focus_on | Pan/zoom your viewport to its work (smooth, rate-limited) |
| add_upload | Pipe a CSV/text file from its environment into a real upload node — full-fidelity, wireable into business:/chart: flows |
add_objects also places icons (340-name built-in registry) and agent-authored SVG graphics (sanitized: no scripts, no external references).
Everything the agent draws is a normal Slate object: move it, restyle it, and undo any agent action with a single ⌘Z.
Reveal Mode
Agents can stage a board for presentation playback by assigning reveal metadata:
{
"reveal": { "step": 2, "effect": "pop", "durationMs": 360 }
}Objects with the same step reveal together. Supported effects are pop, fade, slide-up, slide-left, and none. To remove staging from an object, call update_objects with {"reveal": null}.
Multiple agent sessions
Run slate-mcp from as many MCP clients as you like (Claude Code, Claude Desktop, Cursor, …) at the same time — they all share your one Slate tab, no disconnecting and reconnecting. The first process to start owns the port and the tab; every later one automatically joins it as a peer, authenticated with the same pairing token. If the owning session exits, a surviving one takes over within a second and the tab reconnects on its own.
What the agent can never do
Touch your settings or API keys, delete boards, act while no Slate tab is open, or connect without your one-time pairing confirmation. The bridge binds to 127.0.0.1 only, checks web origins against an allowlist, and authenticates every session with a 256-bit token stored in ~/.slate-mcp/.
Options
slate-mcp [--port 8642] [--allow-origin https://your-slate-domain.com]--port/SLATE_MCP_PORT— WebSocket port (set the same port in Slate if you change it)--allow-origin/SLATE_BRIDGE_ORIGINS— extra allowed web origins for self-hosted Slate deployments (localhost is always allowed)
Development
npm test # security + protocol tests (node --test)MIT.
