> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mcp-b.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# @mcp-b/global overview

> When to use the full MCP-B runtime entry point, what it adds on top of WebMCP, and how it relates to the lower layers.

`@mcp-b/global` is the full MCP-B runtime entry point for browser applications. It installs or adopts the package-supported 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 browser tool registration and discovery. Use [`@mcp-b/webmcp-polyfill`](/packages/webmcp-polyfill/overview).
* You are building a lower-level runtime integration. Use [`@mcp-b/webmcp-ts-sdk`](/packages/webmcp-ts-sdk/overview) directly.

## Where it sits in the package graph

`@mcp-b/global` is the top of the runtime stack. It wraps [`@mcp-b/webmcp-polyfill`](/packages/webmcp-polyfill/overview), uses [`@mcp-b/webmcp-ts-sdk`](/packages/webmcp-ts-sdk/overview) internally, and starts transports from [`@mcp-b/transports`](/packages/transports/overview).

## First step

Import the package as early as possible in the browser entry point, then use `document.modelContext` normally. Set options before the package loads. Call `initializeWebModelContext()` manually only after disabling auto-initialization, as shown on the [reference page](/packages/global/reference#configuration).

## Related pages

<CardGroup cols={2}>
  <Card title="Reference" icon="book-open" href="/packages/global/reference">
    Initialization, cleanup, transport configuration, and exported types.
  </Card>

  <Card title="Register prompts and resources" icon="folder-tree" href="/how-to/register-prompts-and-resources">
    Use the MCP-B extension surface in an app.
  </Card>

  <Card title="Runtime layering" icon="bars-staggered" href="/explanation/architecture/runtime-layering">
    Understand how the runtime stack is assembled.
  </Card>

  <Card title="Connect desktop agents with local relay" icon="tower-broadcast" href="/how-to/connect-desktop-agents-with-local-relay">
    Bridge browser tools into desktop MCP clients.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.