Agent readinessโ€ขSeptember 28, 2026

    webMCP: Letting Browser Agents Call Your Page Actions Directly

    Register your page actions as tools a browser agent can call, instead of making it guess at buttons. What we detect, and a limit of our check.

    What we check

    We read the HTML of the page you scanned and look at its script tags. The check passes when either:

    • a script's type attribute contains webmcp, or
    • an inline script that the browser would run calls navigator.modelContext.

    We ignore scripts that browsers never execute, such as type="text/plain" code samples on documentation pages. A page that only writes about webMCP does not pass.

    One limit to know about

    We only read inline scripts. If your tool registration lives in a bundled file loaded with <script src="...">, we cannot see it, and the check reports "not detected" even though agents in the browser would find your tools. If you have implemented webMCP that way, the report is wrong for your site. A small inline registration, or a script tag with a webMCP type, makes it visible to us.

    What webMCP is

    A browser agent normally uses a site the way a person does: it reads the screen, clicks, types, and hopes the button it clicked was the right one. webMCP lets the page hand the agent a list of functions instead, such as "search products" or "add to cart", each with a description and typed inputs. The agent calls the function and gets a structured result back.

    The API lives at navigator.modelContext. It is a draft from the W3C Web Machine Learning Community Group, written by engineers at Google and Microsoft, and has been available in Chrome through an origin trial. The shape of the API can still change, so check the current explainer before you build on it.

    What a registration looks like

    <script>
      if ('modelContext' in navigator) {
        navigator.modelContext.registerTool({
          name: 'search_products',
          description: 'Search the catalog by keyword. Returns up to 20 products.',
          inputSchema: {
            type: 'object',
            properties: { query: { type: 'string' } },
            required: ['query'],
          },
          async execute({ query }) {
            const res = await fetch('/api/search?q=' + encodeURIComponent(query));
            return await res.json();
          },
        });
      }
    </script>

    The feature check matters. Browsers without webMCP skip the block, and your page works as before.

    Should you add it now?

    For most sites, it is early. Few agents can use webMCP today. It pays off first for sites with multi-step flows where agents often fail: booking, configurators, long forms and checkout.

    ๐Ÿ’ก Quick win

    Register your single most-used action, usually search, and keep the tool calling the same API your UI already uses. One well-described tool is more useful than ten vague ones.

    Was this article helpful?