Skip to content
SeenLens

WebMCP: what it is and how to use it

WebMCP is a proposed browser API that lets a web page publish tools, such as search or checkout, that AI agents can call directly. It is a draft from the Web Machine Learning Community Group, last updated on 2 November 2026. Chrome offers it as an origin trial from version 149. Pages register tools with document.modelContext.registerTool().

By SeenLens · Last updated

Run the free 43-check scan on your page

What is WebMCP?

WebMCP is a client side API. A web page uses JavaScript to describe actions it can perform. Each action is a tool with a name, a plain language description, an input schema and an execute function. An AI agent in the browser reads the list of tools and calls them. The agent no longer has to guess which button to click.

The draft describes a page that uses WebMCP as an in-page Model Context Protocol server. The tool runs the same JavaScript your interface already runs. The user sees the page update while the agent works.

WebMCP targets agents that act on a page: filling a form, filtering a list, adding an item to a cart. It does not change how search engines crawl or cite your content. We found no study that links WebMCP to AI search citations.

Who proposes WebMCP and what is its status today?

The Web Machine Learning Community Group publishes the draft on GitHub. The specification page calls it a Draft Community Group Report dated 2 November 2026. It is not a W3C Standard and it is not on the W3C Standards Track. The Chrome team documents the API and runs the origin trial. The API can still change.

WebMCP status on 2026-11-06
ItemStatusSource
SpecificationDraft Community Group Report, 2 November 2026. Editors: Brandon Walderman, Khushal Sagar, Dominic Farolino, Samuel Dallstream.WebMCP draft
ChromeOrigin trial from Chrome 149. For local tests, enable chrome://flags/#enable-webmcp-testing.Chrome developer docs
EdgeOrigin trial from Edge 150.Implementation status
Firefox and SafariNo implementation listed. The page links standards position requests only.Implementation status
AgentsChatGPT Desktop is listed as supported. Brave lists experimental support in its Leo chat.Implementation status
Declarative form APIDocumented by Chrome. The GitHub README says it is not part of the specification yet.WebMCP README

Chrome published its WebMCP documentation on 18 May 2026. Its overview page was last updated on 7 October 2026. Both APIs sit behind the tools Permissions Policy. The policy defaults to self, so a cross-origin iframe needs allow="tools".

Should you use navigator.modelContext or document.modelContext?

Use document.modelContext. Early WebMCP articles show navigator.modelContext. The draft moved the modelContext getter from Navigator to Document in a pull request merged on 27 May 2026 (webmcp pull request 184). Discussion on that pull request says Chrome 150 shipped the change and deprecates navigator.modelContext. Chrome's imperative API page, updated on 16 October 2026, uses document.modelContext in its examples.

Old code keeps working in some builds. To support both, detect the new entry point first and fall back to the old one:

JavaScript
const mc = document.modelContext ?? navigator.modelContext;

This is the pattern that the SeenLens check webmcp-entry-point recommends. The check reports a page that registers tools on navigator.modelContext only.

How do you register a WebMCP tool? A working example

The draft defines registerTool(tool, options). It returns a promise. The promise rejects if a tool with the same name exists, if the name or description is empty, or if a schema is invalid. This example registers a site search tool and removes it when the page no longer needs it:

JavaScript, matches the 2026-11-02 draft
const mc = document.modelContext ?? navigator.modelContext;
if (mc) {
  const controller = new AbortController();

  await mc.registerTool(
    {
      name: "search-articles",
      description: "Search the articles on this site and return the top matches.",
      inputSchema: {
        type: "object",
        properties: {
          query: { type: "string", description: "Words to search for." },
        },
        required: ["query"],
      },
      annotations: { readOnlyHint: true },
      async execute({ query }) {
        const res = await fetch("/api/search?q=" + encodeURIComponent(query));
        const hits = await res.json();
        return {
          content: [{ type: "text", text: JSON.stringify(hits) }],
        };
      },
    },
    { signal: controller.signal },
  );

  // Later, to remove the tool: controller.abort();
}
  • name, description and execute are required. title, inputSchema, outputSchema and annotations are optional.
  • inputSchema is a JSON Schema object. The agent uses it to build the arguments.
  • annotations carries hints: readOnlyHint, untrustedContentHint, consequentialHint and debugging.
  • execute receives the arguments and an options object with an AbortSignal. The draft types its return value as Promise<any>. The draft README returns a content array. Chrome's examples return a plain string.
  • Aborting the signal passed in the options removes the tool. Register tools for the current screen only, because a long tool list uses up the agent's context.
  • The exposedTo option lists origins that may see a tool. The draft also defines getTools() and executeTool() for agents that run inside the page.

Keep tools small. Name each one after the user's goal. Do not register a tool that spends money or deletes data unless a person confirms the step in the interface.

Does WebMCP have a declarative option for forms?

Yes. Chrome documents attributes that turn an HTML form into a tool without JavaScript. Chrome's declarative API page was last updated on 25 September 2026. The GitHub README says this API is still an exploration and not part of the specification.

Declarative WebMCP attributes in the Chrome documentation
AttributeGoes onMeaning
toolnameformNames the tool. Removing it unregisters the tool.
tooldescriptionformDescribes what the tool does.
toolparamdescriptionform fieldsDescribes one field in the generated schema. Without it, the browser uses the field label, then aria-description.
toolautosubmitformLets the agent submit the form. Without it, the user must press Submit.
HTML
<form toolname="search-cars"
      tooldescription="Search cars by make and model"
      action="/search">
  <input type="text" name="make" required
         toolparamdescription="Vehicle make, for example BMW">
  <input type="text" name="model" required
         toolparamdescription="Vehicle model, for example 330i">
  <button type="submit">Search</button>
</form>

When an agent submits the form, SubmitEvent.agentInvoked is true. Call preventDefault() and then event.respondWith(promise) to return a result to the agent without navigating. Annotate only forms that are safe for an agent to submit, such as search or contact forms.

What is the difference between WebMCP and MCP?

MCP is the Model Context Protocol. An MCP server runs on a backend and serves tools to AI applications. WebMCP puts tools in the page itself. The WebMCP draft says it complements backend protocols such as MCP and does not replace them.

WebMCP and MCP compared
WebMCPMCP
Where it runsJavaScript in an open web page, in the user's browserA server process, local or remote
TransportNo network transport. The browser passes calls to the page through a JavaScript APIstdio or Streamable HTTP, carrying JSON-RPC messages (specification revision 2026-07-28)
AuthenticationThe page runs inside the user's signed in session and reuses its cookies and stateOptional. HTTP servers follow an OAuth 2.1 based flow. Local stdio servers read credentials from the environment
Who calls itBrowser agents, agents in iframes and browser extensionsAI applications and platforms that connect as MCP clients
Needs an open pageYes. Tools exist while the page is loadedNo. The server answers without a browser tab
Tool definitionName, description, JSON Schema and a JavaScript execute callbackName, description and JSON Schema, served by the server
StatusDraft Community Group ReportPublished specification, current revision 2026-07-28

Choose WebMCP when the action depends on what the user sees in the browser. Choose MCP when an agent must work without a browser, such as a nightly job. A site can offer both.

Which browsers support WebMCP today?

Only Chromium browsers run it, and only as a trial. Chrome 149 and later accept an origin trial token, or you can turn on the testing flag on your own machine. Edge 150 starts an origin trial. The implementation status page lists no Firefox or Safari implementation on 2026-11-06.

Visitors without the API see no change, because the code above checks that modelContext exists first. Use that feature check on every page that registers tools.

How does SeenLens check WebMCP?

The SeenLens scan has three WebMCP checks in its agent readiness dimension. All three are optional improvements. A site with no search or booking function has nothing to expose. Read how the scan works for the scoring.

WebMCP checks in a SeenLens scan
Check idWhat it reportsPriority
webmcp-toolsThe page registers no WebMCP tools for agents.P2
webmcp-entry-pointThe page registers tools on navigator.modelContext only. Agents that follow the current draft look at document.modelContext.P2
webmcp-form-annotationsForms have no toolname or tooldescription attributes.P3

The fix page Add WebMCP tools lists the steps for each check. For the wider set of agent checks, see the Lighthouse agentic audit fixes.

Scan your page for WebMCP and 35 other checks

Frequently asked questions about WebMCP

What is WebMCP?

WebMCP is a draft web API that lets a page expose tools to AI agents. Each tool has a name, a description, an input schema and a JavaScript function. The agent calls the function instead of clicking through the interface.

Is WebMCP a W3C standard?

No. The specification is a Draft Community Group Report from the Web Machine Learning Community Group, dated 2 November 2026. It is not a W3C Standard and is not on the W3C Standards Track.

Is WebMCP a Google product?

The Chrome team documents WebMCP and runs an origin trial from Chrome 149. The specification itself comes from the community group. Edge 150 also lists an origin trial.

How do I try WebMCP in Chrome?

Use Chrome 149 or later. Open chrome://flags/#enable-webmcp-testing, enable the flag and relaunch Chrome. Then register a tool with document.modelContext.registerTool(). For a live site, join the origin trial.

Is WebMCP the same as MCP?

No. MCP uses a server and a transport such as stdio or Streamable HTTP. WebMCP runs in the open page and uses a browser API. The two can work together.

Do I need WebMCP for AI search visibility?

No evidence says so. WebMCP serves agents that act on a page. AI search engines read your content through crawlers, so crawler access and clear content matter more. Run the AI crawler checker first.

Sources