← back to the archiveCover illustration for “WebMCP: letting websites hand tools to AI agents”
TERM6mo ago·Published · Updated ·by Andy Padia

WebMCP: letting websites hand tools to AI agents

In short: WebMCP is a draft browser API that lets a web page register structured tools for AI agents to call, in place of agents scraping and clicking.

WebMCP is a proposed browser API for letting websites hand tools to AI agents: a page registers tools, each with a name, description and input schema, and an agent in the browser calls them directly. The explainer, first published on 13 August 2025 by Microsoft and Google engineers, describes such pages as in-page Model Context Protocol servers. It is a draft and has no W3C Standard status.

WebMCP in plain words

Today an agent shops on a website like a tourist reading a menu in a foreign language and pointing. WebMCP is the restaurant handing it a menu in its own language.

How it works

The page's JavaScript registers tools through document.modelContext.registerTool(). Each tool carries a name, a description, an input schema and an execute function. A browser agent discovers the tools when it visits the page, calls one with structured arguments, and the page runs its own client-side code and returns a result. The explainer's case for this design is that developers no longer replicate the user's state and credentials on a separate backend server.

The specification is a Draft Community Group Report from the Web Machine Learning Community Group. WebMCP borrows its vocabulary from the Model Context Protocol, where servers expose tools for a model to execute.

Example

As an illustration, following the shape in the draft as read in November 2026. The explainer says the design has evolved significantly, so check the spec before copying this:

document.modelContext.registerTool({
  name: "search_flights",
  description: "Search flights by origin, destination and date",
  inputSchema: { /* JSON schema */ },
  execute: async (args) => searchFlights(args)
});

Where you'll meet it

  • The Web Machine Learning Community Group's WebMCP explainer and draft report
  • Discussions about making sites "agent-ready"
  • Browser agents that operate web apps for a user
  • Web apps that want agents to call functions instead of driving the UI

What it changes for you

For web developers, it suggests a future where you design agent-facing actions alongside your UI, much like you added structured data for search. For product teams, it is a way to control how agents use your site instead of being scraped. Treat it as early: watch the spec and prototype, and hold off on production dependencies.

WebMCP vs MCP server

An MCP server is a separate process or service that a host application connects to. WebMCP tools live inside a web page and run in its client-side script.

Common mistake

My view: assuming agent-facing tools are automatically safer than clicks. The draft has its own section on prompt injection: agents may treat tool descriptions and return values as trusted context, which opens the door to tool poisoning and output injection. Tools are same-origin by default, and a hint lets agents require user confirmation for consequential actions. Confirmation for sensitive actions still belongs in the page.

Model Context Protocol · Browser agent · MCP server · Prompt injection · llms.txt

A page tool is still an attack surface, so keep confirmation for sensitive actions in the page.

#field-guide#mcp#protocols#browser-agents#web-standards

Sources

  1. github.com/webmachinelearning/webmcp
  2. webmachinelearning.github.io/webmcp
  3. modelcontextprotocol.io/specification
← older drop
Headless mode: running a coding agent from scripts and CI
newer drop →
Build vs buy (AI): when to make your own AI and when not

related drops

explore all 557 drops →
← back to the archiveday 175