Google announced WebMCP at the Google I/O 2026 Developer keynote on May 19, and the Chrome 149 origin trial opened the same week. If you haven’t looked at this yet, the short version is: WebMCP lets a web page declare its own capabilities as structured tools that in-browser AI agents can call — no backend MCP server, no screen-scraping, no per-site prompt engineering.
The slightly longer version: as of this writing, no shipping agent consumes those tools in production yet. Google’s own I/O announcement says only that “Gemini in Chrome will soon support WebMCP APIs” — a future commitment, not a live integration. Before you start annotating your HTML, that gap needs to be in your decision framework.
This guide covers the two implementation paths, the origin trial registration process, how to audit what you shipped, and the honest answer to “should I build this now.”
For a full explainer of what WebMCP is and how it compares to server-side MCP, see our WebMCP review.
Why Structured Tools Beat Vision-Based Scraping — and Why Adoption Is the Real Gate
Several third-party WebMCP write-ups circulating since the origin trial opened cite an “8–12x faster” figure for WebMCP-enabled sites versus vision-based agents. That specific number does not appear in Google’s own I/O keynote recap or origin-trial announcement, and no underlying study is linked from the posts repeating it — so it is cut here rather than repeated as if Google published it. What Google’s own material says is qualitative: WebMCP lets “an agent… call machine-friendly functions to complete complex tasks in seconds,” instead of the agent parsing rendered pixels, inferring structure from visual layout, and guessing at affordances the way a vision-based agent must. A registered WebMCP tool gives the agent a typed schema with explicit parameter names, types, and descriptions — there is nothing to infer. Whether that translates to a specific multiplier on your site is something you’d need to benchmark yourself; no third party has published reproducible numbers yet.
The more binding constraint isn’t speed — it’s reach. As of July 2026, “no mainstream agent calls WebMCP tools yet”: Gemini in Chrome, the one agent Google has named as a future consumer, has not shipped that support. Until an agent actually calls your registered tools, your implementation reaches zero production agent sessions — it is pure preparation for when that changes.
This context matters for deciding how much engineering time to spend, not for deciding whether the standard is sound. The standard is sound. The adoption trajectory is what requires judgment.
Two Implementation Paths
WebMCP provides a Declarative API and an Imperative API. They can be used together on the same page.
Declarative API — HTML Form Annotations
The Declarative API works by adding attributes to existing <form> elements. The browser reads those attributes and generates a JSON schema automatically. No JavaScript required.
<form tool-name="searchProducts"
tool-description="Search the product catalog by keyword and optional category"
tool-response="json">
<input name="query"
type="text"
tool-description="Search keyword or phrase"
required>
<select name="category"
tool-description="Optional product category filter">
<option value="">All categories</option>
<option value="electronics">Electronics</option>
<option value="clothing">Clothing</option>
</select>
<button type="submit">Search</button>
</form>
When an agent calls the searchProducts tool, the browser submits the form programmatically using the registered inputs. tool-response="json" tells the browser to parse the response as JSON and return it to the agent as the tool result.
When to use the Declarative API: Whenever you have an existing form that already encodes the right behavior. Adding tool-name, tool-description, and tool-response to a working form takes about five minutes. For search forms, filter forms, checkout flows, booking widgets — the Declarative API is the right starting point.
What it cannot do: Dynamic behaviors that aren’t backed by a <form> — JavaScript-only interactions, multi-step flows without a form per step, anything that requires stateful manipulation before a tool call. That is what the Imperative API handles.
Imperative API — document.modelContext
The Imperative API exposes registerTool(), which lets you register any JavaScript function as a tool with a full JSON Schema definition. Note on naming: the API shipped in the Chrome 149 origin trial as navigator.modelContext, but the upstream spec moved the property from Navigator to Document in its late-May 2026 draft, and Chrome 150 deprecated navigator.modelContext in favor of document.modelContext (the old name still works as a backward-compatible alias with a one-time console warning, but new code should target document.modelContext).
// Feature-detect before registering
if (document.modelContext?.registerTool) {
document.modelContext.registerTool({
name: 'addToCart',
description: 'Add a product to the user\'s shopping cart',
inputSchema: {
type: 'object',
properties: {
productId: {
type: 'string',
description: 'The unique identifier of the product'
},
quantity: {
type: 'integer',
description: 'Number of units to add',
minimum: 1,
default: 1
}
},
required: ['productId']
},
execute: async ({ productId, quantity = 1 }) => {
const result = await cart.add(productId, quantity);
return `Added ${quantity}× ${result.productName} to cart. Cart total: ${result.cartTotal}`;
}
});
}
The execute function receives parsed, validated inputs matching your schema. Per Chrome’s Imperative API reference, it returns a plain string — not the content array shape used by server-side MCP tool responses. (An earlier draft of the API mirrored the MCP content-array shape; the shipped API is simpler. If you’ve seen sample code elsewhere returning { content: [...] }, that’s stale.) The browser passes the returned string to the agent as the tool’s result.
Feature detection is not optional. document.modelContext (and its deprecated navigator.modelContext alias) is undefined in every browser except Chrome 149+ with the origin trial token present (or behind the chrome://flags/#enable-webmcp-testing flag). The if (document.modelContext?.registerTool) check prevents errors in Firefox, Safari, and Chrome versions below 149. Your page should render and function identically when document.modelContext is unavailable.
Tool naming: Tool names must be unique within a page. Keep names concise and action-oriented (searchFlights, filterResults, submitBooking). The agent uses the name and description to decide when to call the tool, so both should be unambiguous about what the tool does and what it returns.
Origin Trial Registration
To ship WebMCP tools to real users on Chrome 149, you need an origin trial token from Google’s origin trial console. Without the token, document.modelContext is undefined and HTML annotations are ignored — even on Chrome 149.
Steps:
- Go to the Chrome origin trials console and register for the WebMCP trial specifically (it also covers Android and Android WebView, not just desktop).
- Register your origin (domain). Tokens are scoped to a specific origin —
https://example.comgets its own token, separate fromhttps://app.example.com. - Add the token to your pages via an HTTP response header or a
<meta>tag:
<!-- Meta tag approach (works for all pages on the origin) -->
<meta http-equiv="origin-trial" content="YOUR_TOKEN_HERE">
Or as an HTTP header:
Origin-Trial: YOUR_TOKEN_HERE
- Verify the token is active by opening Chrome DevTools → Application → Origin Trials. You should see
WebMCPlisted as an active trial.
Token expiry: Origin trial tokens expire, and the window varies by trial rather than following one fixed cadence. The WebMCP trial specifically runs Chrome milestones 149 through 156 — roughly six months, given Chrome’s mid-trial shift to a two-week release cadence — with general availability targeted for Chrome 157. Confirm the actual expiry for your token in the origin trial console rather than assuming a specific window. When the trial ends or you need to renew, requests made while the token is expired will silently stop working — document.modelContext becomes undefined again. Build token expiry into your deploy process.
Testing Without Real Users
You do not need Gemini in Chrome to test your WebMCP implementation. Two tools cover this:
WebMCP Inspector extension: Install the Model Context Tool Inspector extension from the Chrome Web Store (source on GitHub). It detects registered tools on any page with an active origin trial and displays them in a panel, including the resolved JSON schema for each tool, and lets you execute tools manually to verify they behave as expected.
Lighthouse audit: Chrome DevTools Lighthouse added an Agentic Browsing category in Lighthouse 13.3 (May 2026), which ships by default on Chrome 150+. It surfaces registered WebMCP tools — both declarative (HTML) and imperative (JS) — by monitoring tool-registration events, and flags forms and tool registrations that are missing required WebMCP attributes or a valid schema. Unlike Lighthouse’s other categories, Agentic Browsing reports pass/fail per audit rather than a single weighted score.
Run Lighthouse locally before shipping. A passing audit does not guarantee agents will use your tools well, but a failing audit guarantees they will have problems.
What to Build Now vs. What to Wait On
Build now if:
- You have existing search or filter forms — the Declarative API upgrade is trivially low effort and will work automatically when agent adoption grows.
- Your product has a checkout, booking, or submission flow where being callable by agents is genuinely useful to users.
- You want to be early and establish tool naming conventions before the standard finalizes.
Wait if:
- Your interaction model is highly stateful and session-dependent in ways that are hard to expose as discrete tools. Modeling a complex multi-step wizard as a sequence of
document.modelContexttools is possible but brittle until the standard adds session state primitives. - You’re building for a B2B SaaS audience. Enterprise browsers are almost never on the bleeding edge of origin trials, and your users are unlikely to have Gemini in Chrome enabled.
- Your engineering capacity is constrained. WebMCP is not a performance or SEO factor yet, and there is no penalty for waiting.
Skip entirely for now:
- Server-rendered pages with no JavaScript capability surface. The Declarative API covers forms, but if your forms exist only in server-side markup with no client-side interactivity, the origin trial token won’t get you much.
- Any build-out sized around near-term traffic. The origin trial covers Chrome Desktop, Android, and Android WebView, so this isn’t a desktop-only feature — but with no shipping agent consuming tools yet (see above), the near-term reach on any platform is effectively zero regardless of device.
The Multi-Agent Future This Is Building Toward
The current gap — announced but not yet shipped in any agent — reflects where the standard is, not necessarily where it’s going. WebMCP is co-developed by Google and Microsoft in the W3C Web Machine Learning Community Group, and Microsoft isn’t just commenting from the sidelines: Edge runs its own WebMCP origin trial, currently scheduled through mid-November 2026. If the standard progresses to the W3C Standards Track, every major browser and every browser-embedded agent would have a consistent surface to call — but that is still a proposal-stage trajectory, not a committed date.
For context on adoption pace once a protocol like this actually ships: Anthropic released the (server-side) Model Context Protocol in November 2024, and OpenAI adopted it about three months later, with Google DeepMind following roughly two months after that. WebMCP hasn’t reached the equivalent milestone yet — that clock starts when an agent actually calls a registered tool, which as of this writing hasn’t happened. The question is not whether agents will eventually call web page tools. It is which tools you will have registered when they start.
Builder Action Checklist
- Audit your existing forms for Declarative API eligibility: search, filter, booking, contact, checkout
- Add
tool-name,tool-description,tool-responseto eligible forms - Identify any JavaScript-only interactions worth exposing as Imperative API tools
- Implement
registerTool()calls behindif (document.modelContext?.registerTool)guards - Register for an origin trial token at the Chrome origin trials console
- Add the token via
<meta http-equiv="origin-trial">or HTTP header - Install the WebMCP Inspector extension and verify your tool schemas
- Run the Lighthouse Agentic Browsing audit
- Build a token expiry reminder into your deploy calendar
- Monitor the W3C WebMCP spec repo for status changes