Skip to main content
@mcp-b/webmcp-ts-sdk exposes BrowserMcpServer, the browser-adapted SDK layer that keeps the MCP transport model working even when tools register after the connection is already open.

When to use this package

  • You need direct control over the server instance instead of the automatic @mcp-b/global setup.
  • You are building a custom integration that needs to wrap or subclass the browser server behavior.
  • You need the SDK layer without the top-level global initializer.

When not to use this package

Where it sits in the package graph

This package sits between the strict runtime and the app-facing entry point. @mcp-b/global uses it to replace navigator.modelContext with a BrowserMcpServer.

First step

Create a BrowserMcpServer, connect a transport, then register tools as your page state changes. The reference page covers the server methods, backfill behavior, and transport lifecycle.