@mcp-b/global is the full runtime entry point for browser applications. It installs or adopts the strict WebMCP surface, creates a BrowserMcpServer, and connects transport behind document.modelContext.
When to use this package
- You want prompts, resources, browser transport, or direct access to the composed official MCP server.
- You want browser tools to be reachable by extensions, relays, or desktop MCP clients.
- You want one import that wires the runtime stack together.
When not to use this package
- You only need strict-core
registerToolbehavior. Use@mcp-b/webmcp-polyfill. - You are building a lower-level runtime integration. Use
@mcp-b/webmcp-ts-sdkdirectly.
Where it sits in the package graph
@mcp-b/global is the top of the runtime stack. It wraps the strict-core layer from @mcp-b/webmcp-polyfill, uses @mcp-b/webmcp-ts-sdk internally, and starts transports from @mcp-b/transports.
First step
Import the package as early as possible in the browser entry point, then usedocument.modelContext normally. Set options before the package loads. Call initializeWebModelContext() manually only after disabling auto-initialization, as shown on the reference page.
Related pages
Reference
Initialization, cleanup, transport configuration, and exported types.
Register prompts and resources
Use the MCP-B extension surface in an app.
Runtime layering
Understand how the runtime stack is assembled.
Connect desktop agents with local relay
Bridge browser tools into desktop MCP clients.
