Skip to main content
Packages are the primary entry point for this documentation. Start with a package overview when you need to choose the right building block, then move into that package’s reference page for API details. The standard API has official packages outside this monorepo. Install @w3c/webmcp-polyfill, the W3C Community Group polyfill, for document.modelContext, and webmcp-types for its TypeScript types, as Chrome’s Imperative API guide recommends. @mcp-b/webmcp-types is deprecated and only forwards webmcp-types. The packages below connect a page to MCP clients and add MCP features. Cross-package concepts stay in Explanation; task-oriented setup stays in Tutorials and How-To Guides.

Core runtime

@mcp-b/webmcp-polyfill

Deprecated pass-through over @w3c/webmcp-polyfill that keeps temporary declarative tools until the official polyfill ships them.

@mcp-b/global

Full MCP-B runtime entry point that layers transport and extension APIs on top of the WebMCP surface.

@mcp-b/webmcp-ts-sdk

Browser adapter that provides BrowserMcpServer, MCP-B extensions, and schema helpers.

@mcp-b/transports

Tab, iframe, and extension transport classes for moving MCP messages through browser boundaries.

@mcp-b/mcp-iframe

Custom element that exposes tools, prompts, and resources from an iframe to its parent page.

React

usewebmcp

React hook for registering document.modelContext tools without the broader MCP-B runtime layer.

@mcp-b/react-webmcp

Full React integration for MCP-B, including tool hooks, prompts, resources, and client providers.

Tooling

@mcp-b/webmcp-extension

Chromium MV3 template and isolated-world client helper for installing WebMCP and calling page tools, including declarative tools, from an extension.

@mcp-b/webmcp-local-relay

Local relay server that connects browser-hosted WebMCP tools to desktop MCP clients over stdio and WebSocket.

@mcp-b/smart-dom-reader

Token-efficient DOM extraction library for AI agents, selector generation, and structured page understanding.