AI browsers — Gemini in Chrome, agentic modes in Edge, and a wave of standalone agents — increasingly drive websites on behalf of a person instead of just reading them. On a WordPress site, that mostly goes badly, and the reason is worth understanding before you reach for a plugin.
Why an agent struggles with a default WordPress theme
An agent that wants to "search this store for wireless headphones under €50 and add the top result to the cart" has to reverse-engineer your theme's DOM: find the search input, guess the submit behavior, parse a results grid that was built for human eyes, locate the right "Add to cart" button among many, and survive a theme update that renames every class. WooCommerce makes it worse, not better — more interactive surface, more ways to misfire. The agent is screen-scraping a UI that was never meant to be a machine interface.
The fix is not "describe your DOM better." It is to expose the actions your site already performs as callable tools the agent can invoke directly.
What WebMCP actually is
WebMCP is an emerging browser capability (window.navigator.modelContext / document.modelContext, shipping behind Chrome's origin trial and being taken through the W3C) that lets a page register tools an in-browser agent can call. Instead of clicking around your theme, the agent sees a small, explicit tool list:
-
search_site— run a query, get structured results back -
add_to_cart— add a product by id/variant -
submit_form— contact, booking, lead capture -
navigate— jump to a known section
Each tool returns structuredContent (structured data), not a screenshot the agent has to interpret. The agent stops guessing.
Doing it by hand vs. one line
You can wire this yourself: enqueue a script, register each tool against modelContext, map every tool to the right WooCommerce/REST call, keep the return shapes valid, and re-test after each theme or plugin update. For a lot of teams that is a real project, and it is exactly the kind of thing that rots the moment someone switches themes.
The one-line version — what I build, Latch — is a single script tag:
<script src="https://latch.tools/latch.js" defer></script>
Drop it in your theme's header.php (or via any "insert header scripts" plugin) and it detects your site's search, cart, and forms and exposes them as WebMCP tools automatically. No plugin to build, no per-theme rewrite. The client is open source (MIT): https://github.com/r0bertini/latch
The honest part: is this worth doing today?
Most sites see ~0 agent traffic right now. WebMCP is early. So be clear-eyed about the two reasons to ship it anyway:
- It is cheap and forward-compatible. One tag, removable in one tag, no lock-in. When agent traffic arrives on your niche, you are already legible instead of scrambling.
- It is measurable. The free client makes your site agent-callable. If you want to know whether agents actually show up and what they call, that is the one thing you cannot see from your normal analytics — agent calls do not look like page views. Latch Pro (€19/mo per project) is hosted analytics for exactly that: which AI agents visited, which tools they invoked, what they did. Free gets you compatible; Pro tells you if it is paying off. If nothing shows up, you have lost one line of HTML — not a plugin build.
Start free, watch, and only pay once the data says agents are actually knocking.
Try it
- WordPress-specific guide: https://latch.tools/webmcp-for-wordpress?ref=devto-webmcp-wordpress
- The general WebMCP explainer: https://latch.tools/webmcp?ref=devto-webmcp-wordpress
- Source (MIT): https://github.com/r0bertini/latch
If you run a WordPress or WooCommerce site and have tried pointing an agent at it, I would genuinely like to hear where it broke — that failure list is what the tool defaults are built from.
Top comments (0)