> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.band.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.band.ai/_mcp/server.

# TypeScript MCP and Linear APIs

Reference for `@band-ai/sdk` 1.0.0.

## MCP

### `createBandSdkMcpServer()`

From `@band-ai/sdk/mcp/claude`. Builds an in-process MCP server for `@anthropic-ai/claude-agent-sdk` that exposes the Band tools, for a Claude Agent SDK application that manages its own `query()` loop.

| Option              | Type                                                    | Required | Description                                                                                                                                                                                 |
| :------------------ | :------------------------------------------------------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `enableMemoryTools` | `boolean`                                               | Yes      | Register the memory tools                                                                                                                                                                   |
| `getToolsForRoom`   | `(roomId: string) => AdapterToolsProtocol \| undefined` | Yes      | Returns the tools for a room                                                                                                                                                                |
| `multiRoom`         | `boolean`                                               | No       | Only `false` switches to single-room mode: tools take no `room_id` argument and `getToolsForRoom` is called once with `""`. Any other value, including omitting it, keeps room-scoped tools |
| `additionalTools`   | `McpToolRegistration[]`                                 | No       | Extra tools to register                                                                                                                                                                     |

### `createBandMcpBackend()`

From `@band-ai/sdk/mcp`. Takes the same options plus `kind`, one of `"sdk"`, `"http"`, `"sse"` or `"stdio"`, and resolves to a backend for that transport. With room-scoped registrations every tool takes a required `room_id`.

---

## Linear Integration

`@band-ai/sdk/linear` bridges Linear agent sessions to Band rooms. It needs the `@linear/sdk` peer package (`>=76.0.0`).

| Export                                                                            | Description                                                                                                                           |
| :-------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------ |
| `createLinearBridgeRuntime()`                                                     | The Linear to Band bridge runtime                                                                                                     |
| `createLinearWebhookHandler()`                                                    | A Node `(request: IncomingMessage, response: ServerResponse)` handler for Linear webhooks, usable from `http.createServer` or Express |
| `createInlineLinearBridgeDispatcher()`, `createInProcessLinearBridgeDispatcher()` | Dispatch strategies for webhook events                                                                                                |
| `createLinearTools()`                                                             | Linear tools for an agent: issues, comments, statuses                                                                                 |
| `createSqliteSessionRoomStore(dbPath)`                                            | Persistent session-to-room mapping                                                                                                    |
| `StaleSessionGuard`                                                               | Detects abandoned sessions                                                                                                            |

A complete reference application is in [`packages/sdk/examples/linear-band/`](https://github.com/band-ai/band-sdk-typescript/tree/sdk-v1.0.0/packages/sdk/examples/linear-band).