WebMCP for WordPress: make your site usable by AI browsers
WordPress powers roughly 40% of the web โ and on a default theme, the AI browsers now driving sites for their users fail at search, cart, and forms. WebMCP fixes that by handing agents real tools instead of guesswork. Here's how to add it to your WordPress or WooCommerce site in one line.
TL;DR
Add Latch to your WordPress site with one script tag in your site-wide header. It auto-exposes your search, WooCommerce cart, and contact-form actions as WebMCP tools so agentic browsers can actually get things done โ no custom plugin, no MCP server, no theme rewrite:
<script src="https://latch.tools/latch.js" defer></script>Get Latch โWhy WordPress sites need WebMCP now
When a visitor tells an AI browser "find the annual plan on this site and start the signup," or "add a size-M of this to my cart and check out," the agent visits the page and tries to drive it. On a site it can actually use, it finishes the job. On a site it can't, it silently gives up and moves on โ and your analytics just show another odd bounce.
With WordPress running ~40% of all websites, most of these agent visits are landing on WordPress. Being agent-ready is becoming what being mobile-friendly was in 2012 โ first an edge, then table stakes โ and for WooCommerce stores it is agentic commerce: the store an agent can use is the store that gets the sale.
Why agents struggle with a default WordPress theme
A model pointed at your rendered theme has to infer intent from a soup of divs, page-builder markup, AJAX search, and WooCommerce variation forms. It mis-selects variants, misses the "add to cart" that's actually a form submit, and abandons multi-step checkout or Contact Form 7 / Gravity Forms flows. WebMCP replaces that guessing with a contract: your site declares search_site, add_to_cart, submit_form, and navigate, and the agent calls them directly.
How to add WebMCP to WordPress (one line)
- Pick a place for the tag that survives updates. Easiest is a header-scripts plugin such as WPCode or Insert Headers and Footers (Settings โ Insert Headers and Footers โ Scripts in Header). Prefer code? Use your child theme's
header.phpor thewp_headhook so a parent-theme update won't wipe it. - Paste the Latch tag into the site-wide header.
<!-- paste into "Scripts in Header", or before </head> in your child theme --> <script src="https://latch.tools/latch.js" defer></script>Via the
wp_headhook in a child theme'sfunctions.phpinstead:add_action('wp_head', function(){ echo '<script src="https://latch.tools/latch.js" defer></script>'; }); - Save and test. Latch auto-detects your site's search box, WooCommerce product forms and cart, and contact forms, 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 โLatch feature-detects WebMCP, so it stays inert for ordinary visitors โ zero risk to your conversion rate or Core Web Vitals.
Do it yourself instead
You can also implement WebMCP by hand with document.modelContext.registerTool for each site action and keep the schemas in sync as your theme and plugins change. Full control, ongoing maintenance โ see the full WebMCP guide for the raw API.
Which tools a WordPress site should expose
| Tool | What an AI browser can do |
|---|---|
search_site | Find posts, pages, or products by query |
add_to_cart | Add the right WooCommerce variant and move toward checkout |
submit_form | Complete a contact, booking, or lead form |
navigate | Jump to a page, product, or the cart |
Expose the actions a human visitor can already take that move them toward your goal. Keep anything destructive (delete account, cancel order) behind explicit confirmation.
FAQ
Do I need to build a plugin or pay for a plan?
No custom plugin and no MCP server โ WebMCP is client-side. You add one script tag via a header-scripts plugin (WPCode / Insert Headers and Footers) or your child theme. It works on any WordPress host.
Does it work with WooCommerce?
Yes. Latch auto-detects standard WooCommerce actions โ product search, add-to-cart, and cart/checkout navigation โ so an agentic browser can complete a purchase on a shopper's behalf.
Will it slow down or break my site?
No. It's a ~6 KB deferred script that stays completely inert in browsers without WebMCP, so human visitors 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 a WordPress SEO plugin or schema?
SEO plugins and schema help agents read your site. WebMCP lets agents act โ run your search, add the right variant to cart, and submit your forms.
Make your WordPress site agent-ready in one line
Agentic browsing is arriving while most WordPress sites are still unusable to agents. Being the site in your niche that an agent can use is a real, temporary edge.
<script src="https://latch.tools/latch.js" defer></script>Get started with Latch โSee also: the full WebMCP guide ยท WebMCP for Shopify ยท Latch pricing