Plan - tb-portreeve-mcp

Feature: tb-portreeve-mcp Spec: spec.md Design: design.md Interview: interview.md Created: 2026-08-10

Inputs

Strategy

Build the MCP feature contract-first and deliver it through sequential branches whose PRs can be reviewed and merged independently. Extend the daemon protocol and official JavaScript client only where the approved MCP safety model needs capabilities that do not exist yet: bounded cursor collections, MCP origin attribution, evidence receipts with replayable outcomes, canonical stack document operations, and semantically idempotent mutations. Keep these facilities general PortReeve application contracts rather than embedding MCP transport policy in the daemon.

Add the official TypeScript MCP SDK v2 as an isolated runtime dependency for a new src/mcp/ adapter. The adapter owns stdio framing, tool registration, bridge-run attribution, process-local credential handles, and bounded renewal. It reaches domain state exclusively through the public JavaScript client. A declarative tool catalog should keep names, schemas, annotations, summaries, and exclusions auditable without introducing action-multiplexing tools.

Land safe observation and diagnostics before credential-bearing workflows. Then add the vault and ordinary coordination lifecycle, followed by the generic receipt service and consequential mutations. Complete the catalog with structured history, Docker snapshots, and launcher coordination that never executes project commands. Add host configuration generation to the CLI and Desktop only after the bridge contract is stable. Finish with compiled, packaged, cross-era, cross-host, cross-platform, concurrent-bridge, unavailable daemon, incompatible daemon, and Docker-backed verification.

Record the MCP dependency/version pin, public protocol and storage schema changes, receipt persistence model, canonical-document service boundary, and Desktop IPC expansion in scratchpad.md when their implementation decisions are made.

Steps

Verification