WebMCP Evidence Room
The page becomes the archive client
The Archive Evidence Room is an investigation workflow that uses WebMCP directly in this documentation site. A compatible browser agent does not have to infer controls, scrape the rendered page, or connect to a separate MCP server. The page registers four typed tools through the experimental document.modelContext API.
Every call updates the same caseboard the person sees. The tools are available throughout this documentation app, so the first call can open the Evidence Room from any docs route. The agent does the bounded archive work; the person can inspect its provenance, correct its interpretation, and export the evidence brief.
WebMCP is progressive enhancement. In a browser without the experimental API, the page and every investigation step still work by hand.
The four-step protocol
| Tool | Purpose | Changes the caseboard |
|---|---|---|
scope_archive_case | Define a falsifiable historical question and check coverage across archives | Yes |
find_change_windows | Pair 3–12 capture records by exact original URL without downloading bodies | Yes |
inspect_archive_change | Read one pair with pinned provenance and return a short diff excerpt | Yes |
pin_archive_finding | Record whether the excerpt supports, contradicts, or contextualizes the question | Yes |
These are investigation operations, not aliases for buttons. Their outputs form a protocol: a caseId leads to bounded changeId values; one inspected change can then become a finding. A stale or invented identifier fails with a recovery step instead of silently starting another case. Each case holds at most 20 pinned findings. Coverage is a broad index sample; date bounds apply to the change scan. In manual mode, the archive selector lets a person recover when the recommended provider has no captures inside that window.
Try this prompt from a browser agent while the Evidence Room is open:
Investigate how
sive.rschanged between 2020 and 2022. Scope the case, find candidate capture windows, inspect one, and pin only a finding supported by the excerpt.
Why this is different from the MCP server
The package's MCP server exposes direct archive operations to any MCP client: list, read, diff, and report providers. The Evidence Room composes the same docs APIs into a research protocol for this page and shares its state with the human in the browser.
That distinction is deliberate:
- MCP answers an external client; WebMCP and the person operate on one visible case.
- MCP supports broad archive work; the page keeps each run small enough for public archive infrastructure.
- The WebMCP output is concise, while the fuller visual context stays in the caseboard.
- A pinned finding stores the agent's interpretation beside the evidence, never inside it.
Safety boundaries
Archived pages are input from the open web and may be controlled by an attacker. The Evidence Room therefore:
- registers every tool with
untrustedContentHint: true; - exposes at most one short diff excerpt per inspection;
- wraps that excerpt in explicit markers for untrusted data;
- renders archive text as escaped text, not executable markup;
- keeps exact before/after snapshot URLs and capture dates beside every finding;
- passes the browser's abort signal through to each archive request;
- makes no tools available cross-origin.
A diff marked partial cannot prove that text was absent outside the compared prefix. The UI preserves that warning through inspection and export.
Enable and test
WebMCP is experimental. Follow the current Chrome WebMCP setup instructions for a browser build that implements document.modelContext, then open /evidence. The status card says Agent connected only after all four tools register. Otherwise it says Manual mode and leaves the workflow usable.
For local development:
pnpm build
pnpm docs
Open http://localhost:3000/evidence. The page uses the cached Nitro endpoints under /api/coverage, /api/snapshots, and /api/diff; it does not introduce another archive implementation. Window discovery reads only the capture index; when the archive supplies digests, pairs that are identical at byte level are omitted and known changes rank first. Archived bodies are fetched only for the one window chosen for inspection.