Skip to the content
Start free

WebMCP

WebMCP is a proposed web standard that lets a web page offer its own functions to AI agents as named “tools”, so an agent can call them directly instead of guessing which buttons to click. It is written in JavaScript inside the page. It borrows ideas and words from the Model Context Protocol, but it runs in the browser, not on a separate server.

What is WebMCP? #

Today an AI agent that uses a website mostly works like a very fast stranger. It reads the DOM, looks for a search box, clicks, waits and reads again. That breaks when the layout changes. The WebMCP explainer calls this approach brittle. It describes pages that act as in-page MCP servers, with tools defined in the page’s own client-side script.

The WebMCP draft is published by the W3C Web Machine Learning Community Group. Its editors work at Microsoft and Google. On 24 November 2026 it was a Draft Community Group Report, and the document itself says it is not a W3C Standard and is not on the W3C Standards Track. So treat it as an early proposal that may still change.

How is it different from MCP? #

The Model Context Protocol is, in the words of its official introduction, an open-source standard for connecting AI applications to external systems. A normal MCP server runs on a computer or in the cloud, and the AI app connects to it. WebMCP keeps the tool idea but puts the tools inside a live web page.

Point MCP server WebMCP
Where tools run On a server you host In the open browser tab
Who signs the user in The server, with its own set-up The page, using the session the person already has
Who calls the tools Any MCP client Agents built into the browser, extensions, or agents the page allows
Status Published protocol Draft proposal

The explainer says WebMCP is meant to complement back-end MCP, not replace it. You can read more on our MCP page.

How does it work? #

The page registers each tool with document.modelContext.registerTool(). A tool has a name, a plain description, an inputSchema and an execute function. The draft defines inputSchema as a JSON Schema object describing the expected input parameters. When an agent calls the tool, the page runs its own code, using the same logic its buttons use, and returns a result.

document.modelContext.registerTool({
  name: "find_products",
  description: "Search the shop by keyword and size",
  inputSchema: { type: "object", properties: { q: { type: "string" } } },
  execute: async ({ q }) => searchShop(q)
});

Other parts of the draft include getTools(), executeTool() and a toolchange event. Access is controlled by a permissions policy feature called “tools”, which by default allows only the page’s own origin. Cross-origin frames need an explicit opt-in on both sides.

Chrome’s early preview post of 10 February 2026 describes 2 styles. A declarative style covers standard actions defined directly in HTML forms. An imperative style uses JavaScript for more dynamic tasks. The explainer adds that the current draft covers only the imperative API, and the form-based version is being explored separately. Access to try it came through Chrome’s early preview programme.

Why does it matter for search and AI answers? #

WebMCP is not a ranking signal. Google’s AI features guidance asks nothing beyond normal SEO for its AI answers, so a page can be found and quoted without WebMCP. Its value is in what happens after a person asks an assistant to do something on your site. The Chrome post lists the sort of jobs it has in mind: filling in support tickets, finding products and moving through checkout, and searching and filtering flights. Those are the tasks of agentic commerce and the wider agentic web.

A shop that offers a clear “find product” tool gives an agent one reliable path instead of 20 fragile clicks. That lowers the chance of the agent picking the wrong size, or of an AI hallucination about stock. It sits beside other agent formats such as llms.txt for reading, and ACP, UCP and AP2 for buying and paying.

What are the risks? #

The draft lists them openly. Its security section names prompt injection, including poisoned tool descriptions and injected tool output. It also warns about tools that ask for more personal data than they need. A consequentialHint marks actions that are significant or cannot be undone, such as a payment. But the draft also says agents cannot rely solely on site-asserted descriptions for security, because a bad site can leave hints out or lie. Agents may ask the person to confirm high-stakes steps. That choice is left to the agent, not required. See AI guardrails.

Common mistakes #

  • Treating it as finished. It is a draft, so names and methods can still change. Build behind a feature check.
  • Tools that skip the screen. The explainer says the visible page stays primary and tool results must keep it in sync.
  • Vague descriptions. The agent picks tools from their words. “Search” is weak; “search products by keyword, colour and size” is better.
  • Unmarked risky tools. Anything that spends money or deletes data should carry the consequential hint and ask for a clear yes on screen.
  • Forgetting the readers. Agents still read the page. Clean HTML and honest schema markup still matter.

A worked example #

A small online shop sells walking boots. A customer tells a browser assistant: “find me size 9 waterproof boots under 120 pounds and put them in my basket.” Without WebMCP the agent types into the search box, opens filters and tries to read prices from the layout. With WebMCP the page offers 2 tools: find_products and add_to_basket. The agent calls the first with the size, the feature and the price limit, gets back 3 matches as data, and calls the second. The basket on screen updates, the customer checks it, and the customer presses Pay. The shop has written 2 small functions that reuse its existing code.

How do I check if my site is ready? #

  1. Run the live AI readiness checker for the basics agents need today.
  2. Check your llms.txt file, the reading side of the agent picture.
  3. Our agent readiness checker will look for agent formats, WebMCP included.
  4. Test tool descriptions against attack text with our prompt injection checker.
  5. Track which agents call your tools with MCP and agent call analytics (Pro). We log new standards on our agent standards watch and MCP ecosystem watch.

Questions #

Does WebMCP replace my MCP server? #

No. The explainer says it complements back-end MCP. A server suits work with no browser open; WebMCP suits a person using the page.

Do I need it now? #

Not yet for most small sites. Watch the draft, keep your forms clean, and use tool use patterns that are easy to wrap later.

Can any website call my tools? #

Not by default. The “tools” permissions policy limits access to your own origin unless you allow others.

Is it a Google-only idea? #

No. The draft’s editors come from Microsoft and Google, inside a W3C community group.

Sources #

Updated 24 November 2026 by URSY.

Cite this page: WebMCP. URSY. Updated 24 November 2026. https://ursy.com/wiki/webmcp/ · Section links

Tools for this

All 871 wiki entries, A to Z →