/** * MCP transport implementations for different connection methods */ import { McpClientTransport } from './types'; /** * Configuration for stdio transport */ export interface StdioTransportConfig { /** Command to execute */ command: string; /** Command arguments */ args: string[]; /** Working directory */ cwd?: string; /** Environment variables */ env?: Record; /** Connection timeout in milliseconds */ timeout?: number; /** Authentication configuration */ auth?: { /** Local port for OAuth callback server */ callbackPort?: number; /** Wait for authentication timeout */ authTimeout?: number; }; } /** * Configuration for HTTP transport */ export interface HttpTransportConfig { /** Server URL */ url: string; /** Optional HTTP headers */ headers?: Record; /** Authentication configuration */ auth?: { method: "bearer" | "basic" | "oauth"; token?: string; username?: string; password?: string; clientId?: string; clientSecret?: string; redirectUri?: string; }; } /** * Creates a stdio transport for MCP * @param config Stdio transport configuration * @returns Stdio client transport instance */ export declare function createStdioTransport(config: StdioTransportConfig): McpClientTransport; /** * Configuration for SSE transport */ export interface SseTransportConfig { /** Server URL */ url: string; /** Authentication configuration */ auth?: { method: "bearer" | "basic" | "oauth"; token?: string; username?: string; password?: string; clientId?: string; clientSecret?: string; redirectUri?: string; }; /** Optional additional headers */ headers?: Record; } /** * Creates an HTTP transport for MCP * @param config HTTP transport configuration * @returns HTTP client transport instance */ export declare function createHttpTransport(config: HttpTransportConfig): McpClientTransport; /** * Creates an SSE transport for MCP * @param config SSE transport configuration * @returns SSE client transport instance */ export declare function createSseTransport(config: SseTransportConfig): McpClientTransport;