/** * HTTP connection management for MCP servers */ import type { HttpServerConfig } from '../types/config.js'; import { type Logger } from '../utils/logger.js'; /** * HTTP transport configuration for MCP client */ export interface HttpTransportConfig { /** The URL to connect to */ url: string; /** Optional headers to include with requests */ headers?: Record; } /** * Manages HTTP connections for MCP servers * * Note: This class provides the configuration needed for the MCP SDK's * StreamableHTTPClientTransport. The actual transport creation is handled * by the SDK. */ export declare class HttpConnection { private config; private logger; private connected; constructor(serverName: string, config: HttpServerConfig, logger?: Logger); /** * Gets the transport configuration for the MCP SDK */ getTransportConfig(): HttpTransportConfig; /** * Gets the URL for this connection */ getUrl(): string; /** * Marks the connection as established */ markConnected(): void; /** * Marks the connection as disconnected */ markDisconnected(): void; /** * Checks if the connection is marked as connected */ isConnected(): boolean; /** * Validates the HTTP configuration */ validate(): { valid: boolean; error?: string; }; /** * Performs a basic connectivity check (HTTP HEAD request) */ checkConnectivity(): Promise<{ reachable: boolean; error?: string; }>; } /** * Creates fetch options with the configured headers */ export declare function createFetchOptions(config: HttpServerConfig, method?: string, body?: string): RequestInit; //# sourceMappingURL=http-connection.d.ts.map