@mcp-b/transports provides the transport classes that move MCP messages through browser boundaries such as tabs, iframes, extensions, and user scripts. It is the package you use when you need to choose or control the message path directly.
When to use this package
- You are connecting an MCP server or client across
postMessage, iframe, or extension boundaries. - You need direct access to transport options such as allowed origins or connection IDs.
- You are building on top of the lower-level browser transport primitives.
When not to use this package
- You want the runtime wired up automatically. Use
@mcp-b/global. - You want the high-level iframe custom element instead of raw iframe transports. Use
@mcp-b/mcp-iframe.
Where it sits in the package graph
The transport classes sit beside the SDK layer and under several higher-level packages.@mcp-b/global, @mcp-b/react-webmcp, and @mcp-b/mcp-iframe all depend on transport behavior.
