UNPKG

remcode

Version:

Turn your AI assistant into a codebase expert. Intelligent code analysis, semantic search, and software engineering guidance through MCP integration.

59 lines (58 loc) 1.48 kB
/** * SSE (Server-Sent Events) Handler for MCP Tools * * Provides real-time streaming communication for MCP Inspector integration * without STDIO bridge compatibility issues. */ import { Request, Response } from 'express'; /** * SSE connection management for MCP tools */ export declare class SSEHandler { private activeConnections; private connectionCounter; /** * Initialize SSE connection for MCP Inspector */ initializeConnection(req: Request, res: Response): string; /** * Send Server-Sent Event to client */ private sendEvent; /** * Broadcast event to all active connections */ private broadcast; /** * Handle MCP tool execution via SSE */ handleMCPToolRequest(req: Request, res: Response, toolHandlers: any): Promise<void>; /** * Execute Pinecone handler */ private executePineconeHandler; /** * Execute GitHub handler */ private executeGitHubHandler; /** * Execute HuggingFace handler */ private executeHuggingFaceHandler; /** * Execute other handlers (Setup, Search, Processing, etc.) */ private executeOtherHandler; /** * Handle SSE health check */ handleHealthCheck(req: Request, res: Response): void; /** * Handle SSE tool listing */ handleToolList(req: Request, res: Response): void; /** * Close all active connections */ closeAllConnections(): void; }