Skip to content

Unofficial. This page is a community guide to WebMCP, a draft of the W3C Web Machine Learning Community Group. It is not a W3C Standard and it is still changing. The source of truth is the specification and the explainer repository.

{} webmcp.org

W3C Community Group draft · origin trials in Chrome and Edge

Let a web page tell an agent what it can do.

WebMCP is a browser API. A page registers its own functions as tools, each with a name, a description and a schema. An agent in the browser calls those tools instead of guessing its way through the page's buttons and forms. The user stays on the page, logged in, watching it happen.

What it is

The problem

Agents that act on the web today either scrape the user interface, which is slow and fragile, or talk to a separate backend through the Model Context Protocol or OpenAPI, which bypasses the page and makes the developer duplicate the user's state and login on a server.

The idea

Put the tools in the page. The page's own JavaScript registers tools through document.modelContext. A built-in browser agent, an extension or a trusted iframe discovers them and calls them. Page UI, agent and user share one context.

The shape

A tool is a function with a natural-language description and a JSON Schema for its input, the same shape MCP tools use. A declarative form-based variant is being explored alongside, but the imperative API is what the specification defines today.

How it works

  1. 1
    Register. The page calls registerTool() with a name, description, input schema and an execute callback. An AbortSignal unregisters it later.
  2. 2
    Discover. An agent connected to the page asks the browser for the current list of tools and their schemas.
  3. 3
    Invoke. The agent requests a call with structured arguments that match the schema.
  4. 4
    Execute. The browser mediates the call and runs the page's callback in the page's own context, with the user's session and state.
  5. 5
    Respond. The callback returns structured content to the agent, which carries on with the user.

Sites can switch the feature off with Permissions-Policy: tools=(). Tools in cross-origin iframes are only visible where exposedTo allows. See the spec's security and privacy considerations.

Registering one tool, after the explainer
const controller = new AbortController();

await document.modelContext.registerTool({
  name: "add-todo",
  description: "Add an item to the user's todo list",
  inputSchema: {
    type: "object",
    properties: {
      text: { type: "string", description: "The todo text" }
    },
    required: ["text"]
  },
  async execute({ text }) {
    await addTodo(text);          // the page's own logic
    return { content: [{ type: "text", text: `Added "${text}"` }] };
  }
}, { signal: controller.signal });

// later: controller.abort() removes the tool

Where it runs

From the group's implementation status page, checked 5 November 2026. Local development in Chrome needs the enable-webmcp-testing flag.

Browser or agentStateWhere to look
ChromeOrigin trial, Chrome 149announcement · Chrome Status · docs
EdgeOrigin trial, Edge 150origin trial
BraveExperimental, in Leoissue 55232
ChatGPT DesktopSupporteddownload
Meta Ray-Ban DisplayComing, off by defaultweb apps docs
FirefoxPosition under discussionstandards-positions · bug
SafariPosition under discussionstandards-positions

Everywhere else, the official polyfill provides document.modelContext in secure contexts.

Ecosystem

Standard and reference

Tools and demos

Related projects