Key Components
W3C Web Model Context API
Standard browser API (
navigator.modelContext) for registering tools - the WebMCP specificationMCP-B Polyfill & Bridge
Implements navigator.modelContext for current browsers and translates between WebMCP and MCP protocols
Transport Layer
Communication between browser contexts (tabs, extensions, pages)
MCP-B Extension
Development and testing tool that collects WebMCP servers from tabs and supports userscript injection
High-Level Architecture
Component Interaction Flow
Data Flow
Understanding how data flows through WebMCP when AI agents interact with your website tools.Tool Execution Flow
The following diagram shows how the extension maintains a fresh tool list and handles AI requests:How It All Works Together
- Your website registers tools using
navigator.modelContext.registerTool() - The MCP-B polyfill implements the WebMCP API and translates to MCP protocol
- Transport layers handle communication between different browser contexts
- The MCP-B extension aggregates tools from all tabs and exposes them to AI agents
- AI agents discover available tools and execute them on behalf of users
