What is WebMCP, and how do you add it to your website?

WebMCP is a proposed web standard that lets a website publish tools, named actions with a description and an input schema, for AI agents in the browser to call. The agent runs your page's own code in the open tab instead of guessing where to click, and the user keeps working on the same page.

By PloyThe Ploy teamUpdated October 21, 2026

WebMCP is a draft standard with early support in Chrome and ChatGPT

Browser support changes quickly. Each line comes from the sources at the bottom of this page.

  • Specification

    Draft

    A Draft Community Group Report from the W3C Web Machine Learning Community Group. It is not a W3C Standard and is not on the W3C Standards Track. Its editors work at Microsoft and Google.

  • Chrome

    Origin trial

    Available for local testing since Chrome 146 (Chrome’s docs use chrome://flags/#enable-webmcp-testing). An origin trial that lets a site turn it on for its visitors began in Chrome 149 and is extended on desktop through Chrome 162.

  • Chrome shipping

    Not scheduled

    Chrome Platform Status lists WebMCP as Proposed, with no shipping milestone yet.

  • ChatGPT

    Rolling out

    ChatGPT calls its implementation Site tools. In the ChatGPT desktop app’s built-in browser, ChatGPT Work and Codex can find and use JavaScript tools, depending on rollout and workspace settings. Form tools and tools inside iframes are not supported.

  • Firefox and Safari

    No signal

    Chrome Platform Status shows no public position from Firefox or from WebKit, the engine behind Safari.

Expose tools with an HTML form or with JavaScript

Both APIs give the agent the same thing: a tool with a name, a description and an input schema. Pick the one that matches how the action already works on your page. Ploy’s WebMCP Ploybook builds JavaScript tools connected to your existing page logic.

HTML forms

Declarative API

Add toolname and tooldescription to an existing form. The browser turns its fields into the input schema, and toolparamdescription explains each field. Without toolautosubmit, the agent fills in the form and the user presses submit.

Best for forms that already work, such as demo requests, searches and sign-ups

Example form
<form toolname="request_demo"
      tooldescription="Request a product demo for the visitor's company.">
  <input name="email" type="email" required
         toolparamdescription="Work email address">
  <input name="company" required
         toolparamdescription="Company name">
  <button type="submit">Request demo</button>
</form>
JavaScript

Imperative API

Call document.modelContext.registerTool() with a name, a description, a JSON Schema and an execute function. Annotations such as readOnlyHint tell the agent what the tool changes.

Best for calculators, filters, editors and other actions that live in app state

Example tool registration
// In a <script type="module">, so top-level await works
if ('modelContext' in document) {
  await document.modelContext.registerTool({
    name: 'filter_results',
    description: 'Filter the visible results by category and maximum price.',
    inputSchema: {
      type: 'object',
      properties: {
        category: { type: 'string', enum: ['plans', 'add-ons'] },
        maxPrice: { type: 'number' },
      },
      required: ['category'],
    },
    annotations: { readOnlyHint: true },
    execute: (input) => applyFilters(input), // your existing page logic
  });
}

WebMCP, MCP and llms.txt do three different jobs

WebMCP lets an agent act on a page, MCP connects an agent to a service, and llms.txt tells an agent what to read. A site can use all three, and ploy.ai does.

QuestionWebMCPMCPllms.txt
What it isA browser API for tools that a web page registersAn open protocol that connects AI apps to local or remote serversA Markdown file at /llms.txt that summarizes a site and links its key pages
Where it runsIn the open browser tab, using the page’s JavaScriptOn a server that the AI app connects toA static file the agent fetches
What the agent can doCall actions on the page the user is viewingCall tools and read data without a page openFind and read the pages you chose
User setupNone; the agent finds tools when it visits the pageAdd the server to the AI app and sign inNone
StatusDraft standard; Chrome origin trial and ChatGPT Site toolsOpen protocol introduced by Anthropic in November 2024Community proposal from 2024; Google says AI text files aren’t needed for its AI search features
On ploy.aiTools on /migration-cost-calculator and /marketing-stackPloy MCP at ploy.ai/api/mcpploy.ai/llms.txt

How Ploy adds WebMCP in five steps.

  1. Verify current support

    Ploy checks the current WebMCP specification, browser requirements, imperative API, and documented assistant support against primary sources.

  2. Inspect the site and choose actions

    Existing routes, controls, application logic, permissions, and confirmation flows are reviewed so only real, safe capabilities are proposed.

  3. Define the tool contracts

    The approved actions become a minimal set of clear tool names, strict input schemas, expected results, page scope, and visible effects.

  4. Implement WebMCP

    Ploy registers tools early, connects them to the existing application controller, preserves authorization, and adds bounded readiness, cancellation, and cleanup behavior.

  5. Validate and hand off

    Focused automated checks verify registration and behavior, then Ploy provides exact browser and assistant tests with proven results and known limitations clearly separated.

Treat every tool as an action an agent takes for your user

Chrome warns about prompt injection through tool descriptions and tool output. These six practices follow its security guidance.

  1. Expose only what the user can already do

    A tool runs with the visitor’s existing session. Keep server-side authorization on every request it makes, and never add a shortcut the interface doesn’t have.

  2. Mark actions that matter

    Set consequentialHint on purchases, messages and deletions so the agent can ask the user first. Set readOnlyHint on tools that change nothing.

  3. Flag untrusted output

    If a tool returns user-generated or third-party content, set untrustedContentHint so the agent treats it as data, not instructions.

  4. Keep tools first-party

    The tools Permissions Policy defaults to self, so a cross-origin iframe can’t register tools unless you allow it. Share a tool with another origin only through exposedTo.

  5. Keep descriptions short

    Chrome suggests at most 30 characters per tool name, 500 per tool description, 150 per parameter description and 1,500 per tool result.

  6. Expect the agent to check too

    ChatGPT treats tool definitions and results as untrusted and reviews each call in its built-in browser before it runs.

ploy.ai runs WebMCP on its migration cost calculator

Open the migration cost calculator in a browser with WebMCP turned on and an agent finds one tool, estimate_migration_cost. It takes a public URL, runs the same scan a visitor sees on the page and shows the directional estimate there.

The tool is read-only. It doesn’t migrate a site, create an account or produce a vendor quote. It registers early in the page, before the calculator loads, then waits up to eight seconds for the calculator to connect and returns an error instead of running a second, hidden scan.

The marketing stack calculator has a second tool, calculate_marketing_stack_cost.

Tool definition on ploy.ai/migration-cost-calculator (abridged)
{
  name: 'estimate_migration_cost',
  description:
    'Scan one public website and show its directional migration cost and ' +
    'timeline estimate in the open Ploy calculator. ... This does not ' +
    'migrate the site, create an account, or produce a vendor quote.',
  inputSchema: {
    type: 'object',
    properties: {
      url: { type: 'string', minLength: 3, maxLength: 2048 },
    },
    required: ['url'],
    additionalProperties: false,
  },
  annotations: { readOnlyHint: true, untrustedContentHint: true },
}
Frequently asked

WebMCP questions

No. MCP connects an AI app to a local or remote server and works without a web page open. WebMCP lets a web page register tools that an agent in the browser can call while the user is on that page. A site can support both, as ploy.ai does with the Ploy MCP and its calculator tools.
Yes, but the change is small. For a form, you add a few attributes. For actions in your app, you register tools with JavaScript that call your existing logic. Visitors without WebMCP see the same page as before.
No. llms.txt is a Markdown file that helps agents find and read your content. WebMCP lets agents take actions on a page. They solve different problems, and a site can publish both.

Sources

  1. WebMCPChrome for Developers
  2. WebMCP declarative APIChrome for Developers
  3. WebMCP imperative APIChrome for Developers
  4. Secure your WebMCP toolsChrome for Developers
  5. WebMCP, Draft Community Group ReportW3C Web Machine Learning Community Group
  6. WebMCP feature statusChrome Platform Status
  7. Site toolsChatGPT

Add WebMCP to your website with Ploy.

Ploy checks current support, picks the actions worth exposing, builds the tools on your real page logic and hands you the tests. Each run uses AI credits.