Sketch → wireframe with Claude (the MCP recipe)
Turn a hand sketch, whiteboard photo, screenshot, or exported PDF page into an editable wireframe. Claude does the looking; the MCP server guarantees the result lands safely as a candidate version you review — master is never touched.
One-time setup
claude mcp add wireframes -- node /abs/path/to/scripts/mcp-server.mjs /abs/path/to/project.wfm.json
The server exposes read tools (list_screens, get_screen, render_screen, describe_control_type, …) and write tools that only ever create candidate versions (propose_screen, propose_edit, add_underlay, add_comment).
The recipe
Give Claude the image and this prompt shape:
Look at
sketch.png. Recreate it as a wireframe screen in my project. 1. Calldescribe_control_type(no argument) to see the control vocabulary, then per-type for anything you use. 2. Callpropose_screenwith the traced controls — fullprops, real coordinates, canvas sized to the sketch. 3. Calladd_underlaywithimage_pathpointing at the sketch so I can review your trace against the source. 4. Callrender_screenon your proposal, look at the SVG, and fix anything that doesn't match withpropose_edit.
Claude sees the image directly (attach it or give a path it can read); the server never needs an API key and sends nothing anywhere.
What each step guarantees
| Step | Tool | Guarantee |
|---|---|---|
| Vocabulary | describe_control_type | Exact property keys, enum values, defaults — no guessed prop names |
| Trace | propose_screen | Lands as a candidate version authored claude; carries full props; canvas set from the sketch |
| Source attach | add_underlay | The sketch ghosts at low opacity behind the proposal — in the app and in render_screen output, including when rendering the candidate version |
| Self-check | render_screen → propose_edit | Claude inspects its own output and corrects before you ever look |
| Review | the app's compare view / review queue | Accept promotes to master; reject discards; nothing automatic |
PDFs
Drop the PDF straight into the app (the in-app PDF import): a page picker opens, and each selected page becomes a screen with the rendered page attached as a ghost underlay — no poppler, no dev machine; pdf.js loads lazily in the browser on first use. From there, trace over the underlay or run this recipe on the underlay image. One page often holds several phone frames — either trace them as one wide screen (the 2019 Pantry ground-truth screen is 3 iPhone frames, 248 controls on one canvas) or ask Claude for one propose_screen per frame.
Scale expectations
The pipeline is tested against the project's densest real screen: 248 controls of 10 types round-trip through propose_screen with every property intact (src/mcp/recipe.test.ts). Fidelity of the trace depends on the model and image quality; fidelity of the transport is guaranteed.
Out of scope (deliberately)
An in-app "convert with AI" button (BYO API key) is post-launch. This recipe needs only Claude Code / Claude Desktop and the MCP server above.