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 source, correct its interpretation, and export the evidence brief.
WebMCP only enhances the page. Without the experimental API, every investigation step still works by hand.
A protocol with four steps
| Tool | Purpose | Changes the caseboard |
|---|---|---|
scope_archive_case | Define a falsifiable historical question and check coverage across archives | Yes |
find_change_windows | Pair 3 to 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. A caseId identifies the case. The scan returns a limited set of changeId values, and one inspected change can 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 work 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 with identical bytes are omitted and known changes rank first. Archived bodies are fetched only for the one window chosen for inspection.