Agentmonkey / Learn /
WebMCP explained
WebMCP is a proposed browser API that lets a website tell an AI agent what it can do. Instead of an agent guessing which buttons to click, the page offers named tools, such as "search flights" or "add to cart", that the agent can call directly.
It was proposed jointly by Google and Microsoft and is being worked on at the W3C. As of 2026 it is a draft, with an early preview in Chrome.
How it works
A page registers tools through navigator.modelContext. Each tool has a name, a description, an input schema and a JavaScript function that does the work. The site's own code runs the action, in the user's session, with the user watching.
navigator.modelContext.registerTool({
name: 'add_to_cart',
description: 'Add a product to the shopping cart',
inputSchema: {
type: 'object',
properties: { productId: { type: 'string' } },
required: ['productId']
},
async execute({ productId }) {
await cart.add(productId);
return { content: [{ type: 'text', text: 'Added.' }] };
}
});WebMCP and MCP are not the same thing
- MCP (Model Context Protocol) connects an AI app to a server that provides tools. The server can be anywhere and work with any app that speaks the protocol.
- WebMCP borrows MCP's idea of a tool, but the tools live in a web page and the browser passes them to the agent. A site owner writes plain JavaScript and does not run an MCP server.
- WebMCP only helps on sites that have added it. An MCP server works wherever its author points it.
Where Agentmonkey fits
WebMCP is for site owners: it lets a site offer actions to agents. Agentmonkey is for users: it lets your AI change a site whether or not its owner did anything, by writing CSS and JavaScript that your browser applies on every visit. Agentmonkey is an ordinary remote MCP server, so it works today in AI apps that support custom connectors. See the MCP server page.
Status
The API has already been renamed once (early drafts used window.agent) and may change again. Treat code written against it as experimental, and check the current draft before building on it.
Related
Questions
Who is behind WebMCP?
Google and Microsoft proposed it together, and the work happens in the W3C's Web Machine Learning group.
Does WebMCP replace MCP servers?
No. It covers tools that a web page offers inside the browser. MCP servers remain the way to connect an AI app to services and data outside a page.
Can I use WebMCP today?
Only as an early preview in Chrome, for experimenting. It is a draft, not a finished standard.