What is WebMCP?
WebMCP is a browser API standard that lets websites expose structured tools to AI agents natively — without scraping, without 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 navigator.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
navigator.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 navigator.modelContext.tools and sees exactly what's available — no guessing required.
Agentable's role
Agentable is the management and analytics layer on top of WebMCP. Instead of manually writing JavaScript to register tools on every page, you:
- Define tools in the Agentable dashboard
- Paste one script tag
- The script fetches your tool definitions and registers them automatically
The polyfill
Native navigator.modelContext support is still rolling out across browsers. The Agentable snippet automatically loads @mcp-b/webmcp-polyfill for browsers that don't support it natively yet. This means your tools work everywhere today.