WebMCP
WebMCP is a proposed browser API (developed in the W3C Web Machine Learning Community Group) that lets web applications register JavaScript-based tools—functions described in natural language with structured input schemas—that browser-integrated or browser-hosted AI agents can discover and invoke without scraping the UI. Conceptually, a page using WebMCP behaves like a Model Context Protocol (MCP) server whose tools run in client-side script instead of on a remote backend.
Why It Matters
Today, agents often simulate clicks or parse DOM to act inside web apps, which is brittle and inaccessible. WebMCP offers a first-class, permission-aware channel so agents call the same business logic your UI uses, with explicit schemas and user mediation. For product and marketing teams, adoption could reshape how "agentic" workflows interact with public and authenticated web surfaces.
How It Works
Authors register tools against a model context exposed by the user agent (for example via `registerTool()`), supplying a name, human-readable description, JSON Schema for inputs, and a callback that runs trusted page logic when an agent invokes the tool. The browser mediates discovery and execution so agents do not bypass security boundaries arbitrarily. WebMCP complements remote MCP servers: backend MCP connects agents to databases and APIs; WebMCP exposes capabilities that only exist inside the rendered web application session.
Use Cases
- E-commerce flows where an in-browser agent applies a coupon, checks inventory, or updates a cart through registered tools rather than UI automation
- SaaS dashboards that let an assistant run saved reports or filters using the app’s own client-side validation
- Support consoles where agents draft replies but must invoke approved "send" or "escalate" tools with explicit parameters
- Accessibility-adjacent scenarios where structured tool invocation parallels assistive technology patterns
Best Practices
- Treat WebMCP as experimental until browser support and the specification stabilize; feature-detect and degrade gracefully
- Design tools around minimal, well-scoped actions with clear JSON Schema so agents cannot over-invoke broad capabilities
- Mirror authorization rules from your API: registering a tool must not grant agents more power than an authenticated human user in the same session
- Prefer reusing existing domain logic inside tool callbacks instead of duplicating business rules for agents
- Stay current with the draft spec and security guidance from implementers (for example Chrome for Developers) as the threat model evolves
Frequently Asked Questions
Is WebMCP the same as MCP? +
Is WebMCP a finished web standard? +
Does WebMCP affect SEO or AI citations of public pages? +
Related Terms
Measure AI visibility while the stack evolves
Track how AI systems surface your brand and content across assistants and answer engines as agentic browsing matures.
No credit card required • Start in minutes