What is WebMCP? Tools on your web page, no server required
WebMCP is a W3C draft that lets a web page register tools an AI agent can call while browsing it, using document.modelContext.registerTool(). No separate MCP server is needed: the tools live on the page. It turns an agent from something that reads your site into something that can act on it.
Why it matters more than the other files
Everything else in this reference makes you readable. WebMCP makes you usable. An agent that can read your prices but cannot start an enquiry has to hand the user back to a browser, and that handoff is where the intent dies.
It is also the largest single item in most readiness scores, and the least implemented. That combination does not last long, so the window where this is a differentiator is now.
The mistake everyone makes
The API is document.modelContext, not navigator.modelContext. Most implementations reach for navigator by analogy with other browser APIs and register nothing. Scanners look for both, so the mistake shows up as a plain failure with no explanation.
Feature-detect and degrade silently. The API is absent in most browsers today, and a registration failure must never surface to a human visitor.
Writing tool descriptions
The description is not documentation, it is instruction. It should say when to call the tool and, more importantly, when not to. A tool that submits an enquiry should say to fire only when the user has explicitly asked to get in touch, because otherwise an agent exploring your site will submit one.
Ask for the inputs you need rather than letting the agent invent them. If a tool needs an email address, the schema should say to ask the user rather than guess.
const ctx = document.modelContext; // not navigator
if (ctx?.registerTool) {
await ctx.registerTool({
name: "request_survey",
description:
"Book a refrigeration survey. Only call when the user has " +
"explicitly asked to arrange one. Ask for their email; do not invent one.",
inputSchema: {
type: "object",
properties: {
email: { type: "string", description: "Ask the user for this." },
postcode: { type: "string" },
},
required: ["email", "postcode"],
},
execute: async ({ email, postcode }) => {
const res = await fetch("/api/survey", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email, postcode }),
});
return res.json();
},
});
}Does your site have this?
The free checker scores your site against WebMCP and everything else on this list, out of 100, in about ten seconds. It names what is missing rather than handing you a number.
Common questions
- Is it navigator.modelContext or document.modelContext?
- document.modelContext. The spec attaches a ModelContext to each Document. Registering on navigator does nothing, and it is the most common implementation error.
- Do I need an MCP server to use WebMCP?
- No. That is the point of it. The tools are registered by JavaScript on the page and called in the browser, so there is no server to run, host or authenticate.
- Which browsers support WebMCP?
- It is a draft and support is early. Chrome and the ChatGPT desktop browser discover and call page-registered tools. Everywhere else the API is absent, which is why every implementation must feature-detect.
Sources
- 01WebMCP specification, W3C Web Machine Learning
The rest of the reference
- llms.txtWhat is llms.txt, and does it actually do anything?
- agent-card.jsonWhat is agent-card.json, and do you need one?
- ARD catalogWhat is an ARD catalog (ard.json)?
- Markdown twinsHow to serve markdown to AI agents (and why .md matters)
- robots.txt for AIHow to write robots.txt for AI crawlers
- pricing.mdWhat is pricing.md, and should you publish your prices?
- Web Bot AuthWhat is Web Bot Auth? Letting good agents identify themselves
- MCP server cardWhat is server-card.json, and how do agents find your MCP server?
- auth.mdWhat is auth.md, and what if nothing needs authentication?