W3C Community Group draft · origin trials in Chrome and Edge
Let a web page tell an agent what it can do.
WebMCP is a browser API. A page registers its own functions as tools, each with a name, a description and a schema. An agent in the browser calls those tools instead of guessing its way through the page's buttons and forms. The user stays on the page, logged in, watching it happen.
What it is
The problem
Agents that act on the web today either scrape the user interface, which is slow and fragile, or talk to a separate backend through the Model Context Protocol or OpenAPI, which bypasses the page and makes the developer duplicate the user's state and login on a server.
The idea
Put the tools in the page. The page's own JavaScript registers tools through document.modelContext. A built-in browser agent, an extension or a trusted iframe discovers them and calls them. Page UI, agent and user share one context.
The shape
A tool is a function with a natural-language description and a JSON Schema for its input, the same shape MCP tools use. A declarative form-based variant is being explored alongside, but the imperative API is what the specification defines today.
How it works
- 1Register. The page calls
registerTool()with a name, description, input schema and anexecutecallback. AnAbortSignalunregisters it later. - 2Discover. An agent connected to the page asks the browser for the current list of tools and their schemas.
- 3Invoke. The agent requests a call with structured arguments that match the schema.
- 4Execute. The browser mediates the call and runs the page's callback in the page's own context, with the user's session and state.
- 5Respond. The callback returns structured content to the agent, which carries on with the user.
Sites can switch the feature off with Permissions-Policy: tools=(). Tools in cross-origin iframes are only visible where exposedTo allows.
See the spec's security and privacy considerations.
const controller = new AbortController();
await document.modelContext.registerTool({
name: "add-todo",
description: "Add an item to the user's todo list",
inputSchema: {
type: "object",
properties: {
text: { type: "string", description: "The todo text" }
},
required: ["text"]
},
async execute({ text }) {
await addTodo(text); // the page's own logic
return { content: [{ type: "text", text: `Added "${text}"` }] };
}
}, { signal: controller.signal });
// later: controller.abort() removes the tool
Where it runs
From the group's implementation status page, checked 5 November 2026. Local development in Chrome needs the enable-webmcp-testing flag.
| Browser or agent | State | Where to look |
|---|---|---|
| Chrome | Origin trial, Chrome 149 | announcement · Chrome Status · docs |
| Edge | Origin trial, Edge 150 | origin trial |
| Brave | Experimental, in Leo | issue 55232 |
| ChatGPT Desktop | Supported | download |
| Meta Ray-Ban Display | Coming, off by default | web apps docs |
| Firefox | Position under discussion | standards-positions · bug |
| Safari | Position under discussion | standards-positions |
Everywhere else, the official polyfill provides document.modelContext in secure contexts.
Ecosystem
Standard and reference
The Community Group draft that defines document.modelContext.
Motivation, examples, best practices, and the issue tracker where the design is argued out.
@w3c/webmcp-polyfillOfficial polyfill from the W3C Open Source Program, no runtime dependencies.
webmcp-typesTypeScript definitions for the API.
Awesome WebMCPThe group's curated list: articles, demos, frameworks, tools, videos.
Best practicesChrome's guidance on designing tools, and a companion on security-minded tools.
Tools and demos
Chrome Labs: an evals CLI, agent skills, and twenty-odd demo sites from a pizza maker to a spreadsheet.
Model Context Tool InspectorChrome extension to see which tools a page exposes and debug their schemas.
Implementation statusThe group's live table of browser and agent support.
Related projects
Alpin Insight Solutions, Berlin: create and validate WebMCP manifests for a site, Apache-2.0.
MCP-BAn early implementation whose ideas fed the standard; the open source history lives here.
The original proposalJason McGhee's early WebMCP proposal and implementation, before the work moved to the W3C group.
GlamaDirectory of MCP servers and the home of fastmcp, mcp-proxy and mcp-remote: where page tools meet the server side.
Model Context ProtocolThe backend tool protocol whose tool shape WebMCP borrows.
Building something?Add it to the group's awesome list, or open an issue here to be listed on this page.