Glossary

WebMCP

A proposed web standard that lets websites expose tools to AI agents directly in the browser, via JavaScript.

WebMCP is a proposed web standard that lets a website expose its own tools to AI agents running in the browser. Instead of an agent guessing which buttons to click, the page tells it exactly what it can do.

How it works

The page registers tools with JavaScript through document.modelContext:

document.modelContext.registerTool({
  name: 'add_to_cart',
  description: 'Add a product to the cart',
  inputSchema: {
    type: 'object',
    properties: { id: { type: 'string' } },
    required: ['id']
  },
  execute: async ({ id }) => addToCart(id)
});

An agent in the browser can then discover and call add_to_cart directly, using the user’s existing session.

WebMCP vs MCP

  • MCP runs on a server, separate from your site.
  • WebMCP runs inside the web page itself, in the browser.
  • Both use the same idea: named tools with a description and an input schema.

Why it matters

Agents that scrape the DOM are slow and break easily. WebMCP gives them a clean, reliable API while keeping the user in the loop.