# WebMCP - Definition and What It Means for Online Stores

> WebMCP lets a web page register tools that an AI agent in the browser can call. How it works, its Chrome origin trial, and what a store should expose.

Source: https://angeo.dev/webmcp-definition/
Updated: 2026-10-17

Canonical definition

# WebMCP - Definition and What It Means for Online Stores

**WebMCP is a browser API that lets a web page offer named tools to an AI agent running in the same browser.** The agent calls `search_products` or `add_to_cart` as a function, instead of reading the page and guessing where to click.

**In one sentence**
The page says "here are my tools and what they do", the agent in the browser calls them, and everything runs in the shopper's own session.

## How it works

A page registers each tool with a name, a short description, a JSON Schema for its input, and a function that runs when the tool is called. The agent reads the list and calls the tool that fits the shopper's request.

```
document.modelContext.registerTool({
  name: 'search_products',
  description: 'Search this store. Returns SKU, name, price, stock and URL.',
  inputSchema: { type: 'object', properties: { query: { type: 'string' } }, required: ['query'] },
  async execute({ query }) { /* call the store's own search */ }
}, { signal });
```

The tool runs **in the page**, with the shopper's cookies and cart. So a WebMCP `add_to_cart` changes the same cart the shopper sees in the mini cart. Nothing is sent to a separate server, and there is no new login.

## WebMCP and MCP are not the same thing

| | MCP | WebMCP |

| Where the tools live | On a server, at an endpoint such as `/mcp` | In the web page, in the browser |
| Who connects | An AI app (Claude, ChatGPT-based agents) connects to the server | An AI agent inside the browser uses the open tab |
| Session | Its own: anonymous, a token, or account linking | The shopper's own browser session |
| Typical use | Assistants that shop for someone without opening the store | A browser agent helping on the store page |

A store can offer both. They answer different situations: an assistant that never opens your site, and an agent that is already on it.

## Where it stands in October 2026

- The W3C Web Machine Learning Community Group first published WebMCP in February 2026, with engineers from Google and Microsoft.
- Chrome runs it as a public **origin trial** from Chrome 149. A site needs a trial token for real visitors. Developers can test with the Chrome flag *WebMCP for testing*.
- The API changed during the trial. `provideContext()` was removed. Tools are now added one by one with `registerTool(tool, { signal })` on `document.modelContext`. The older `navigator.modelContext` is deprecated.
- Other browsers do not support it yet.

So WebMCP is real and testable, but it is not a finished standard. Build it so that it does nothing in browsers without support.

## What a store should expose

Keep the tool list short and safe:

- **Read tools**  -  search and product details. They show what the shopper can already see.
- **Cart tools**  -  add to cart and view cart, in the shopper's own session, with the same CSRF protection (form key) as the normal button.
- **Navigation**  -  open checkout. Let the shopper pay and place the order themselves.

Do **not** give a browser agent a tool that places an order or takes payment. And check every limit in server code, not in the tool description: the product must be visible, the quantity capped, stock real.

## A Magento example

The [WebMCP module for Magento 2](https://angeo.dev/modules/webmcp/) registers five tools on every storefront page: `search_products`, `get_product`, `add_to_cart`, `get_cart` and `go_to_checkout`. Read tools call the store's own GraphQL. `add_to_cart` is a normal frontend POST with the form key, and Magento runs its usual stock and sale rules. Product text is marked as untrusted, so the agent treats it as data, not as instructions. In a browser without WebMCP the script exits at once.

## Questions

Is WebMCP the same as MCP?
No. MCP tools live on a server and an AI app connects to them. WebMCP tools live in the web page and an agent in the browser calls them, using the shopper's own session.
Which browsers support WebMCP?
In October 2026 only Chrome, as an origin trial from Chrome 149. Other browsers do not support it yet.
Can a WebMCP agent buy on its own?
Only if the site gives it such a tool. A store should not. Let the agent fill the cart and open checkout, and let the shopper pay.
Does WebMCP slow down a store?
A small script registers the tools. Pages stay cacheable as long as the printed config is the same for every shopper. Only cart calls must skip the cache.

## Related

- [MCP for commerce - definition](https://angeo.dev/mcp-commerce-definition/)

- [Agentic checkout - definition](https://angeo.dev/agentic-checkout-definition/)

- [Commerce agent - definition](https://angeo.dev/commerce-agent-definition/)

- [WebMCP module for Magento 2](https://angeo.dev/modules/webmcp/)

- [WebMCP module reference](https://angeo.dev/docs/modules/webmcp/)

- [Glossary](https://angeo.dev/glossary/)

## Sources

- [Chrome for Developers: WebMCP](https://developer.chrome.com/docs/ai/webmcp)

- [Chrome Origin Trials](https://developer.chrome.com/origintrials/)

- [WebMCP origin trial: provideContext is gone (DEV Community)](https://dev.to/jangwook_kim_e31e7291ad98/webmcps-origin-trial-providecontext-is-already-gone-54j8)

- [angeo/module-webmcp README](https://github.com/angeo-dev/module-webmcp)

Verified 16 October 2026. WebMCP is in a Chrome origin trial and the API can still change. Disclosure: we publish the open-source WebMCP module for Magento 2 linked above.
