export interface InitializeParams {
    protocolVersion: string;
    capabilities: {
        tools?: object;
        resources?: object;
        prompts?: object;
        sampling?: object;
    };
    clientInfo: {
        name: string;
        version: string;
    };
}
export interface InitializeResult {
    protocolVersion: string;
    capabilities: {
        tools?: object;
        resources?: {
            listChanged?: boolean;
        };
        prompts?: {
            listChanged?: boolean;
        };
        sampling?: object;
    };
    serverInfo?: {
        name: string;
        version: string;
    };
}
export interface McpTool {
    name: string;
    description: string;
    inputSchema: {
        type: "object";
        properties: Record<string, unknown>;
        required?: string[];
    };
}
export interface McpResource {
    uri: string;
    name: string;
    description: string;
    mimeType?: string;
}
export interface McpPrompt {
    name: string;
    description: string;
    arguments?: Array<{
        name: string;
        description: string;
        required?: boolean;
    }>;
}
export interface McpServerConfig {
    name: string;
    transport: "stdio" | "streamable-http" | "http";
    command?: string;
    args?: string[];
    url?: string;
    env?: Record<string, string>;
    headers?: Record<string, string>;
    http_headers?: Record<string, string>;
    startupTimeoutMs?: number;
    requestTimeoutMs?: number;
}
export declare class McpClientSession {
    private config;
    private transport;
    private requestIdCounter;
    private pendingRequests;
    private initialized;
    private notificationHandlers;
    private closed;
    private readonly startupTimeoutMs;
    private readonly requestTimeoutMs;
    private malformedMessageCount;
    private cleanupTimer;
    private static readonly MAX_MALFORMED_MESSAGES;
    private static readonly CLOSE_TIMEOUT_MS;
    serverInfo: {
        name: string;
        version: string;
    } | undefined;
    constructor(config: McpServerConfig);
    private createTransport;
    connect(): Promise<void>;
    get transportPid(): number | undefined;
    close(): Promise<void>;
    private handleTransportError;
    private rejectAllPending;
    private rejectPendingRequest;
    private startCleanupTimer;
    private handleIncoming;
    private handleNotification;
    private sendRequest;
    private sendNotification;
    initialize(params: InitializeParams): Promise<InitializeResult>;
    listTools(): Promise<{
        tools: McpTool[];
    }>;
    callTool(name: string, args: Record<string, unknown>): Promise<unknown>;
    listResources(): Promise<{
        resources: McpResource[];
    }>;
    readResource(uri: string): Promise<unknown>;
    listPrompts(): Promise<{
        prompts: McpPrompt[];
    }>;
    getPrompt(name: string, args?: Record<string, string>): Promise<unknown>;
    onNotification(method: string, handler: (params: unknown) => void): () => void;
}
