Google WebMCP: Direct Agent-Website Interaction
Beyond screen scraping
Google’s Web Model Context Protocol (WebMCP) turns Chrome into a surface AI agents can act on directly. The older approach was crude: an AI “browser” screenshotted the page, ran it through a vision model, and guessed where to click. That method is slow, brittle, and expensive in compute.
WebMCP replaces the guesswork with structured data. A site declares a set of capabilities, and Chrome brokers the exchange between agent and page. A developer defines what the agent is allowed to do; the frontend no longer has to survive an AI poking at it blind.
Two integration paths
Developers can make a site agent-ready in either of two ways.
Declarative (HTML)
The simplest path exposes a site’s functions through HTML attributes.
- Attributes: add
toolnameandtooldescriptionto a<form>. - Result: Chrome reads those attributes and builds a schema for the agent. A “Book Flight” form becomes a structured tool with typed inputs.
- Events: when an agent fills the form, submission fires
SubmitEvent.agentInvoked, so the backend knows the request came from a machine rather than a person.
Imperative (JavaScript)
For multi-step workflows a single form can’t express, the imperative API gives finer control.
- Method:
navigator.modelContext.registerTool(). - Definition: you supply a tool name, a description, and a JSON schema for the inputs.
- Execution: when the agent triggers an action like “Add to Cart,” it calls your registered function inside the user’s current session — no re-login, no bypassing security headers.
The navigator.modelContext surface
The core of the update is a new modelContext object in the browser API:
| Method | Purpose |
|---|---|
registerTool() |
Makes a function visible to the agent. |
unregisterTool() |
Removes a function from the agent’s reach. |
provideContext() |
Sends extra metadata (such as user preferences) to the agent. |
clearContext() |
Wipes shared data to protect privacy. |
Security model
WebMCP is permission-first: the agent cannot run a tool without the browser mediating. For sensitive actions, Chrome prompts the user — “Allow AI to book this flight?” — before the final step. The user stays in control while the agent handles the work.
Why structured beats vision
Moving from screenshots to structured schemas changes the economics of agent-website interaction:
- Lower latency — no round trip to upload and process an image.
- Higher accuracy — the agent acts on typed JSON rather than inferring intent from pixels, so far fewer misclicks.
- Lower cost — sending a text schema is much cheaper than processing high-resolution images.
Google reports meaningful gains on both compute overhead and task accuracy from the switch; the exact figures depend on the workload and remain preliminary while the protocol is in preview.
Preview status
WebMCP is being rolled out through an Early Preview Program (EPP) on Chrome 146, giving early adopters access before the protocol stabilizes. The preview is where the practical work happens: engineers can watch how different models interpret their tool descriptions and tighten vague wording — a description that’s too loose invites the model to guess — before any of it becomes a general standard.
In short
- A structured agentic web. WebMCP replaces fragile screen scraping with declared toolkits, letting agents interact reliably.
- Two paths. A simple declarative API (HTML attributes) for forms, or an imperative API (JavaScript) for complex workflows.
- Browser-mediated security. Chrome acts as a proxy, requiring user confirmation for sensitive actions and offering methods to clear shared session data.

