WebMCP

WebMCP is an experimental browser API for registering JavaScript tools that compatible AI agents can invoke in the context of an open web page.

Published 2026-07-04
·
Updated 2026-07-22
·
3 min read

WebMCP

WebMCP is an experimental browser API that allows a web application to register JavaScript tools for compatible AI agents. In the current draft, a page uses document.modelContext.registerTool() to describe an action, its input schema, and the code that executes it.

That definition is deliberately narrow. WebMCP is not a generic label for every “MCP-compatible website,” not a metadata file, and not a search-ranking feature. The current specification is a Draft Community Group Report, not a W3C Standard or a standards-track recommendation.

What The Current Draft Defines

The imperative API attaches a ModelContext to the document. A page can register a named tool while it is active:

await document.modelContext.registerTool({
  name: "filter-products",
  description: "Filter the visible catalog by category and maximum price.",
  inputSchema: {
    type: "object",
    properties: {
      category: { type: "string" },
      maxPrice: { type: "number" }
    },
    required: ["category"]
  },
  annotations: { readOnlyHint: true },
  execute: async ({ category, maxPrice }) => {
    return applyVisibleFilters({ category, maxPrice });
  }
});

The registered action can reuse page state and existing client-side logic. The draft also defines origin exposure options, lifecycle behavior, and annotations such as readOnlyHint and untrustedContentHint.

The declarative form-based part of the specification is still unfinished. Do not describe automatic form conversion as a stable production capability.

WebMCP Versus MCP And OpenAPI

SurfaceRuns whereDescribesBest fit
WebMCPOpen browser documentPage-context JavaScript actionsVisible, user-supervised UI tasks
MCP serverServer or local runtimeTools, resources, and promptsAgent integrations independent of one open page
OpenAPIHTTP service documentationEndpoints, operations, schemas, and security schemesPublic or authorized API clients
Ordinary HTMLBrowser and search crawlerHuman-readable content and controlsDiscovery, explanation, and fallback UI

These layers can coexist. A product catalog may document an HTTP API with OpenAPI, expose selected workflows through an MCP server, and experiment with a WebMCP filter tool on the visible catalog page. One does not replace the others.

Appropriate First Uses

Good early experiments are narrow, visible, reversible, and already supported by the normal UI:

  • Filter or sort items that are already on screen.
  • Populate a draft form and let the user review it.
  • Run read-only analysis against data visible to the signed-in user.
  • Navigate a complex interface through existing checked actions.

Avoid starting with payment, account deletion, publication, permission changes, or any action whose authorization only exists in the tool description.

Security Boundaries

Tool metadata becomes part of an agent’s context, so descriptions and outputs can carry untrusted instructions. A useful implementation review covers:

  1. Authorization: the server must enforce the same permissions as the UI.
  2. Side effects: irreversible or paid actions require explicit confirmation.
  3. Input validation: accept only fields and values the underlying action supports.
  4. Origin exposure: expose tools only to intended origins.
  5. Untrusted content: label and sanitize tool output that contains user-controlled text.
  6. Fallback: keep the normal accessible UI because client support is not guaranteed.

An agent-readable description is documentation, not a security boundary.

SEO Impact

There is no documented WebMCP ranking signal, structured-data feature, or AI-citation benefit. A page still needs crawlable text, stable URLs, internal links, useful content, and a good page experience. Build WebMCP only when it improves a real user task for a supported agent runtime.

For a deeper implementation and product review, read WebMCP for SEO and Product Websites. Compare it with Model Context Protocol, API Catalog SEO, and A2A Agent Card.

Validation Checklist

  • Confirm the target browser or agent actually implements the draft.
  • Test registration, unregistration, cancellation, and duplicate names.
  • Verify authorization on the underlying server request.
  • Test malicious text in tool descriptions, inputs, and outputs.
  • Confirm high-impact actions cannot run without user review.
  • Preserve an accessible non-agent workflow.

Primary Sources

Q&A

Is WebMCP a W3C Standard?

No. The current document is a Draft Community Group Report from the Web Machine Learning Community Group. It is not a W3C Standard and is not on the W3C Standards Track.

Does WebMCP help a page rank or appear in AI search?

No documented ranking or citation benefit follows from registering a tool. WebMCP is an interaction API for compatible agents, while search eligibility still depends on ordinary crawling, indexing, quality, and page experience.

Is WebMCP the same as an MCP server?

No. WebMCP registers tools in the context of a browser document. An MCP server exposes tools and resources through an MCP transport outside the page.

Privacy & Cookies

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.