WebMCP for Shopify: make your store usable by AI shopping agents
AI browsers are starting to shop on people's behalf โ and on a normal Shopify theme they fail at the cart. WebMCP fixes that by handing agents real tools for search, add-to-cart, and checkout. Here's how to add it to your store in one line.
TL;DR
Add Latch to your Shopify store with one script tag in theme.liquid. It auto-exposes your search, product, and cart actions as WebMCP tools so agentic browsers can actually complete a purchase โ no app, no MCP server, no theme rewrite:
<script src="https://latch.tools/latch.js" defer></script>Get Latch โWhy Shopify stores need WebMCP now
When a shopper tells an AI browser "find me a size-M merino base layer under $80 and buy it," the agent visits stores and tries to drive them. On a store it can actually use, it completes the checkout. On a store it can't, it silently gives up and moves to a competitor โ and your analytics just show another odd bounce.
This is agentic commerce, and it is the highest-stakes version of the agent-readability problem: the store an agent can use is the store that gets the sale. Being agent-ready is becoming what being mobile-friendly was in 2012 โ first an edge, then table stakes.
Why agents struggle with a default Shopify theme
A model pointed at your rendered theme has to infer intent from a soup of divs, variant pickers, and AJAX cart drawers. It mis-selects variants, misses the "add to cart" that's actually a form submit, and abandons the multi-step checkout. WebMCP replaces that guessing with a contract: your store declares search_site, add_to_cart, and navigate, and the agent calls them directly.
How to add WebMCP to Shopify (one line)
- Open your theme code. In Shopify admin: Online Store โ Themes โ โฏ โ Edit code, then open
layout/theme.liquid. - Paste the Latch tag before
</head>.<!-- add just above the closing </head> in theme.liquid --> <script src="https://latch.tools/latch.js" defer></script> - Save and test. Latch auto-detects your storefront's search box, product forms, and cart, and registers them as WebMCP tools. In an agentic browser you can confirm the tools an agent now sees on the agent's-eye view.
<script src="https://latch.tools/latch.js" defer></script>Get Latch โPrefer not to touch theme code? Add the same tag through a theme app extension or a custom pixel. Latch feature-detects WebMCP, so it stays inert for ordinary shoppers โ zero risk to your conversion rate.
Do it yourself instead
You can also implement WebMCP by hand with document.modelContext.registerTool for each storefront action and keep the schemas in sync as your theme changes. Full control, ongoing maintenance โ see the full WebMCP guide for the raw API.
Which tools a Shopify store should expose
| Tool | What an AI shopping agent can do |
|---|---|
search_site | Find products by query, size, or price |
add_to_cart | Add the right variant and move toward checkout |
navigate | Jump to a collection, product, or the cart |
Expose the actions a human shopper can already take that move them toward buying. Keep anything destructive (delete account, cancel order) behind explicit confirmation.
FAQ
Do I need a Shopify app or a paid plan?
No app and no MCP server โ WebMCP is client-side. You add one script tag to theme.liquid (or via a theme app extension / custom pixel). It works on any Shopify plan.
Will it slow down or break my store?
No. It's a ~6 KB deferred script that stays completely inert in browsers without WebMCP, so human shoppers are unaffected. It only reads actions your theme already exposes.
Which browsers support WebMCP?
A public origin trial in Chrome 149 and native support in Edge 147, with other agentic browsers adopting the same document.modelContext API. Latch feature-detects and stays inert elsewhere.
How is this different from Shopify SEO or structured data?
SEO and schema help agents read your store. WebMCP lets agents act โ run your search, add the right variant to cart, and head to checkout.
Make your Shopify store agent-ready in one line
Agentic checkout is arriving while most stores are still unusable to agents. Being the store in your niche that an agent can buy from is a real, temporary edge.
<script src="https://latch.tools/latch.js" defer></script>Get started with Latch โSee also: the full WebMCP guide ยท Latch pricing