You know how an agent talks to a server (MCP) and how it drives a browser from outside (CDP). WebMCP is the missing edge: a web page handing its own tools to an agent — from the inside.
You've built two of the three ways an AI agent reaches into the world. MCP connects an agent to an external server over JSON-RPC. CDP lets an agent drive a browser from the outside, imperatively, over a debug socket. WebMCP is the third edge: the web page itself volunteers a set of tools, and an agent running in the browser calls them directly.chrome
WebMCP lets a page register tools on document.modelContext, and the browser
hands those tools to an agent — so the agent calls a function instead of scraping the DOM
or faking clicks.spec
All three protocols share one idea you already own: a tool = a
name + description + inputSchema + a handler. What differs is
where the tool lives and who the host is.
In MCP the tools sit on a separate server you connect to. In WebMCP the tools sit on the page in front of you, and the browser is the host that mediates — there is no separate client process, no transport socket, no JSON-RPC. It's a JavaScript API call, in-process, same-origin.
This track teaches WebMCP from both ends. Keep this loop in your head — the rest is detail.
Today an agent that wants to "add this to the cart" or "filter to size medium" has to
guess: read the DOM, find the right button, synthesize a click (that's the CDP world).
It's brittle and it breaks when the page changes. WebMCP lets the site say, explicitly:
here is add_to_cart(sku, qty), here is what it takes, call it. The page
declares its capabilities instead of the agent reverse-engineering them.explainer
WebMCP is a W3C Community Group draft (authored by Microsoft + Google) in a
Chrome origin trial as of Chrome 149. The API is mid-rename
(navigator.modelContext → document.modelContext) and small details still
shift. Learn the shape; verify specifics against the primary sources.spec
The WebMCP guide on Chrome for Developers for the big picture and tooling, and the W3C WebMCP spec for the exact API. Skim both; we'll drive the API by hand in Lessons 2–3.