DEV Community

Robert
Robert

Posted on • Originally published at latch.tools

Make any website agent-ready in one line (WebMCP, navigator.modelContext)

In mid-2026 a quiet fact about the "agentic web" still holds: none of the big agents call navigator.modelContext tools directly in production yet. ChatGPT Agent, Gemini, Perplexity, Claude — they still mostly DOM-scrape or take screenshots and guess where to click. That's slow, brittle, and burns tokens.

WebMCP fixes the mechanism. Your site declares toolssearchProducts, addToCart, submitLead — each with a name, a JSON schema, and an execute callback. An agent makes one structured call and gets JSON back, instead of clicking through your filter dropdowns. Chrome shipped the early preview in 146 (Feb 2026); Edge 147 ships it natively; Chrome 149 is now in an open origin trial (announced at Google I/O, May 2026), with DevTools support for inspecting registered tools. Benchmarks from Chrome Labs show large token reductions vs. screenshot automation.

The catch: wiring navigator.modelContext.registerTool() for every search box, cart action, and form on a real site — with auth, schemas, and a polyfill so it works in browsers that don't have it yet — is real work.

The one-line version

Latch is an open-source (MIT) script that does the wiring for you:

<script src="https://latch.tools/latch.js" data-key="YOUR_KEY"></script>
Enter fullscreen mode Exit fullscreen mode

It introspects your search, cart, and forms and registers them as WebMCP tools, with a polyfill so today's agent browsers and extensions can call them now. You keep your existing UI; agents get a structured contract.

Why bother before agents "officially" support it

Two reasons. First, agent browsers and extensions that do read navigator.modelContext already exist, and the standard is landing in stable Chrome/Edge fast — being early is cheap insurance. Second, you can't improve what you can't see: when an agent does hit your site, you want to know which one, and what it tried to do. Latch's optional hosted analytics (Latch Pro, EUR 19/mo per project) shows per-agent breakdowns and a full event feed; the OSS client is free.

Try it

The web spent 30 years optimizing for human clicks and search crawlers. The next layer is tools for agents — and it's a one-liner to get on it.


Disclosure: I work on Latch. WebMCP itself is an open W3C Community Group standard — you can implement navigator.modelContext by hand without any library; Latch just automates the wiring.

Top comments (0)