ResearchPractical AIProjectsOpen SourceAbout
Projects/Updating a Site's WebMCP Setup for the Current Browser API: What Changed and What I Changed
WebMCPAI VisibilityBrowser APIsNext.jsDogfood

Updating a Site's WebMCP Setup for the Current Browser API: What Changed and What I Changed

WebMCP, the browser API that lets a page offer tools to AI agents, has moved since porsync.com first used it in May. I read Chrome's current documentation and the early adopters' write-ups, then updated this site: tools now register with a clean-up signal, carry read-only labels, and a second tool looks up a single research write-up. Tested against a production build with a stand-in for the browser API, not yet in Chrome with the real one.

Published 2026-11-02 · Last modified 2026-11-02

Measured results

  • ▲The site was already on the current entry point (document.modelContext), so the update was about lifecycle and metadata, not a rewrite
  • ▲Two read-only tools are now registered: list_projects and get_research (one write-up by slug, 27 available)
  • ▲Both tools unregister cleanly when the page unmounts, which avoids the duplicate-name error that development reloads would otherwise trigger
  • ▲Production build passes, the new endpoint pre-renders for all 27 research slugs, and an unknown slug returns 404
  • ▲Not yet verified: registration in real Chrome with WebMCP enabled, and a rescan with the Inspector extension

This follows up the May 2026 test in Getting Found and Used by AI Assistants. That piece is a snapshot of the site as it was then. This one covers what changed in WebMCP since, and what I changed on this site in response. It reports no new benchmark scores.

What WebMCP is, in one paragraph

WebMCP is a browser API that lets a web page hand AI agents a list of tools, each with a name, a description and an input format, so an agent can call "look up this record" directly instead of clicking around the page. It is not on by default in regular browsers. According to Chrome's documentation and early write-ups, it is in an origin trial starting with Chrome 149 and also available behind a flag. I found no announced support from Firefox or Safari.

What moved

From Chrome's documentation and the write-ups I read (sources below), the parts that matter for a site like this one:

  • document.modelContext is the entry point. navigator.modelContext is described as deprecated from Chrome 150.
  • Tools are registered one at a time with registerTool. The earlier bulk call, provideContext, is reported as removed.
  • A duplicate tool name throws. Registering the same name twice is an error, not a replacement.
  • Registration takes an AbortSignal. Aborting it unregisters the tool.
  • Tools can carry hints. Annotations such as a read-only hint tell an agent that calling a tool changes nothing, and tools can have a human-readable title.
  • Chrome's Lighthouse has an audit that lists registered tools and warns above 40.

What was already right

The site already used document.modelContext with a fallback to the older navigator form, and it did not use provideContext. So nothing here was broken by the changes above. The gaps were smaller and about robustness.

What I changed

  • Clean-up on unmount. Each registration now gets an abort signal that is fired when the component unmounts. Without it, React's development double-mount and hot reloads would register the same tool twice and hit the duplicate-name error.
  • Titles and hints. Both tools have a title and are marked read-only. Neither returns content from third parties.
  • Cancellable requests. The tool's network call uses the signal the browser passes to it, so an agent that cancels a call actually cancels the request.
  • Failures are logged, not thrown. A failed registration writes a warning and leaves the page working.
  • A second tool, get_research. It takes a slug from list_projects and returns that write-up's title, summary, headline finding, tags, date and link. It deliberately leaves out the full text; the link points to it. It is pre-rendered for every research slug, rejects malformed input with a clear message, and answers an unknown slug with a 404.
  • Docs kept in step. The tools page, the llms.txt summary file and the README now describe two tools instead of one.

How I tested it, and what that does not show

I built the production site and called the new endpoint over HTTP: a real slug returned the record, an unknown slug returned 404. I then loaded the built site in headless Chromium with a stand-in for document.modelContext that throws on duplicate names. Both tools registered exactly once with no warnings, get_research returned the right write-up for a slug taken from list_projects, and a malformed slug produced the validation error.

That stand-in is my own code, written to match the API as documented. It proves the site's side of the contract. It does not prove real Chrome accepts the registration, and I have not run the Inspector extension or the Lighthouse audit against the updated site.

What I did not do

  • No /.well-known/webmcp file. The May test noted its absence. I found no specification for that file in the sources above, so I did not add one on a guess.
  • No new score and no rerun of the three-site comparison. The earlier piece's limitations still stand.
  • No claim that this makes the site more discoverable. An agent can only use these tools in a browser that has WebMCP switched on, which today means a small number of people.

Tools

Chrome's WebMCP documentation, the Lighthouse agentic-browsing audit, Next.js 16, headless Chromium with a stand-in for the browser API.

Sources

  • Chrome for Developers: WebMCP imperative API and the Lighthouse "Registered WebMCP tools" audit
  • "WebMCP's origin trial: provideContext is already gone" (DEV Community)
  • "We added WebMCP tools to our own website, here is the code" (DEV Community)

Limitations

  • Everything about the browser API comes from documentation and third-party write-ups read on 2026-11-02, and the standard is changing quickly. Details may already be out of date.
  • Tested against a stand-in, not real Chrome.
  • One small site, two read-only tools. Nothing here says how the approach scales or whether agents use these tools.