UNPKG

@toolprint/hypertool-mcp

Version:

HyperTool MCP proxy server for routing requests between clients and multiple underlying MCP servers

38 lines • 1.51 kB
/** * Connection factory for creating transport-specific connections */ import { ServerConfig, StdioServerConfig, HttpServerConfig, SSEServerConfig } from "../types/config.js"; import { Connection, ConnectionOptions, ConnectionFactory as IConnectionFactory } from "./types.js"; import { StdioConnection } from "./clients/stdio.js"; import { HttpConnection } from "./clients/http.js"; import { SSEConnection } from "./clients/sse.js"; /** * Factory for creating connections based on server configuration */ export declare class ConnectionFactory implements IConnectionFactory { /** * Create a connection based on server configuration */ createConnection(serverName: string, config: ServerConfig, options?: ConnectionOptions): Connection; /** * Create a stdio connection */ createStdioConnection(serverName: string, config: StdioServerConfig, options?: ConnectionOptions): StdioConnection; /** * Create an HTTP connection */ createHttpConnection(serverName: string, config: HttpServerConfig, options?: ConnectionOptions): HttpConnection; /** * Create an SSE connection */ createSSEConnection(serverName: string, config: SSEServerConfig, options?: ConnectionOptions): SSEConnection; /** * Validate if a server configuration is supported */ isConfigSupported(config: ServerConfig): boolean; /** * Get supported transport types */ getSupportedTransports(): string[]; } //# sourceMappingURL=factory.d.ts.map