The problem: the plan changed, but the cut cannot be undone

A fabric scrap can turn out to be smaller than expected halfway through a project. The front panel is already cut. Starting again discards useful work; shrinking the remaining pieces independently can produce parts that no longer fit together.

Offcut Studio explores an assistant that preserves completed work and recovers the next feasible step. Its target is a home maker working with a small, mixed inventory of remnants. This is a prototype hypothesis, not measured waste reduction or customer validation.

What the working MCP demonstration does

The browser client connects to a local MCP server, initializes a session, lists its tools, and calls the actual workspace engine. In the demonstrated synthetic scenario, marking the 110 by 160 mm front panel cut subtracts its footprint once. Repeating that command does not consume material twice. Correcting the ochre scrap to 60 mm tall invalidates the layout. Replanning recovers the uncut pocket to 100 by 60 mm while preserving the completed front and the existing fabric choices.

The difference is visible in both the remaining-stock diagram and the protocol responses. A cut command records the maker's report; it does not sense or prove a physical cut.

How it works

The local workbench uses Streamable HTTP JSON responses and MCP protocol version 2025-11-25. It implements initialize, initialized notification, tools/list and tools/call. inspect_workspace reads the current session; apply_command invokes the supported deterministic command grammar with an expected revision. Stale revisions are rejected. Reusing a request ID with changed arguments is rejected; an identical request can return its recorded result.

The server runs the existing TypeScript workspace engine through Vite. Polygon Boolean operations check containment and subtract cut footprints. A bounded planner respects grain restrictions, paired-panel dimensions and completed placements. The main React browser simulation also supports saved local workspaces and SVG export of uncut pieces. The MCP workbench has a separate in-memory synthetic workspace per connection and does not synchronize the main app's browser storage.

Run it

Clone https://github.com/estona815/offcut-studio at revision 23e08f97415dca8bf79037f23dcb1049414c82e3. With Node.js 24+ and pnpm 11+ on PATH, run pnpm install --frozen-lockfile and pnpm dev, then open http://127.0.0.1:4178/mcp.html. Connect, mark front cut, repeat the cut, correct the ochre scrap to six centimeters tall, and replan the pocket. The linked 105-second video shows this sequence using actual application captures and English captions.

No account, paid inference API, live language model, Alexa device or AWS connection is used. This is a local MCP implementation and simulated assistant experience, not an Alexa-connected deployment. Use the development server: a static build or preview does not provide the MCP endpoint. The endpoint is restricted to loopback and same-origin requests; it has no account authentication and should not be exposed publicly.

Validation and engineering lessons

The published implementation passed 25 existing tests, a TypeScript/Vite production build, a real HTTP integration scenario and browser interaction checks. The HTTP scenario covers initialization, tool discovery, changed cut geometry, duplicate handling, stale-revision refusal and recovery. These are bounded prototype checks, not full MCP conformance certification.

The design separates reversible plans from irreversible reported cuts. It also separates a request being delivered twice from a maker intentionally issuing a new command, and rejects mutations against stale workspace revisions. Those constraints make the recovery behavior inspectable rather than silently assuming every request is safe.

Limits and next steps

The packer is a bounded heuristic: failure to find a layout does not prove none exists. Inventory is synthetic. The patterns have not been physically printed, sewn or fit-tested; stretch, shrinkage and sewing tolerances are not modeled. MCP sessions are temporary and expire after 30 idle minutes or server restart.

The original browser app exports millimetre SVGs, including a 100 mm calibration line. The recovered example is larger than A4 and needs suitable paper or a separate tiled-print workflow at 100% scale. The app does not generate tiled A4 pages. The next evaluation is a paper-scale check followed by a supervised making trial, measuring recovery mistakes and material use before making benefit claims.

AI contribution and demo format

Codex assisted design exploration, implementation, testing, documentation and the edited walkthrough. Built-in ImageGen generated concept references and decorative fabric textures, which are not material measurements. React, Vite, TypeScript, Vitest and polygon-clipping are credited in the repository. No unaided-authorship claim is made.

The 105-second demo is an edited walkthrough of actual local application still captures with English captions and no audio; it is not a continuous real-time recording. The primary project source is public. No separate Open Source Mini Challenge contribution is claimed.

Built With

Share this project:

Updates

Submission history