Skip to content

The publication for web craftspeople Tuesday, 25 August 2026

AI for the web

WebMCP: turning websites into tools for in-browser AI agents

WebMCP is a proposed W3C standard that lets a website declare its own actions as tools a browser-based AI agent can call directly. Unveiled by Google at I/O 2026 and co-designed with Microsoft, it extends the MCP protocol from the server into…

Illustration WebMCP sur fond violet dégradé, magazine Mail Studio
WebMCP — Mail Studio

WebMCP, unveiled by Google at I/O 2026 and co-designed with Microsoft, answers a question left open since AI agents arrived in the browser: how can a site offer its functions to an agent without that agent clicking blindly through the DOM? The proposal, brought to the W3C, extends the MCP protocol all the way into the browser tab.

From MCP to the browser: what WebMCP adds

The Model Context Protocol connects an agent to server-side resources: databases, file systems, third-party APIs. WebMCP moves that idea into the page. A site declares its own actions as structured tools, and the agent running inside the browser calls them directly, with the session context already in place: signed-in user, current cart, active filters.

The decisive point is reuse. WebMCP adopts the MCP tool schema: a single definition can live in an MCP server and in a browser-side exposure, with no rewrite of the contract.

WebMCP does not replace MCP: it extends its reach, from the server into the browser tab.

How a site declares its tools

The API rests on a global object, document.modelContext, and its registerTool method. Each tool carries a name, an agent-readable description, an input schema in JSON Schema form, and an async handler that returns a structured result.

const controller = new AbortController();

await document.modelContext.registerTool({
  name: "ajouter-tache",
  description: "Ajoute un element a la liste de taches active de l'utilisateur",
  inputSchema: {
    type: "object",
    properties: {
      texte: { type: "string", description: "Contenu de la tache" }
    },
    required: ["texte"]
  },
  async execute({ texte }) {
    await ajouterTache(texte);
    return {
      content: [{ type: "text", text: `Tache ajoutee : "${texte}"` }]
    };
  }
}, { signal: controller.signal });

The AbortController signal lets the site withdraw a tool when the component unmounts or when page state makes the action obsolete. A declarative variant, still being specified, aims to expose existing HTML forms with no extra code.

Where deployment stands

WebMCP is a W3C community group report, first published in August 2025 by the Web Machine Learning Community Group and revised on 28 July 2026. Chrome opens an origin trial from version 149, with a Gemini agent integration announced to follow. Edge is expected next, Microsoft being a co-author; Firefox and Safari have not yet made a firm public commitment. On the framework side, Angular shipped experimental support in version 22, and platforms such as Shopify and Cloudflare expose it experimentally on the sites they host.

CriterionMCP (server side)WebMCP (browser side)
Where the tool runsMCP server, outside the browserIn the page, in JavaScript
What the agent reachesDatabases, files, third-party APIsThe site’s own functions and forms
Session contextMust be rebuilt (tokens, credentials)Already present (signed-in user)
Tool schemaMCP schemaSame schema, reused
Typical use caseAgent wired to a back officeAgent acting on the site being viewed

The questions the standard leaves open

Exposing actions to an agent means opening a surface. A tool that triggers a payment or edits data must stay under the user’s explicit control, not run on an agent’s judgement alone. The specification leans on the browser’s origin model and on session context, but consent, call logging, and rate limiting remain largely the implementer’s responsibility.

Watch point. A WebMCP tool inherits the rights of the current session. Restricting exposure to idempotent or confirmable actions, requiring user validation for any sensitive operation (payment, deletion, sending) and treating incoming parameters as untrusted input remain essential precautions.

The takeaway

WebMCP standardises a missing piece: a channel of intent between a site and the agent that uses it, backed by the tool schema already known from MCP. The proposal is young, limited for now to a Chrome origin trial, and its adoption will depend as much on other browsers as on the security guardrails that come with it. For web teams, it sketches a skill worth watching closely: building sites that are legible not only to humans, but also to agents.

WebMCP reads to me as the logical next step after what MCP started on the server, and the bet feels right: rather than letting agents guess the interface by clicking through the DOM, you give them an explicit contract. But I stay cautious about the timeline. Until Firefox and Safari decide, I would ship WebMCP as progressive enhancement, never as the only path to a feature. And I would keep the rule that holds for any public API: never expose a destructive action without human confirmation. — Simon Janvier

Further reading

WebMCP specification, W3C Web Machine Learning Community Group: github.com/webmachinelearning/webmcp

Also on Mail Studio

Read next