export type McpVerifyResult = { ok: true; servers: Array<{ name: string; tools: number; }>; } | { ok: false; errors: Array<{ server: string; error: string; }>; }; export interface McpToolCallSettledEvent { toolName: string; modelToolName?: string; success: boolean; } export interface McpConnectionFailedEvent { server: string; error: string; } export interface McpServerConfig { name: string; url?: string; transport?: 'sse' | 'streamableHttp'; command?: string; args?: string[]; env?: Record; headers?: Record; onToolCallSettled?: (event: McpToolCallSettledEvent) => void | Promise; onConnectionFailed?: (event: McpConnectionFailedEvent) => void | Promise; connectionTimeoutMs?: number; requireApproval?: string[] | boolean; fetch?: typeof fetch; toolFilter?: { mode: 'allow' | 'exclude'; tools: string[]; }; }