import { Client } from '@modelcontextprotocol/sdk/client/index.js'; import { DuckDBService } from '../duckdb/service.js'; /** * Configuration for MCP Client */ export interface MCPClientConfig { name?: string; version?: string; cacheEnabled?: boolean; cacheTTL?: number; maxRetries?: number; } /** * Represents an attached MCP server */ export interface AttachedServer { alias: string; url: string; transport: 'stdio' | 'http' | 'websocket' | 'tcp'; client: Client; resources?: any[]; tools?: any[]; lastRefresh?: Date; } /** * MCP Client for connecting to external MCP servers * and creating virtual tables in DuckDB */ export declare class MCPClient { private config; private attachedServers; private resourceCache; private duckdb; constructor(config?: MCPClientConfig); /** * Set DuckDB service for virtual table creation */ setDuckDBService(duckdb: DuckDBService): void; /** * Attach an external MCP server */ attachServer(url: string, alias: string, transport?: 'stdio' | 'http' | 'websocket' | 'tcp'): Promise; /** * Detach a server */ detachServer(alias: string): Promise; /** * List all attached servers */ listAttachedServers(): AttachedServer[]; /** * Get a specific attached server */ getAttachedServer(alias: string): AttachedServer | undefined; /** * List resources from a specific server or all servers */ listResources(serverAlias?: string): Promise; /** * Read a resource from a server */ readResource(uri: string, serverAlias?: string, useCache?: boolean): Promise; /** * Create a virtual table in DuckDB from an MCP resource */ createVirtualTable(tableName: string, resourceUri: string, serverAlias?: string): Promise; /** * Refresh a virtual table by re-reading the resource */ refreshVirtualTable(tableName: string, resourceUri: string, serverAlias?: string): Promise; /** * Execute a tool on an attached server */ callTool(serverAlias: string, toolName: string, args: any): Promise; /** * Clear resource cache */ clearCache(serverAlias?: string): void; /** * Disconnect all servers */ disconnectAll(): Promise; } //# sourceMappingURL=MCPClient.d.ts.map