WebMCP (document.modelContext) packages for the web, planned and built spec-first with OpenSpec.
| package | what it is |
|---|---|
packages/model-context |
framework-free core: registry, client adapters, change budget, activity feed, schema helpers, testing fakes (./testing) |
packages/react-model-context |
React 19 bindings: provider, hooks, <Tool>, <ToolScope>, declarative forms (./jsx), collaboration layer, agent panel (./panel), auto-mode wrapper (./auto) |
packages/model-context-auto |
derives tools from the live DOM; standalone bundle, HUD and bookmarklet |
packages/model-context-drive |
not published to npm: drives a page's tools from outside the tab through DevTools; the mcd command and its JSON transcript |
Nothing is published to npm yet. Consumers install with bun link or a packed tarball (bun pm pack in a package directory).
The demo site that vendors these packages lives in the withreact repository and runs at https://webmcp.withreact.com.
bun install
bun run build # every package
bun run test # every package (vitest + jsdom)
bun run typecheck
bun run spec # openspec validate --all --strictThe plan lives in openspec/: openspec/config.yaml carries the project context, openspec/changes/<name>/ carries one proposal, its delta specs, design and tasks per change. Build order: core-registry → react-bindings → agent-collaboration → auto-derive → agent-panel → machine-agent-tooling. In Claude Code, /opsx:apply <name> implements a change against its tasks and /opsx:archive <name> folds its delta into openspec/specs/.
docs/machine-agents.md covers the other caller of a page's tools: a process outside the tab, through mcd or through chrome-devtools-mcp.
An earlier prototype proved the design; it is not part of this repository. Each change ports function by function against its spec, never by copying files.
MIT — see LICENSE.