WebMCP documentation and developer tools
Browser API guides, working tutorials, polyfills, React packages, extensions, and debugging tools.
New: The OpenAI WebMCP Challenge is live. Enter the challenge.
Read What is WebMCP?, WebMCP vs MCP, and Choose a runtime.
Live on this page
This page has a real WebMCP tool. Try calling it.
The tool below is registered right now using document.modelContext.registerTool(). Use the Rook extension or Chrome’s native WebMCP support to call it from an AI agent.
Tool registration (live)
Resource registration (MCP-B)
Continue with the first tool tutorial, the official @w3c/webmcp-polyfill, or the @mcp-b/webmcp-ts-sdk reference.
Packages
Browse the package set in one place.
These are the main packages in the workspace, grouped by the standard boundary.
Core WebMCP
| Package | Description |
|---|---|
Deprecated. Use @w3c/webmcp-polyfill for the standard API; this package keeps temporary declarative tools | |
| React hook for tool registration with automatic lifecycle |
MCP-B
| Package | Description |
|---|---|
| Entry point — sets up polyfill + MCP server in one import | |
| WebMCP adapter over the official MCP TypeScript SDK | |
| PostMessage and WebSocket transports for cross-context communication | |
| Bridges tools across iframes via PostMessage | |
| React provider and hooks for MCP-B extensions |
Calling tools
| Package | Description |
|---|---|
| Bridges browser tools to desktop MCP clients via WebSocket + stdio |
