What Is WebMCP? The W3C Web Machine Learning Community Group has published a Draft Community Group Report for WebMCP, an experimental browser API that lets websites expose structured tools to AI agents through document.modelContext. The imperative API registers JavaScript tools with JSON Schema input contracts, while Chrome's origin trial also implements a declarative API for HTML forms. WebMCP is separate from the server-oriented Model Context Protocol and is not yet a formal W3C standard. What Is WebMCP? WebMCP is an experimental browser API that lets websites expose structured tools to AI agents through document.modelContext. Learn how it works, its security boundaries, browser support, and how it differs from MCP. Why this matters WebMCP is a Draft Community Group Report from the W3C Web Machine Learning Community Group, not a formal W3C standard. Its imperative API lets pages register JavaScript tools through document.modelContext.registerTool . Chrome's origin trial also implements a declarative API that turns annotated HTML forms into tools, although that part of the normative draft remains incomplete. WebMCP runs in a live browser context and is separate from the server-oriented Model Context Protocol. WebMCP is an experimental browser API that lets a website expose structured tools to AI agents through document.modelContext . Instead of reverse-engineering a page from pixels, DOM structure, and click targets, an agent can discover named actions with typed inputs and invoke them through the browser. The current specification is a Draft Community Group Report dated July 21, 2026. That status matters: WebMCP is a serious proposal with a Chrome origin trial, but it is not a finished W3C standard or a stable cross-browser feature. The Problem WebMCP Tries to Solve A human can look at a search form, infer what it does, enter a query, and interpret the results. An AI agent has to reconstruct the same interaction from markup, accessibility data, screenshots, or browser automation. That reconstruction is brittle. A changed label, hidden control, or asynchronous state transition can break the flow. WebMCP gives the page a second interface for the same capability: - The human gets the normal visual interface. - The agent gets a named tool, a description, a JSON Schema input contract, and a structured result. - The website keeps its existing validation, authentication, and business logic. This is progressive enhancement for agent interaction. The visual page remains the product; WebMCP adds a browser-mediated action surface. How the Imperative API Works The imperative API registers a JavaScript tool on document.modelContext : js if document.modelContext { const controller = new AbortController ; await document.modelContext.registerTool { name: 'search posts', title: 'Search posts', description: 'Search published posts by keyword and return up to five matches.', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'The topic or phrase to search for.' } }, required: 'query' }, annotations: { readOnlyHint: true, untrustedContentHint: false }, async execute { query } { return JSON.stringify searchLocalIndex query .slice 0, 5 ; } }, { signal: controller.signal } ; // Abort when the tool should no longer be available. // controller.abort ; } The page controls the implementation. The browser controls discovery and invocation. The current draft defines getTools and a toolchange event for in-page discovery. Chrome’s origin-trial documentation also exposes executeTool so an in-page agent can invoke a discovered tool. Registration is dynamic. Passing an AbortSignal lets the page remove a tool when its route, state, or component changes. That is safer than leaving an action registered after the corresponding interface has disappeared. Cross-origin access is closed by default. A page must explicitly expose a tool to secure origins with the exposedTo registration option, and a caller must request tools from those origins. Cross-origin iframes also require the tools Permissions Policy. The Declarative API Turns Forms Into Tools Chrome’s origin-trial documentation also defines a declarative path for HTML forms: