) that auto-detects your search, cart, and forms and exposes them as WebMCP tools with no rewrite."}}, {"@type":"Question","name":"Which browsers support WebMCP?","acceptedAnswer":{"@type":"Answer","text":"WebMCP support shipped in Chrome 146 and Edge 147 in 2026, with other agentic browsers and agent runtimes adopting the navigator.modelContext shape. Latch feature-detects support and stays inert where it is absent."}}, {"@type":"Question","name":"Is WebMCP a security or privacy risk?","acceptedAnswer":{"@type":"Answer","text":"WebMCP only exposes the actions you choose, the same actions a human can already take on your site. Latch never sends form contents or query strings anywhere; its optional analytics record only tool name, outcome, and page path."}} ] }
WebMCP guide ยท 2026

WebMCP: how to make your website usable by AI agents

AI browsers are starting to click through the web on people's behalf. On most sites they fail โ€” because a model reading raw HTML is guessing. WebMCP fixes that by letting your site hand agents real tools. Here's what it is, why it matters now, and how to add it in one line.

Last updated 9 June 2026 ยท ~6 min read

TL;DR

WebMCP is a browser standard (navigator.modelContext) that lets your website expose its search, cart, and forms as tools an AI agent can call โ€” no MCP server, no backend. You can code it yourself, or add Latch with one script tag and it auto-exposes your existing UI:

<script src="https://latch.tools/latch.js" defer></script>Get Latch โ†’

What is WebMCP?

WebMCP is a web standard that lets a page declare its own capabilities as structured tools an AI agent can invoke, through the browser API navigator.modelContext. It brings the idea behind the Model Context Protocol (MCP) โ€” giving models well-defined tools instead of free-text guessing โ€” directly into the web page, client-side.

Instead of an agent screen-scraping your markup and hoping the right button is the third <div> with an onclick, your site says: "Here is a search_site tool, here is add_to_cart, here is submit_form โ€” call them with these arguments." The agent calls the tool; your existing page handler runs.

Why WebMCP matters in 2026

Three things happened close together:

Being agent-readable is becoming what mobile-friendly was in 2012: first a niche edge, then table stakes.

The problem: AI agents fail on normal websites

A model pointed at your raw HTML has to infer intent from a soup of divs, ARIA labels, and inline handlers. It mis-clicks, submits the wrong form, abandons multi-step flows, and burns tokens doing it. Your analytics just show a weird bounce. The agent โ€” and the customer behind it โ€” moves on to a competitor whose site it could drive.

How WebMCP works

At its core you register a tool: a name, a description, an input schema, and a handler that does the thing your site already does.

// Native WebMCP โ€” registering one tool by hand
navigator.modelContext.registerTool({
  name: "search_site",
  description: "Search products on this store",
  inputSchema: { type: "object", properties: { q: { type: "string" } }, required: ["q"] },
  async execute({ q }) {
    location.href = "/search?q=" + encodeURIComponent(q);
    return { ok: true };
  }
});

That's one tool. A real site has search, filters, a cart, a booking form, a contact form, account actions โ€” each needs a tool, an honest schema, and wiring to the live DOM. Multiply by every page and keep it in sync as the UI changes. That's the work WebMCP creates.

How to add WebMCP to your site

Option A โ€” write it yourself

Use navigator.modelContext.registerTool (and provideContext for page-scoped tools) for every action, maintain the schemas, and feature-detect support so non-agentic browsers are unaffected. Full control; ongoing maintenance.

Option B โ€” add Latch (one line)

Latch is an open-source client that auto-detects the actionable elements already on your page โ€” your search box, "add to cart" buttons, and forms โ€” and exposes them as WebMCP tools automatically. No server, no rewrite, no schema babysitting.

<script src="https://latch.tools/latch.js" defer></script>Get Latch โ†’

Latch feature-detects WebMCP, so it stays completely inert in browsers that don't support it โ€” zero risk to your existing visitors.

Which tools should you expose?

ToolWhat an agent can do
search_siteFind products, docs, or listings by query
add_to_cartAdd an item and move toward checkout
submit_formFill and send a contact, booking, or signup form
navigateJump to a known section or page

Rule of thumb: expose the actions a human can already take and that move them toward your goal โ€” buying, booking, signing up. Don't expose anything destructive without confirmation.

See which AI agents actually use your site

Once agents can use your site, the next question is which agents are visiting and what they're doing. Latch's optional analytics show tool calls, success rates, and a per-agent breakdown โ€” privacy-safe (tool name, outcome, and page path only; never form contents or query strings). It's how you find out the agentic-traffic story your normal analytics can't tell.

FAQ

What is WebMCP, in one sentence?

A browser standard that lets your website hand AI agents real, callable tools (search, cart, forms) instead of making them guess from raw HTML.

Do I need to host an MCP server?

No โ€” WebMCP runs in the browser on your existing page. There's nothing extra to host. Latch adds it with one script tag.

Which browsers support WebMCP?

Support shipped in Chrome 146 and Edge 147 in 2026, with other agentic browsers adopting the same navigator.modelContext API. Latch feature-detects and stays inert elsewhere.

Is it a security or privacy risk?

You only expose the actions you choose โ€” the same ones a human can already take. Latch never transmits form contents or query strings; its analytics record only tool name, outcome, and page path.

How is this different from SEO or schema.org?

SEO and schema help agents read your content. WebMCP lets agents act โ€” actually run your search, add to cart, and submit forms.

Make your site agent-ready in one line

The agentic web is arriving while most sites are still unusable to agents. Being first in your niche is a real, temporary edge.

<script src="https://latch.tools/latch.js" defer></script>Get started with Latch โ†’