@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/globalsetup. - 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
- You are building a typical web application. Start with
@mcp-b/global. - You only need the strict WebMCP surface. Use
@mcp-b/webmcp-polyfill.
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 aBrowserMcpServer, connect a transport, then register tools as your page state changes. The reference page covers the server methods, backfill behavior, and transport lifecycle.
Related pages
Reference
BrowserMcpServer APIs, dynamic registration behavior, and backfill helpers.
Runtime layering
See how this layer fits between the polyfill and @mcp-b/global.
WebMCP vs MCP
Why browser runtimes need a different registration model.
Transports overview
Pick the transport that connects your server.
