What is WebMCP?

WebMCP is a browser API standard that lets websites expose structured tools to AI agents natively, without scraping or hallucination.

The problem with current AI browsing

When an AI agent visits a webpage today, it reads HTML like a human would read a book. It sees text, infers structure, and guesses what actions are possible. This leads to:

  • Hallucinated actions: the AI thinks a button does something it doesn't
  • Fragile automation: selectors break when the page updates
  • No discoverability: the agent has to try things to learn what's possible

How WebMCP works

WebMCP adds a document.modelContext API to the browser. Websites register tools on this object: structured definitions of what actions are available, what parameters they accept, and how to execute them.

// What happens behind the scenes when your snippet loads
document.modelContext.registerTool({
  name: "addToCart",
  description: "Add a product to the cart",
  inputSchema: { ... },
  execute: (args) => { /* your executeJs */ }
})

When a WebMCP-compatible AI agent visits the page, it queries document.modelContext.getTools() and sees exactly what's available. No guessing required.

Aigentably's role

Aigentably is the management and analytics layer on top of WebMCP. Instead of manually writing JavaScript to register tools on every page, you:

  1. Define tools in the Aigentably dashboard
  2. Paste one script tag
  3. The script fetches your tool definitions and registers them automatically

The polyfill

Native document.modelContext support exists only inside a public origin trial, in Chrome and Edge 149 through 156. The Aigentably snippet automatically loads @mcp-b/webmcp-polyfill for every other browser. This means your tools work everywhere today.

Further reading

On the blog