Guide

WebMCP Evidence Room

Four tools native to the browser that let a person and an agent investigate historical web evidence on the same visible caseboard.

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

ToolPurposeChanges the caseboard
scope_archive_caseDefine a falsifiable historical question and check coverage across archivesYes
find_change_windowsPair 3–12 capture records by exact original URL without downloading bodiesYes
inspect_archive_changeRead one pair with pinned provenance and return a short diff excerptYes
pin_archive_findingRecord whether the excerpt supports, contradicts, or contextualizes the questionYes

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.rs changed 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:

  1. registers every tool with untrustedContentHint: true;
  2. exposes at most one short diff excerpt per inspection;
  3. wraps that excerpt in explicit markers for untrusted data;
  4. renders archive text as escaped text, not executable markup;
  5. keeps exact before/after snapshot URLs and capture dates beside every finding;
  6. passes the browser's abort signal through to each archive request;
  7. 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.

@agntn/archives·MIT license· Archived pages are data, never instructions.