Your AI agent is blind. It stares at a webpage the way a human stares at assembly code — it can technically parse what’s there, but it has no idea what anything means.

That’s been the fundamental problem with browser automation for two decades. Scrapers break when a button moves. AI agents hallucinate clicks on elements that don’t exist. You spend more time maintaining selectors than building features. And every site redesign sends your automation back to square one.

In February 2026, Chrome 146 added a flag-gated preview of something that attacks this directly: WebMCP — a draft web standard that lets websites tell AI agents exactly what they can do, in structured, machine-readable terms. No more guessing. No more pixel-hunting. No more praying that div.btn-primary-v3 still exists after the next deploy.

This isn’t theoretical — but it’s also not shipped. WebMCP is a W3C Community Group draft, available today behind a chrome://flags switch in Chrome 146 and Edge 147; the public origin trial opens in Chrome 149. Google and Microsoft are co-editing it. And the research prototype it grew out of is fast: in a benchmark of 1,890 real API calls, it cut per-call processing by 67.6% and cost by 34-63%, while landing task success at 97.9% — within a hair of the 98.8% traditional automation scored. The headline isn’t “more reliable.” It’s “roughly as reliable, far cheaper.”

The Problem WebMCP Solves

Right now, AI agents interact with websites in two ways, and both are terrible.

Option 1: Screen automation. The agent takes a screenshot, feeds it to a vision model, and tries to figure out where to click. This is what tools like Playwright MCP and browser-use do. It works — sometimes. But it’s slow (you’re sending screenshots back and forth), expensive (vision model tokens aren’t cheap), and fragile (change the button color and the agent gets confused).

Option 2: DOM scraping. The agent reads the HTML, tries to find the right elements by CSS selector or XPath, and manipulates them programmatically. Faster than screenshots, but equally brittle. Every site redesign breaks your selectors. Dynamic content loaded via JavaScript complicates everything. And you’re still reverse-engineering intent from markup that was designed for human eyeballs, not machine consumption.

Both approaches share the same core flaw: the agent is guessing what the website can do by looking at its UI. That’s like trying to use an API by staring at its marketing page instead of reading its docs.

WebMCP flips this. Instead of the agent inferring what’s possible from visual cues, the website declares its capabilities as structured tools. The agent asks “what can I do here?” and gets back a clean list: search flights, add to cart, filter by price, submit review. Each tool comes with a schema defining exactly what inputs it needs and what outputs to expect.

It’s the difference between handing someone a remote with unlabeled buttons and handing them a menu.

How WebMCP Works: Two APIs

WebMCP gives developers two ways to expose tools, depending on complexity.

The Declarative API (HTML Forms)

One caveat before the code: this declarative half is the less settled of the two. The WebMCP draft’s section on declarative tools currently reads, almost verbatim, “This section is entirely a TODO.” The imperative JavaScript API below is the more concrete half — treat the attribute names here as the explainer’s current sketch, not a frozen spec.

The idea: if your interaction maps to a form — search, login, checkout, filters — you make it agent-readable by adding three attributes to your existing <form> element:

<form
  toolname="searchFlights"
  tooldescription="Search for available flights between two airports on a specific date"
  toolautosubmit="true"
  action="/api/flights/search"
  method="GET"
>
  <label>Origin airport (3-letter IATA code)</label>
  <input name="origin" type="text" required pattern="[A-Z]{3}" />

  <label>Destination airport</label>
  <input name="destination" type="text" required pattern="[A-Z]{3}" />

  <label>Departure date</label>
  <input name="date" type="date" required />

  <label>Number of passengers</label>
  <input name="passengers" type="number" min="1" max="9" value="1" />

  <button type="submit">Search Flights</button>
</form>

That’s it. Three new attributes on a tag you already have:

  • toolname — a unique identifier the agent uses to call this tool
  • tooldescription — natural language explaining what the tool does (agents use this to decide when to call it)
  • toolautosubmit — when present, the agent can submit the form without waiting for the user to click Submit

The browser reads these attributes and automatically generates a JSON Schema from the form’s input fields. The agent sees a structured tool with typed parameters, validation rules (that pattern="[A-Z]{3}" becomes a schema constraint), and a description it can reason about.

Every <input> with a name attribute becomes a property in the schema. Inputs without a name are silently excluded — a subtle gotcha that’ll cost you an hour of debugging if you don’t know about it.

The Imperative API (JavaScript)

For anything more complex than a form — dynamic multi-step workflows, real-time calculations, interactions that depend on application state — you register tools via JavaScript:

navigator.modelContext.registerTool({
  name: "addToCart",
  description: "Add a product to the shopping cart by its SKU",
  inputSchema: {
    type: "object",
    properties: {
      sku: {
        type: "string",
        description: "The product SKU"
      },
      quantity: {
        type: "integer",
        minimum: 1,
        maximum: 99
      }
    },
    required: ["sku"]
  },
  execute: async ({ sku, quantity = 1 }) => {
    const result = await cartService.addItem(sku, quantity);
    return {
      content: [{
        type: "text",
        text: `Added ${quantity}x ${result.productName} to cart. Total: ${result.cartTotal}`
      }]
    };
  }
});

The navigator.modelContext API lives on the global navigator object — same place you find navigator.geolocation or navigator.clipboard. If the browser doesn’t support WebMCP, navigator.modelContext is simply undefined, so you can feature-detect with a one-liner:

if ('modelContext' in navigator) {
  // Register your tools
}

registerTool() adds one tool to whatever is already registered. If you’d rather register a whole batch at once — and replace the existing toolset in the process — call provideContext() with an array of tool descriptors. That’s the cleaner choice when your app state changes and you want the agent’s view of the page to change with it. unregisterTool() removes a single tool by name. Three methods, and that’s the entire surface.

The imperative API is more powerful than declarative: you can register tools dynamically based on user state, handle complex async operations, return rich structured data, and swap the toolset as your app state changes — and unlike the declarative form attributes, this half of the API is concretely specified.

WebMCP vs. MCP: They Share a Name, Not a Protocol

This trips people up, so let’s be clear: WebMCP is not the same thing as Anthropic’s Model Context Protocol (MCP), despite the shared acronym.

Regular MCP is a back-end protocol. It uses JSON-RPC to connect AI platforms (Claude, GPT, etc.) to server-side tools — databases, APIs, file systems. Your MCP server runs on a server somewhere, and AI clients connect to it over HTTP or stdio.

WebMCP operates entirely client-side, inside the browser. There’s no server component. The website registers tools directly with the browser’s navigator.modelContext API, and in-browser AI agents (like Gemini in Chrome, or Copilot in Edge) discover and call those tools locally.

Think of it this way:

MCP WebMCP
Where it runs Server-side Client-side (browser)
Protocol JSON-RPC Browser API (navigator.modelContext)
Who connects AI platforms via HTTP In-browser AI agents
Tool registration Server code HTML attributes or JavaScript
Use case Back-end integrations Front-end website interactions

They’re complementary, not competing. A flight booking site might use WebMCP so browser agents can search flights on the front end, while also running an MCP server so Claude or GPT can book flights via API on the back end. (If you’re building the server-side half, my MCP deployment playbook covers the production architecture.)

WebMCP didn’t arrive from one team, either. It converged from three independent efforts: Microsoft’s “Web Model Context” explainer, Chrome’s “Script Tools” proposal, and Alex Nahas’s MCP-B — the browser-extension project whose @mcp-b/global polyfill this article recommends later. Those three merged into a single proposal that now incubates in the W3C Web Machine Learning Community Group, which is why “WebMCP” and “MCP-B” keep showing up as near-synonyms.

What This Means for Web Scrapers

If you build or maintain scrapers, WebMCP changes your calculus in three ways.

1. Cooperating sites get way easier to work with.

For sites that adopt WebMCP, you no longer need to reverse-engineer their DOM. Instead of writing brittle CSS selectors, you call structured tools with typed parameters. The site tells you what data it exposes and how to get it. If they change their UI, your integration still works — the tool interface is decoupled from the visual layout.

This is huge for scraping APIs behind JavaScript-heavy SPAs. Today, you need headless browsers, wait for renders, intercept network requests. With WebMCP, the SPA registers tools that return data directly. Cleaner, faster, cheaper.

2. Non-cooperating sites stay exactly the same.

WebMCP is opt-in. Sites that don’t add tool attributes or call registerTool() are invisible to WebMCP. Your existing scrapers for those sites keep working exactly as they do today.

The realistic near-term scenario: major platforms (Google, Amazon, airlines, banks) adopt WebMCP because they want AI agents to interact with their services in controlled ways. Smaller sites, competitors’ sites, and sites that actively resist scraping won’t implement it.

3. The long game favors structured access.

If WebMCP takes off — and with Google and Microsoft both co-editing it, that’s a reasonable bet — more sites will expose tools rather than relying solely on rendered HTML. Over time, this makes scraping-as-reverse-engineering less necessary for commercial data access, while making it more necessary for the sites that deliberately opt out.

For scraping tools — including the ones I build at Godberry — this means a split strategy: use WebMCP where available for cheaper, more stable access, keep traditional scraping for everything else. If you’re just getting started with scraping, my beginner’s guide to web scraping covers the fundamentals you’ll need either way.

What This Means for AI Agent Builders

If you’re building AI agents that interact with websites, be precise about what WebMCP buys you — because the easy mistake is to oversell it.

The arXiv prototype that the standard grew from (webMCP: Efficient AI-Native Client-Side Interaction, 2508.09171) is honest about this. Across 1,890 real API calls, structured tool access scored 97.9% task success against 98.8% for traditional automation. That’s not a leap in reliability — it’s roughly on par, a fraction behind. WebMCP’s real win is somewhere else entirely.

It’s cheaper. That same benchmark cut processing requirements by 67.6% and per-call cost by 34-63% ($0.0051 vs $0.0110 in the paper’s shopping/auth/content tasks). A tool schema is a few hundred bytes of JSON. A screenshot is a base64-encoded image that eats thousands of tokens. Multiply by the steps in a workflow and the users running it, and that’s the difference between a product with margin and one that bleeds money on inference. (Worth being clear: those figures come from a research prototype, not from the W3C draft or the Chrome build — there’s no published benchmark of Chrome’s implementation yet.)

It’s leaner. No round-tripping images to a vision model, no waiting for renders, no retrying clicks that landed on the wrong pixel. The agent gets a structured list of what the page can do and calls it directly.

And here’s the one that matters most if you’ve ever maintained a browser automation pipeline: site redesigns don’t break anything. As long as the site keeps the same tool name and schema, the visual layout can change completely without your agent noticing — no selector to re-derive, no screenshot to re-label.

The obvious catch — your agent can only use WebMCP on sites that implement it, and today that’s a short list behind a flag. For now, that means a dual strategy: structured tool calls where WebMCP exists, fallback to traditional automation everywhere else. That’s the split I’m already planning for my own tools at Godberry. If you want to see what building agents can look like as a business, AI agent development is one of the highest-growth revenue opportunities right now.

How to Implement WebMCP Today

You can try this right now. Not “in theory” or “coming soon” — right now, in your browser.

Step 1: Enable the Flag

Open Chrome 146 or newer, go to chrome://flags, search for “WebMCP”, set the WebMCP testing flag to Enabled, and relaunch. Edge 147+ works too — it added the same flag-gated preview in March 2026, so you’ll flip an equivalent switch there, not get it for free.

This is still a DevTrial: you have to enable the flag yourself, and so does anyone testing your site. The public origin trial — where a site can switch WebMCP on for real users without them touching chrome://flags — opens in Chrome 149.

Step 2: Add Declarative Tools to Your Forms

Start with any existing HTML form. Add toolname and tooldescription:

<form
  toolname="searchProducts"
  tooldescription="Search the product catalog by keyword, category, and price range"
>
  <input name="query" type="text" placeholder="Search..." />
  <select name="category">
    <option value="">All categories</option>
    <option value="electronics">Electronics</option>
    <option value="books">Books</option>
  </select>
  <input name="maxPrice" type="number" min="0" step="0.01" />
  <button type="submit">Search</button>
</form>

Step 3: Register Dynamic Tools with JavaScript

For interactions that go beyond forms:

if ('modelContext' in navigator) {
  navigator.modelContext.registerTool({
    name: "getProductDetails",
    description: "Get full details for a specific product including price, availability, and reviews",
    inputSchema: {
      type: "object",
      properties: {
        productId: {
          type: "string",
          description: "The product's unique identifier"
        }
      },
      required: ["productId"]
    },
    execute: async ({ productId }) => {
      const product = await fetch(`/api/products/${productId}`).then(r => r.json());
      return {
        content: [{
          type: "text",
          text: JSON.stringify(product)
        }]
      };
    }
  });
}

Step 4: Verify Your Tools Register

There’s no listTools() method to dump the registry — the API surface is just provideContext(), registerTool(), and unregisterTool(). So verify two other ways.

First, feature-detect in the DevTools console to confirm the flag is actually on:

console.log('modelContext' in navigator);
// true means WebMCP is enabled in this browser

Then confirm the tools themselves: open the browser’s agent panel (the in-browser AI surface in Chrome 146+ / Edge 147+) and check that each registered tool appears with its name, description, and schema. If a form tool isn’t showing up, check that both the tool name and description attributes are present and that every input you expect has a name attribute — inputs without one are silently dropped from the schema.

Step 5: Use the Polyfill for Cross-Browser Support

For production use before native support rolls out broadly:

npm install @mcp-b/global
import '@mcp-b/global';

// Now navigator.modelContext works across browsers
navigator.modelContext.registerTool({
  // ... your tool definition
});

The polyfill at docs.mcp-b.ai provides the navigator.modelContext API in browsers that don’t natively support it yet.

The Adoption Question

The developer reaction to WebMCP has been mixed, and honestly, that’s fair.

On Hacker News, some developers see it as inevitable — “we adapted to mobile from desktop, it’s time to build websites for AI agents.” Others are more skeptical, questioning whether sites will voluntarily expose tools that make it easier for agents to interact without showing ads or driving engagement metrics the way human eyeballs do.

That skepticism points to the real tension: WebMCP works best when site owners want agent interaction. E-commerce sites might love it (agents that can search and buy = revenue). Ad-supported content sites might resist it (agents that extract information without loading ads = lost revenue). My bet is the same adoption split as structured data markup (schema.org) — broadly adopted by sites with commercial incentives, ignored by sites where AI interaction threatens the business model.

My take: the skeptics are making the same mistake people made about schema.org markup in 2012. “Why would I add extra metadata just to help Google?” Because the sites that did got rich snippets, better CTR, and a compounding SEO advantage that lasted a decade. WebMCP will play out the same way. Sites that expose tools to agents will get more agent-driven traffic and transactions. Sites that don’t will wonder why their competitors keep showing up in AI-powered shopping results.

For developers, the pragmatic move is to start adding WebMCP to your own sites now while it’s low-effort. If you control forms on a site, adding toolname and tooldescription takes five minutes and costs nothing. When browser agents start calling those tools — whether that’s in six months or two years — you’re already ahead.

WebMCP isn’t going to replace scraping overnight. It’s a Community Group draft behind a browser flag — most of the web won’t implement it for years, if ever. But for the sites that do adopt it, you stop fighting CSS selectors that break every Tuesday, and the per-call cost of automation drops by half or more. That’s the part I’d bet on: not “more reliable”, but “same reliability, far cheaper”.

If you build AI agents or browser automation, enable the Chrome flag and try it this week — and watch for the Chrome 149 origin trial, which is when it starts reaching users who haven’t touched chrome://flags. If you run a website, add the tool attributes to a form you already have — it takes five minutes and costs nothing. The sites that do it now will be the ones AI agents actually know how to use once browser-native AI moves past the flag.