import { EventEmitter } from 'events'; export interface McpToolSchema { name: string; description?: string; inputSchema: { type: 'object'; properties?: Record; required?: string[]; }; } export interface McpResource { uri: string; name: string; description?: string; mimeType?: string; } export interface McpServerCapabilities { tools?: { listChanged?: boolean; }; resources?: { subscribe?: boolean; listChanged?: boolean; }; prompts?: { listChanged?: boolean; }; } export type McpClientOptions = { type: 'stdio'; command: string; args?: string[]; env?: Record; cwd?: string; timeout?: number; connectTimeout?: number; } | { type: 'http'; url: string; headers?: Record; timeout?: number; connectTimeout?: number; token?: string; tokenProvider?: () => Promise; onUnauthorized?: () => Promise; }; export declare class McpAuthenticationRequiredError extends Error { readonly authenticate?: string | undefined; constructor(authenticate?: string | undefined); } export declare class McpClient extends EventEmitter { private name; private proc; private nextId; private pending; private buffer; private sessionId?; private _capabilities; private _tools; private _initialized; private stopped; private readonly options; constructor(name: string, options: McpClientOptions); constructor(name: string, command: string, args?: string[], env?: Record); get capabilities(): McpServerCapabilities; get tools(): McpToolSchema[]; get initialized(): boolean; get running(): boolean; get transportType(): 'stdio' | 'http'; start(): Promise; private startStdio; stop(): Promise; listTools(): Promise; callTool(name: string, args: Record): Promise; listResources(): Promise; readResource(uri: string): Promise; private initialize; private send; private sendStdio; private sendHttp; private readSseResponse; private processBuffer; private rejectAll; private withTimeout; } //# sourceMappingURL=McpClient.d.ts.map