Squigly
# squigly-mcp
Draw with Claude on a live whiteboard. This MCP server puts Claude on a
[Squigly](https://squigly.app) board with you: you watch it draw, you draw too, and it looks at
what you drew and builds on it.
Squigly boards are end-to-end encrypted. The key is the part of the board link after `#`, and
this server encrypts every shape on your machine with it before anything is sent. The relay
only ever sees ciphertext.
## Set up
You need Node 22 or later.
```sh
git clone https://github.com/AndBobsYourUncle/squigly-mcp.git
cd squigly-mcp && npm install
```
**Claude Code**
```sh
claude mcp add squigly --scope user -- node /path/to/squigly-mcp/src/server.js
```
**Claude Desktop and other MCP clients** (in the client's MCP config file):
```json
{
"mcpServers": {
"squigly": {
"command": "node",
"args": ["/path/to/squigly-mcp/src/server.js"]
}
}
}
```
Then ask: *"start a squigly board and diagram how auth works in this repo"*. Claude makes a
board and gives you the link. Open it, and it draws once you're there. You can also open a board
on squigly.app yourself, click Share, start a live session, and paste that link to Claude.
## What you can do together
- **Ask Claude to look.** "Look at what I drew" gives Claude a picture of the board and reads
its structure: boxes and their text, frames, arrows and what each end is attached to, arrow
labels, notes and freehand sketches. It also hears who added, moved, changed or deleted what
since it last looked.
- **Take turns.** "Sketch the flow and I'll tidy it up." Claude waits until you've drawn and
paused, then looks.
- **Build on what's there.** Claude adds nodes next to what they connect to, connects shapes,
relabels, restyles and removes, finding shapes by the text on them ("connect API to Cache").
It never redraws the rest, so your moves, colours and wording stay. Ask it to tidy up and it
slides the boxes into a clean layout without changing how they look.
- **Edit Claude's drawing.** Move or resize a box and its arrows follow, for everyone watching.
Arrows Claude draws between boxes are attached to them, the same as arrows you attach in
Squigly by dropping an end on a shape.
- **Follow Claude.** Click Claude in the people list to follow it. Claude chooses what you see,
zoom included: it can frame one part of a diagram while it explains it, then the next, then
zoom back out. While it draws, your view frames the drawing as it grows.
- **Point things out.** Claude can ring shapes for a few seconds, point its cursor at them, or
leave a sticky note next to one.
- **Undo** takes back Claude's last change and leaves anything you edited since alone.
- **Export** the board as SVG, PNG, Mermaid or JSON.
Claude draws from Mermaid (flowchart, sequenceDiagram, mindmap, erDiagram, classDiagram) or
from a list of nodes and edges, laid out for you.
## Tools
| Tool | What it does |
|---|---|
| `new_board` / `join_board` / `leave_board` | Start a board and get its link / join one from a link / disconnect |
| `look_at_board` | Picture, structure and what changed since Claude last looked |
| `wait_for_changes` | Wait for someone to draw and pause, then look |
| `get_board` | Every shape's exact geometry and style |
| `draw_mermaid` | Mermaid diagrams, laid out |
| `draw_diagram` | Nodes, edges and group frames, laid out |
| `edit_diagram` | Add, connect, update and remove on what's there, with optional relayout |
| `add_shapes` / `update_shapes` / `delete_shapes` | Free-form shapes |
| `highlight` | A ring around shapes for a few seconds |
| `add_note` | A sticky note next to a shape, placed where it covers nothing |
| `move_cursor` | Point at something, and frame or zoom what followers see |
| `undo` | Take back Claude's last change |
| `export_board` | Save as SVG, PNG, Mermaid or JSON |
| `clear_board` / `set_title` | Clear (undoable) / rename |
## Settings
Environment variables, all optional:
| Variable | Default | |
|---|---|---|
| `SQUIGLY_NAME` | `Claude` | The name on Claude's cursor |
| `SQUIGLY_SPEED` | `normal` | How fast shapes appear: `slow` (600 ms each), `normal` (300 ms), `fast` (120 ms) or `instant`. Claude can also pick a speed per drawing |
| `SQUIGLY_STATE_DIR` | `~/.squigly-mcp/rooms` | Where it keeps per-board hints (below) |
## Privacy
- The board link is the key. Anyone with it can open and edit the board, so treat it like a
password. Claude is told the same.
- Shapes are encrypted on your machine before they leave it. Squigly's relay stores and forwards
only ciphertext.
- What Claude sees of the board (the picture and the shapes) goes to the model your MCP client
uses, like any other tool result.
- On disk, the server keeps a small file per board with shape ids, the short keys Claude used
for nodes (like `api` in a Mermaid source) and which arrows join which boxes. It stores no
key, no labels and no drawing.
- Boards are saved on squigly.app, encrypted, so a link keeps working later.
## Limits
Each message to the relay is at most 1 KB encrypted, so a very long label is refused with a
clear error. Freehand lines carry at most 64 points. Changes go out at up to 25 a second.
This server speaks Squigly's live format directly. If Squigly changes that format, this server
needs a matching update.
## Develop
```sh
npm test # offline: encryption, parsing, layout, the collaboration layer
```
See [MAINTAINING.md](MAINTAINING.md) for how it fits together and the live test scripts.
## License
MIT
TDQS
Scored across 19 tools
Most tools have clearly distinct roles, and the descriptions actively steer the agent (e.g. look_at_board vs get_board: 'look_at_board is usually what you want'; edit_diagram remove vs delete_shapes). The main soft spots are update_shapes vs edit_diagram (both edit existing shapes by reference) and move_cursor, whose description also covers follow/view/zoom steering that has no tool of its own, which muddies what that tool actually does.
The set follows a verb_noun pattern almost throughout (join_board, look_at_board, add_shapes, delete_shapes, draw_diagram, edit_diagram, export_board). Minor deviations: new_board uses an adjective rather than a verb (create_board would match), and undo/highlight are bare verbs, but nothing is ambiguous or mixed-convention in style.
At 19 tools this is slightly above the comfortable range, but the domain is broad (live collaboration, freehand drawing, diagram generation/editing, export), and each tool covers a genuinely separate capability rather than a duplicate. It sits just short of feeling padded.
The lifecycle is well covered: create/join/leave a room, read (visual + exact), add/update/delete/clear shapes, undo, diagrams in and out, export to four formats, presence (cursor, highlight, wait_for_changes). Gaps are minor: no redo to pair with undo, no way to delete/close or list rooms, and follow/view control is only exposed as options on move_cursor rather than its own operation.