Agentic Web
WebMCP
WebMCP lets a website declare typed, described tools that AI agents can call directly, instead of making the agent guess by reading your DOM.
Status as of 26 July 2026. This page is dated on purpose because the specification is still moving.
Where the spec stands today
| Specification | Draft Community Group Report, published 21 July 2026. It is not a W3C standard and is not on the W3C standards track. Read the draft |
|---|---|
| Incubated by | W3C Web Machine Learning Community Group. Co-authored by engineers at Microsoft and Google. |
| Chrome | Public origin trial running from Chrome 149 through 156, with shipping targeted for Chrome 157. Origin trial details |
| Local testing |
Enable chrome://flags/#enable-webmcp-testing
|
| Firefox and Safari | No public signal from either engine. |
| Transport security | Secure context only. WebMCP is unavailable over plain HTTP. |
How WebMCP relates to MCP
The specification puts it directly: pages using WebMCP can be thought of as Model Context Protocol servers that implement tools in client-side script instead of on the backend. The vocabulary is shared, tools, schemas, parameters, but the deployment model is not.
Classic MCP
You run a server process. It speaks JSON-RPC over a transport. The agent connects to it out of band, with its own credentials and its own session.
WebMCP
No server and no transport. Tools are registered in page script and the browser mediates the call, inside the session the user already has. The agent acts as the signed-in user.
Two ways to expose a tool
1. In JavaScript
Register a tool with a name, a natural language description, and a JSON Schema for its input. The handler runs your existing application code.
const controller = new AbortController();
await document.modelContext.registerTool({
name: "add-todo",
description: "Add a new item to the user's active todo list",
inputSchema: {
type: "object",
properties: {
text: { type: "string", description: "The text content of the todo item" }
},
required: ["text"]
},
async execute({ text }) {
await addTodoItemToCollection(text);
return {
content: [
{ type: "text", text: `Added todo item: "${text}" successfully.` }
]
};
}
}, { signal: controller.signal });
Watch the namespace.
It is document.modelContext.
The older navigator.modelContext
was deprecated in Chrome 150, and a lot of tutorial content published this year still shows the old form.
If you copied a snippet earlier in 2026, check which one you have.
2. In HTML, with no JavaScript
An existing form can be annotated directly. The browser builds the JSON Schema from the form controls, so a server rendered site can expose a working tool without shipping a line of script.
<form toolname="supportRequestTool"
tooldescription="Submit a request for support."
action="/submit">
<input type="text" name="firstName">
<select name="team" required
toolparamdescription="Determines what team this request is routed to.">
...
</select>
</form>
This is worth knowing before you audit anything. A scanner that only greps for JavaScript will report zero tools on a site that is exposing them perfectly well through markup.
What tends to break
-
Registration moves behind a condition. Tools register at runtime. A refactor that puts the call behind a feature flag, a consent gate, or a lazy loaded bundle removes them without any error appearing anywhere.
-
The schema drifts from the handler. A required field is added to the form but not to the declared input schema, so agents keep sending calls that your handler now rejects.
-
The permission is withdrawn. Tool exposure is governed by the
toolspermission policy. A tightened header or an embedding change can disable registration entirely. -
The spec moves under you. The namespace already changed once. During an origin trial, more change is likely, and nothing in your build will tell you it happened.
Check what agents can actually see
Run your URL through the WebMCP checker. It scans for registration code, and when it finds any it opens a real browser to enumerate the tools and schemas an agent would receive.
Run the WebMCP check