# WebMCP for Magento 2

> Free Magento 2 module that registers five WebMCP tools on every page, so AI agents in Chrome can search, add to the shopper's cart and open checkout.

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

Transact - Open source

# WebMCP for Magento 2

angeo/module-webmcp

- WebMCP
- Chrome origin trial
- Luma + Hyvä
- MIT

**Registers five store tools on every storefront page, so an AI agent in the shopper's browser can use your store through real functions instead of clicking around.** The agent searches, adds to the shopper's own cart and opens checkout. It never pays.

```
composer require angeo/module-webmcp
bin/magento module:enable Angeo_WebMcp
bin/magento setup:upgrade
bin/magento cache:flush
```

Full setup, every setting with its default, and the CLI commands: [**WebMCP reference ->**](https://angeo.dev/docs/modules/webmcp/)

## What it does

Four things to know before you install.

### Five tools, one script

`search_products`, `get_product`, `add_to_cart`, `get_cart` and `go_to_checkout`. One plain script registers them with `document.modelContext`. No RequireJS, no Alpine, no build step, and no inline JavaScript, so a strict CSP keeps working.

### The shopper's own cart

Cart tools use the shopper's session. `add_to_cart` is a normal frontend POST with the form key, so Magento checks it exactly like your add-to-cart button. The mini cart refreshes on Luma and on Hyvä.

### Rules in PHP, not in a prompt

The product must be enabled, visible and on the current website. Quantity is capped. Stock and sale rules run through Magento's own cart code. Product text is marked as untrusted content, so the agent treats it as data.

### Safe today, ready for later

WebMCP runs in Chrome as an origin trial. Add your trial token in the admin for real visitors, or use the Chrome flag to test. In other browsers the script exits at once and changes nothing.

Install it next to [MCP Server](https://angeo.dev/modules/mcp-server/): MCP serves assistants that connect to your store directly, WebMCP serves agents that are already on the page.

## Requirements

| Magento | 2.4.6+ (Open Source, Mage-OS, Adobe Commerce) |
| PHP | 8.1 - 8.5 |
| Latest version | 1.0.1 |
| Licence | MIT  -  free, no licence key, no account, no telemetry |

GraphQL must be on (it is by default): the read tools use the store's own `/graphql`.

## Works with

[MCP Server](https://angeo.dev/modules/mcp-server/) - [AI Agent Activity](https://angeo.dev/modules/agent-activity/) - [UCP Profile](https://angeo.dev/modules/ucp/) - [Agentic Commerce Suite](https://angeo.dev/modules/agentic-commerce-suite/)

## Not sure whether you need this one?

Run the free scan or the CLI audit first. It shows which signals your store is missing, and which module fixes each one.

[Scan my store](https://angeo.dev/ai-magento-audit/)[All modules](https://angeo.dev/modules/)

## Questions

Which browsers does it work in?
In October 2026, Chrome only, as an origin trial from Chrome 149. Elsewhere the script does nothing.
Can the agent place an order?
No. It can search, add to the shopper's own cart and open checkout. The shopper pays.
Does it break full-page cache?
No. The printed config is the same for every shopper. Only the cart calls under /webmcp/ skip the cache.
Can I see how agents use it?
Yes. AI Agent Activity counts WebMCP calls by tool and links orders to carts the agent built.

## Related

- [WebMCP - definition](https://angeo.dev/webmcp-definition/)

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

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

- [Magento MCP server](https://angeo.dev/magento-mcp-server/)

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

Free and MIT licensed. Checked 16 October 2026 against version 1.0.1. WebMCP is a Chrome origin trial and may change.
