Skip to main content
@mcp-b/webmcp-polyfill installs the strict WebMCP core on navigator.modelContext when the browser does not ship it yet. It is the runtime choice for teams that want the browser-facing standard surface without MCP-B-only extensions.

When to use this package

  • You want registerTool and unregisterTool in browsers today.
  • You are building a site or reusable library that wants to stay close to the W3C surface.
  • You want to pair runtime behavior with @mcp-b/webmcp-types for type inference.

When not to use this package

Where it sits in the package graph

This package sits directly above @mcp-b/webmcp-types. The full runtime in @mcp-b/global wraps the polyfill when it initializes.

First step

Initialize the polyfill before your app registers tools. The reference page documents the initialization options, testing shim behavior, and the strict-core lifecycle.