
What Is WebMCP?
WebMCP is a browser-native W3C Draft Community Group Report that lets websites expose JavaScript functions as tools AI agents can call directly, via document.modelContext and registerTool(). How it works, and how it differs from Anthropic's MCP.
Why this matters
WebMCP is a Draft Community Group Report from the W3C Web Machine Learning Community Group, not yet a formal W3C standard. It gives websites a document.modelContext API with a registerTool() method so a page can register JavaScript functions as tools an AI agent can call. It borrows vocabulary from Anthropic's Model Context Protocol but runs entirely client-side in the user's authenticated session, unlike MCP's server-side protocol. Chrome has run it as an origin trial, and the API surface itself has already moved once, from an early navigator.modelContext to the document.modelContext the current spec defines.
WebMCP is a browser-native web standard (Draft Community Group Report, W3C Web Machine Learning Community Group, published July 2026) that lets websites expose JavaScript functions as callable “tools,” via the document.modelContext API and its registerTool() method, so AI agents can act on a page directly instead of parsing the DOM or taking screenshots. It adapts concepts from Anthropic’s Model Context Protocol (MCP) for the browser but is not identical to MCP: WebMCP tools run client-side, in the user’s authenticated session, and browsers are free to expose them via MCP or other function-calling formats.
That is the whole idea in two sentences. The rest of this post covers the mechanics, where it diverges from MCP, who is building it, and why it matters if you run a website an AI agent might one day need to act on rather than just read.
How WebMCP Works
The spec adds one new entry point: document.modelContext, a read-only attribute on the Document interface. A page calls its registerTool() method to hand the browser a description of something it can do:
document.modelContext.registerTool({
name: 'search-posts',
description: 'Search this blog's posts by keyword',
inputSchema: {
type: 'object',
properties: {
query: { type: 'string' }
},
required: ['query']
},
async execute({ query }) {
return searchLocalIndex(query);
}
}); A few things matter about that shape. The tool’s execute function runs in the page’s own JavaScript context, with access to whatever state, cookies, and session the page already has, so a tool can act on data the agent could never legitimately scrape from the rendered HTML. inputSchema is a JSON Schema, the same format MCP tool definitions use, which is a deliberate compatibility choice: an agent that already knows how to call an MCP tool does not need a second mental model for a WebMCP tool.
Two optional annotations shape how an agent treats the tool without inspecting its code. readOnlyHint: true tells the caller the tool only reads data and never changes state, which is the signal an agent can use to invoke it without asking the user to confirm first. untrustedContentHint: true marks a tool whose output should be treated as untrusted, arbitrary text pulled off the page rather than something the site vouches for, which matters once an agent starts feeding tool output back into its own reasoning.
One gap worth naming: the spec also describes a declarative path, annotating a plain HTML <form> so the browser can synthesize a tool from it without any JavaScript. As of the current draft, that section is explicitly marked incomplete. Section 4.3 of the spec reads, in full: “This section is entirely a TODO. For now, refer to the explainer draft.” The only implemented path today is the imperative registerTool() call shown above.
The API’s own name has already changed once. Early implementations and the browser’s origin trial exposed this surface as navigator.modelContext, and several community explainers, including the informative AIKR technical notes, still document it that way. The current Draft Community Group Report moved the attribute onto Document instead, so document.modelContext is what the spec defines today. If you find code or a tutorial using navigator.modelContext, it is either targeting an earlier draft or an implementation that has not caught up yet. Our own WebMCP + SvelteKit implementation guide was written against the polyfill’s navigator.modelContext surface; treat the spec, not that post, as the source of truth for the current attribute name.
WebMCP vs. MCP (Anthropic)
WebMCP borrows MCP’s vocabulary, tool names, descriptions, JSON Schema inputs, on purpose: an agent that already knows how to call an MCP tool needs almost no new logic to call a WebMCP one. But the two solve different problems at different layers.
| WebMCP | MCP (Anthropic) | |
|---|---|---|
| What it is | A browser web API (document.modelContext) | A server-side protocol (JSON-RPC over stdio or HTTP) |
| Where it runs | Client-side, inside the page, in the user’s open tab | A separate server process the agent connects to |
| Who exposes tools | Any website, by calling registerTool() in its own JavaScript | Whoever stands up and hosts an MCP server |
| Auth model | Inherits the browser’s existing session and cookies | The server implements its own auth (OAuth, API keys, etc.) |
| Discovery | The agent finds tools by loading the page | The agent finds tools by connecting to a known server endpoint |
| Relationship | Adapts MCP’s tool-calling shape for the browser | The protocol WebMCP borrows vocabulary from |
The practical difference: MCP needs a server you build, deploy, and authenticate against. WebMCP needs nothing but JavaScript already running in a page a user has open. That makes WebMCP a fit for the huge number of interactive web apps that will never justify standing up an MCP server, and a poor fit for anything that needs to run without a browser tab open, since the spec has no headless mode.
Who’s Building It
WebMCP is developed under the W3C Web Machine Learning Community Group. The current Draft Community Group Report lists three editors: Brandon Walderman (Microsoft), Khushal Sagar (Google), and Dominic Farolino (Google). “Draft Community Group Report” is a specific, informal status inside the W3C process, work a Community Group has agreed to publish, not a document that has entered the formal W3C Recommendation track or received the patent and cross-vendor review that track requires.
Chrome has been the primary implementation vehicle, running WebMCP as an origin trial so developers can test against it ahead of any stable release. That combination, a two-browser-vendor editor list plus one browser actually shipping trial code, is normal for a proposal at this stage, and it is also why the API surface itself is still moving: the navigator.modelContext to document.modelContext change happened while the origin trial was live.
Why It Matters for AI Agents
Everything discussed so far solves one specific problem: an agent visiting a page today has to either parse the DOM (brittle, breaks on any redesign) or take a screenshot and reason over pixels (slow, imprecise, and blind to anything off-screen). Both approaches guess at what a page lets you do. WebMCP tools state it directly.
That distinction matters most for the categories of site where guessing is expensive. In Agent Commerce Readiness, the argument for the Agentic Commerce Protocol is that agents fall back to scraping, redirecting the user, or skipping a merchant entirely when a checkout flow isn’t machine-readable; WebMCP is the same argument one layer down, for any interactive action, not just payment. In why AI isn’t citing your website, the underlying pattern is that AI systems reward structured, extractable content over content that requires interpretation, the same logic that makes answer engine optimization work for text now applies to interactivity: a page that declares its tools is easier for an agent to act on correctly than a page an agent has to reverse-engineer.
None of that requires waiting for WebMCP to reach a final W3C Recommendation. The imperative registerTool() path is implemented today behind an origin trial, and a page can register tools now, the same way our SvelteKit implementation does, well ahead of the spec settling. The sites that get this working while the API is still a Draft Community Group Report will be the ones agents can already act on correctly once broader browser support lands.
· Frequently asked
FAQ
Is WebMCP a W3C standard yet?
No. As of this writing it is a Draft Community Group Report published by the W3C Web Machine Learning Community Group, not a document on the formal W3C Recommendation track. Community Group Reports are informal output that a CG agrees to publish; they carry none of the patent commitments or cross-browser review that the Recommendation track requires, and a Draft CG Report can still change substantially, merge into a different proposal, or stall before it ever reaches Recommendation status.
Does WebMCP require MCP?
No. A WebMCP tool runs entirely in the browser tab, inside the page that registered it, using the user's existing session. Nothing about the API requires a server-side MCP endpoint on the other end. A browser is free to translate a page's registered WebMCP tools into an MCP-compatible format so an MCP-speaking agent can call them, or to expose them through some other function-calling interface entirely. That translation is an implementation choice a browser vendor makes, not a requirement in the WebMCP spec itself.
Which browsers support WebMCP?
None ship it as a finished, cross-browser standard yet. Chrome has run it as an origin trial, and the API surface changed mid-flight: early implementations and several community explainers use navigator.modelContext, while the current Draft Community Group Report defines the API on document.modelContext instead. Code written against the earlier name will not match what the spec says today. Community polyfills exist for pages that want document.modelContext behavior ahead of native support; see the [WebMCP + SvelteKit implementation guide](/blog/webmcp-sveltekit-implementation) for a working example.
How is a WebMCP tool different from a regular JavaScript function?
A registered tool carries structured metadata a plain function does not: a name, a natural-language description, a JSON Schema for its inputs, and optional annotations such as readOnlyHint and untrustedContentHint that tell a calling agent whether the tool is safe to invoke without confirmation and whether to trust the data it returns. That metadata is what makes the function discoverable and self-describing to an agent that has never seen the page's source.
· Sources & further reading
Sources & Further Reading
Sources
- WebMCP (Draft Community Group Report, W3C Web Machine Learning Community Group) webmachinelearning.github.io
- WebMCP Technical Notes (informative, AIKR Community Group) w3c-cg.github.io
- WebMCP | AI on Chrome | Chrome for Developers developer.chrome.com
- WebMCP: How Websites Will Expose Tools to AI Agents zuplo.com
- What Is WebMCP? How It Works and How It Differs From MCP webfuse.com
- Model Context Protocol specification modelcontextprotocol.io
Further reading
- I Built a Private MCP Server to Give Claude Memory Across Sessions. Here Is What Broke. /blog/mcp-server-persistent-memory-claude I shipped a private MCP server bridging my knowledge base into claude.ai via OAuth 2.1: the architecture, two bugs the smoke test missed, and the isolation pattern.
- I Added WebMCP to SvelteKit: 90 Min, 3 Files. /blog/webmcp-sveltekit-implementation Build WebMCP into SvelteKit apps using navigator.modelContext. Learn polyfill setup, tool schemas, and verification in 2026.
- The 95% Model Sometimes Lies About Finishing. Anthropic's System Card Documents Both. /blog/fable-5-system-card-capability-and-fabrication Fable 5 hits 95.0% SWE-bench Verified. The same System Card documents fabricated status reports and unverbalized early-stops. Both halves matter.
- What a Solo Builder's Claude Code Operating System Actually Looks Like /blog/claude-code-operating-system-case-study A look inside claude-customizations, a production Claude Code harness built over months of solo development. The repository contains 46 named skills, 39 hook scripts, and 18 agents -- each a discrete capability the system can invoke autonomously or on request.
- 10 Patterns Behind a 32% Claude Code Plan-Quota Burn /blog/claude-code-quota-burn-10-patterns 10 specific patterns that explain why my Claude Code plan-quota burn runs at a fraction of what r/claudecode operators report on similar workloads. Each pattern lists the multiplier and the named alternative you can run today.
What do you think?
I post about this stuff on LinkedIn every day and the conversations there are great. If this post sparked a thought, I'd love to hear it.
Discuss on LinkedIn