TL;DR: WebMCP lets you turn JavaScript functions into AI-accessible tools using
navigator.modelContext.registerTool(). AI agents can then discover and call these tools to help users interact with your website.What is WebMCP?
WebMCP (Web Model Context Protocol) is a W3C web standard currently being incubated by the Web Machine Learning Community Group that defines how websites expose structured tools to AI agents through the browser’snavigator.modelContext API.
- W3C Specification: github.com/webmachinelearning/webmcp
- Technical Proposal: WebMCP API Proposal
Design Philosophy
WebMCP is built on a human-in-the-loop philosophy where the human web interface remains primary and AI agents augment (rather than replace) user interaction. This means:- Users maintain visibility and control over all agent actions
- Tools enable collaborative workflows between humans and AI
- The web page UI remains the primary interaction method
Relationship to MCP
WebMCP is inspired by Anthropic’s Model Context Protocol (MCP) but adapted specifically for web browsers. While WebMCP shares similar concepts with MCP (tools, resources, structured communication), it is evolving as an independent web standard with its own specification path.Key Architectural Decision: SDK vs Transport
The W3C community decided to implement WebMCP as an SDK/abstraction layer rather than a pure transport. This architectural choice provides important benefits:- Browser implements WebMCP primitives -
navigator.modelContextis a web-native API, not just a message pipe - Protocol independence - Browsers can maintain backwards compatibility as MCP evolves without breaking existing implementations
- Platform-specific security - Web security models (same-origin policy, CSP) are natively enforced at the browser level
- Declarative future - Enables future declarative APIs (e.g., manifest-based tool registration)
- W3C API polyfill - Implements
navigator.modelContextfor browsers that don’t yet support it natively - Translation layer - Bridges between WebMCP’s web-native API and the MCP protocol
- Tools declared in WebMCP format to work with MCP clients
- Tools declared in MCP format to work with WebMCP browsers
- Version independence as both standards evolve
- Web-specific security features (same-origin policy, CSP)
Complementary, Not Competing
Both protocols serve different purposes and can work together:- Use MCP for backend services, server-to-agent communication, headless integrations
- Use WebMCP for browser-based tools, user-present workflows, client-side interactions
- Both protocols can coexist in the same application
