/** * Trellis Room MCP bridge — stdio proxy to a remote Streamable HTTP room. * * For MCP clients that only support stdio (Claude Desktop, older configs): * * npx trellis mcp bridge --room https://my-room.sprites.app * * @module trellis/mcp */ import { Client } from '@modelcontextprotocol/sdk/client/index.js'; import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'; import { Server } from '@modelcontextprotocol/sdk/server/index.js'; export interface RoomMcpBridgeOptions { /** Room base URL or full `/mcp` URL. Falls back to `.trellis-db.json`. */ room?: string; /** API key. Falls back to `.trellis-db.json`. */ apiKey?: string; /** Directory containing `.trellis-db.json`. */ configDir?: string; /** Default tenant for all tool calls (e.g. embed-design-review). */ tenant?: string; /** Playground `?room=` slug → tenant `embed-{slug}`. */ playgroundRoom?: string; /** Suppress stderr startup line (for harness / IDE configs). */ quiet?: boolean; } export interface ResolvedRoomMcpBridgeConfig { url: string; apiKey?: string; tenantId?: string | null; } /** Normalize a room base URL to the Streamable HTTP MCP endpoint. */ export declare function resolveRoomMcpUrl(baseUrl: string): string; /** Resolve room URL + API key from CLI flags or `.trellis-db.json`. */ export declare function resolveBridgeConfig(opts: RoomMcpBridgeOptions): ResolvedRoomMcpBridgeConfig; /** Connect an MCP client to a remote Trellis room. */ export declare function connectRemoteRoomClient(config: ResolvedRoomMcpBridgeConfig): Promise<{ client: Client; transport: StreamableHTTPClientTransport; }>; /** Local MCP server that forwards tool calls to a remote room client. */ export declare function createRoomMcpProxyServer(remote: Client): Server; /** Run stdio MCP bridge until stdin closes or the process is interrupted. */ export declare function runRoomMcpBridge(opts: RoomMcpBridgeOptions): Promise; //# sourceMappingURL=bridge.d.ts.map