Skip to navigation

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.

OptionTypeRequiredDescription
enableMemoryToolsbooleanYesRegister the memory tools
getToolsForRoom(roomId: string) => AdapterToolsProtocol | undefinedYesReturns the tools for a room
multiRoombooleanNoOnly 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
additionalToolsMcpToolRegistration[]NoExtra 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).

ExportDescription
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
StaleSessionGuardDetects abandoned sessions

A complete reference application is in packages/sdk/examples/linear-band/.