/** * Vibe MCP Server - Main Server * * MCP server that bridges AI clients with the Vibe browser extension. */ import { type ServerConfig, type ServerTransportMode, type ToolDefinition } from './types.js'; export declare const SET_REMOTE_TOOL: ToolDefinition; /** * Vibe MCP Server * * Exposes Vibe browser tools to MCP clients via stdio or streamable HTTP transport. */ export declare class VibeMcpServer { private readonly connection; private readonly config; private readonly sessions; private stdioServer; private httpApp; private httpServer; private shutdownStarted; constructor(config?: Partial); /** * Start the MCP server */ start(): Promise; /** * Shutdown the server */ stop(): Promise; /** * Return the configured MCP endpoint URL in HTTP mode. */ getHttpUrl(): string | null; /** * Return the configured transport mode. */ getTransportMode(): ServerTransportMode; /** * Set up extension connection events */ private setupConnectionEvents; /** * Create a configured MCP server instance. */ private createProtocolServer; private handleSetRemoteTool; private withDefaultPageStateFormat; private withFallbackPageContent; private takeMarkdownSnapshot; private findToolByName; /** * Start stdio MCP transport. */ private startStdioServer; /** * Start streamable HTTP MCP transport. */ private startHttpServer; /** * Handle a streamable HTTP request. */ private handleHttpRequest; /** * Resolve or create the HTTP session transport for a request. */ private resolveHttpTransport; /** * Create a new streamable HTTP session. */ private createHttpSession; /** * Notify all connected transports that the tool list changed. */ private notifyToolListChanged; private sendToolListChanged; /** * Try to populate the tool cache for an empty startup state, but never block the * `tools/list` response past `budgetMs`. A bounded refresh runs first, then (for * the extension backend) we wait out only the budget that remains. Whatever is * cached at the deadline is returned; tools that arrive later are pushed to the * client via `notifications/tools/list_changed`. This is the #14 hardening: the * handler latency is capped regardless of relay/extension startup state, so it * cannot exceed a client's tools/list startup timeout. */ private awaitStartupToolsWithinBudget; /** * Handle process termination. */ private registerProcessHandlers; private shutdown; /** * Log message if debug is enabled */ private log; } /** * Create and start the MCP server */ export declare function createServer(config?: Partial): Promise; //# sourceMappingURL=server.d.ts.map