Everyone is talking about Gemini 3.5. Everyone is talking about Neural Expressive's animated responses. Even Antigravity 2.0 got its own applause line.
But the announcement I haven't been able to stop thinking about is one that barely made headlines: WebMCP.
It was buried in the Developer Keynote between flashier demos. No dramatic reveal. No celebrity moment. Just a proposed web standard, a Chrome origin trial flag, and a paragraph in the developer blog.
I think it's the most consequential thing Google announced.
First, What Problem Are We Actually Solving?
Right now, if you want an AI agent to interact with your website, you have two bad options:
Option 1: Scraping. The agent reads your DOM like a human would — visually. It guesses what a button does by reading its label. It fills in forms by inferring field meaning from placeholder text. It clicks, waits, scrapes. It breaks constantly. Every UI change breaks it.
Option 2: Build a custom API. You write a separate backend layer specifically for agents. More code, more maintenance, more infrastructure. And every agent needs a different integration.
WebMCP is Option 3: let your existing website declare what it can do, and let any authorized agent use it directly.
What WebMCP Actually Is?
WebMCP is a proposed open web standard that allows developers to expose structured tools — like JavaScript functions and HTML forms — so browser-based AI agents can execute complex tasks with greater speed, reliability, and precision.
Think of it as MCP (Model Context Protocol), but living inside the browser, attached to the page itself.
There are two ways to use it:
1. Declarative API — annotate your existing HTML
No new code required. You annotate your existing forms and buttons with mcp-tool attributes:
<!-- Before: a regular search form -->
<form action="/search" method="GET">
<input type="text" name="q" placeholder="Search products..." />
<button type="submit">Search</button>
</form>
<!-- After: a WebMCP-enabled search tool -->
<form
mcp-tool="search_products"
mcp-description="Search the product catalog by keyword"
action="/search"
method="GET"
>
<input
type="text"
name="q"
mcp-param-description="The search keyword or phrase"
placeholder="Search products..."
/>
<button type="submit">Search</button>
</form>
That's it. An authorized agent visiting your page can now call search_products with precision instead of guessing which input to type into.
2. Imperative API — register tools with JavaScript
For dynamic actions that don't map cleanly to HTML forms:
// Register a structured tool that an in-browser agent can call
navigator.modelContext.registerTool({
name: "add_to_cart",
description: "Add a product to the user's shopping cart",
parameters: {
type: "object",
properties: {
product_id: {
type: "string",
description: "The unique product identifier"
},
quantity: {
type: "number",
description: "How many units to add",
default: 1
}
},
required: ["product_id"]
},
handler: async ({ product_id, quantity = 1 }) => {
const response = await fetch("/api/cart", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ product_id, quantity })
});
const result = await response.json();
return {
success: result.ok,
cart_total: result.cart_total,
message: `Added ${quantity}x ${product_id} to cart`
};
}
});
Now an agent can say "add 2 units of SKU-4821 to cart" and your handler runs — no DOM scraping, no brittle CSS selectors, no waiting for animations to settle.
Why This Is Different From Just Building an API?
You might be thinking: I already have a REST API. Why not just use that?
You might be thinking: I already have a REST API. Why not just use that?
Here's the difference: WebMCP tools live in the browser session. They have access to:
- he user's current authentication state
- The page's current context (what product they're viewing, what's in their cart)
- DOM state that your server doesn't know about
- Browser-side permissions and storage
A REST API call from an agent bypasses the user's session entirely. It either needs its own credentials, or you need to build a separate authenticated API surface for agents.
WebMCP agents inherit the user's existing session. The user authorizes the agent once; from that point the agent can call your tools as that user, within the browser, without any server-side agent infrastructure.
// What a WebMCP interaction looks like from the agent side
// (This is conceptual — the Gemini in Chrome agent handles this internally)
// The agent doesn't do this brittle scraping:
const addToCartButton = document.querySelector('.add-to-cart-btn');
addToCartButton.click(); // breaks on any UI change
// It does this instead:
const tools = await navigator.modelContext.getTools();
const cartTool = tools.find(t => t.name === 'add_to_cart');
await cartTool.call({ product_id: 'SKU-4821', quantity: 2 }); // stable contract
A Real-World Scenario That Shows Why This Matters
Imagine a user shopping on a travel site. They tell Gemini in Chrome:
"Find me a return flight to Mumbai for next Friday, under ₹8000, book it."
Without WebMCP, the agent:
- Reads your search form visually
- Tries to find and fill the "from" city field
- Tries to find the date picker (your custom React calendar widget that renders nothing in the DOM until clicked)
- Fails. Or scrapes the wrong field. Or submits wrong dates.
With WebMCP, your site exposes:
navigator.modelContext.registerTool({
name: "search_flights",
description: "Search available flights between two cities",
parameters: {
type: "object",
properties: {
origin: { type: "string", description: "Departure city or airport code" },
destination: { type: "string", description: "Arrival city or airport code" },
departure_date: { type: "string", description: "ISO 8601 date (YYYY-MM-DD)" },
return_date: { type: "string", description: "ISO 8601 date for return flight" },
max_price_inr: { type: "number", description: "Maximum price in Indian Rupees" }
},
required: ["origin", "destination", "departure_date"]
},
handler: async (params) => {
// your existing flight search logic
return await flightSearch(params);
}
});
The agent calls your tool with structured parameters. No DOM guessing. No fragility. Your existing business logic runs.
The Honest Limitations (Because They're Real)
I don't want to oversell this. For most developers, WebMCP is a technology to track and implement when it reaches broader browser support — not something to build production workflows around in May 2026.
The real constraints right now:
- Chrome 149+ only. No Firefox, no Safari, no Edge support yet.
- Gemini in Chrome is the only agent consumer. Your tools are currently only callable by Gemini in Chrome — not by external AI apps, not by Anthropic's Claude, not by custom agents you build.
- Still a Community Group draft. Not yet on the W3C Standards Track.
// Check for WebMCP support before registering tools
if ('modelContext' in navigator) {
// WebMCP is available — register your tools
navigator.modelContext.registerTool({ ... });
} else {
// Graceful fallback — your site works normally
console.log('WebMCP not supported in this browser');
}
Always feature-detect. Your page must work perfectly without WebMCP — the tools are progressive enhancement, not a dependency.
What I Actually Built to Test This
Since the origin trial requires Chrome 149+ with the flag enabled, I built a minimal prototype to understand the mental model — even if I couldn't test it against a real agent yet.
Here's a simple product page that exposes tools for an imaginary e-commerce site:
<!DOCTYPE html>
<html lang="en">
<head>
<title>WebMCP Demo — Product Page</title>
</head>
<body>
<h1 id="product-name">Wireless Keyboard</h1>
<p id="product-price">₹3,499</p>
<p id="stock-status">In stock: 12 units</p>
<!-- Declarative tool: works without JavaScript -->
<form
mcp-tool="check_stock"
mcp-description="Check current stock levels for a product"
method="GET"
action="/api/stock"
>
<input
type="hidden"
name="product_id"
value="kb-wireless-01"
mcp-param-description="The product ID to check"
/>
</form>
<script>
// Register imperative tools after page load
if ('modelContext' in navigator) {
// Tool 1: Add to cart
navigator.modelContext.registerTool({
name: "add_to_cart",
description: "Add the currently viewed product to the shopping cart",
parameters: {
type: "object",
properties: {
quantity: {
type: "number",
description: "Number of units to add (default: 1)",
minimum: 1,
maximum: 10
}
}
},
handler: async ({ quantity = 1 }) => {
const productId = document.querySelector('[name="product_id"]').value;
const productName = document.getElementById('product-name').textContent;
// Simulate cart API call
await new Promise(resolve => setTimeout(resolve, 300));
return {
success: true,
product_id: productId,
product_name: productName,
quantity_added: quantity,
message: `Added ${quantity}x ${productName} to your cart`
};
}
});
// Tool 2: Get product details
navigator.modelContext.registerTool({
name: "get_product_details",
description: "Get full details of the currently viewed product",
parameters: { type: "object", properties: {} },
handler: async () => {
return {
id: "kb-wireless-01",
name: document.getElementById('product-name').textContent,
price_inr: 3499,
stock: 12,
category: "Keyboards",
url: window.location.href
};
}
});
console.log('WebMCP tools registered:',
['check_stock', 'add_to_cart', 'get_product_details']
);
}
</script>
</body>
</html>
The pattern that struck me: writing WebMCP tools feels exactly like writing a function you'd expose to a colleague via an internal API. You're not thinking about the agent — you're thinking about what your page can do, and describing it clearly.
That's a surprisingly natural mental model.
The Bigger Picture: The Web Becoming Agent-Native
Here's the shift I think WebMCP represents.
For 30 years, the web had one consumer: humans, via browsers.
For the last few years, we've added a second consumer: AI agents, via scraping. (Messy, fragile, extractive.)
WebMCP proposes a third relationship: AI agents, via structured consent. The site decides what it exposes. The user authorizes what the agent can do. The agent calls a stable contract.
That's a fundamentally different relationship between websites and the software that uses them.
Unlike current agents that simply scrape visual data, WebMCP allows developers to expose structured JavaScript functions and HTML forms directly to browser-based agents — enabling an AI to perform complex backend tasks like querying travel APIs or submitting financial data with machine precision and user authorization.
The "user authorization" part matters as much as the "machine precision" part.
What Developers Should Do Right Now
- Read the spec draft. The WebMCP Community Group draft is on GitHub. Understanding the mental model now costs nothing and pays off when Chrome 149 ships broadly.
- Audit what your site "does." Make a list of the 5–10 most valuable actions a user can take on your site. Those are your future WebMCP tools. You probably already have the business logic — you just need to expose it.
- Start with the declarative API. If you have existing HTML forms, annotating them with mcp-tool and mcp-description attributes requires zero JavaScript and zero risk. It's pure progressive enhancement.
- Feature-detect religiously. if ('modelContext' in navigator) should gate every WebMCP registration. Your page must be 100% functional without it.
- Think about your tool contracts like public APIs. Good tool names, clear descriptions, and accurate parameter documentation matter. An agent's ability to use your tool correctly depends entirely on how well you describe it.
Final Thought
Every major web platform shift — AJAX, responsive design, PWAs — followed the same pattern: it looked like a niche developer experiment, then it became the default.
WebMCP is at the experiment stage. The constraints are real. The browser support is narrow. The only agent consumer is one Google product.
But the mental model is clean. The use cases are obvious. The progressive enhancement story is correct. And the alternative — a web where agents scrape everything forever — is clearly worse for everyone.
I don't know if WebMCP specifically becomes the standard. Maybe Firefox ships a competing proposal. Maybe W3C adopts a modified version. Maybe something better comes along.
What I'm fairly confident about: the web will eventually have a standard way to expose structured tools to authorized agents. Google just made the first credible attempt at defining what that looks like.
That's worth paying attention to — even if it didn't get its own keynote moment.
_
Top comments (0)