/**
 * MCP Server Manager.
 *
 * Manages lifecycle of multiple MCP server connections:
 *   - Auto-connect on startup from config
 *   - Tool/resource aggregation across servers
 *   - Clean shutdown on exit
 *   - Provider interface for MCPTool
 */
import type { MCPServerConfig, MCPServerState, MCPTool, MCPResource } from './types.js';
import type { MCPClientProvider } from '../tools/mcp-tool.js';
import type { MCPResourceProvider } from '../tools/list-mcp-resources.js';
import type { MCPReadResourceProvider } from '../tools/read-mcp-resource.js';
export declare class MCPManager implements MCPClientProvider, MCPResourceProvider, MCPReadResourceProvider {
    private clients;
    private states;
    /** Connect to all configured MCP servers. Returns summary of results. */
    connectAll(cwd?: string): Promise<MCPServerState[]>;
    /** Connect to a single MCP server by name and config. */
    connectOne(name: string, config: MCPServerConfig): Promise<MCPServerState>;
    /** Disconnect a single server. */
    disconnectOne(name: string): Promise<void>;
    /** Disconnect all servers. Call on app exit. */
    disconnectAll(): Promise<void>;
    isConnected(serverName: string): boolean;
    callTool(serverName: string, toolName: string, args: Record<string, unknown>): Promise<{
        content: string;
        isError?: boolean;
    }>;
    listResources(serverName: string): Promise<Array<{
        uri: string;
        name: string;
        description?: string;
    }>>;
    /** Get state of all servers. */
    getServers(): MCPServerState[];
    /** Get state of a specific server. */
    getServer(name: string): MCPServerState | undefined;
    /** Get all tools across all connected servers, prefixed with server name. */
    getAllTools(): Array<{
        server: string;
        tool: MCPTool;
    }>;
    /** Get all resources across all connected servers. */
    getAllResources(): Array<{
        server: string;
        resource: MCPResource;
    }>;
    /** Read a resource from a specific server. */
    readResource(serverName: string, uri: string): Promise<{
        content: string;
        mimeType?: string;
    }>;
    /** Get server count by status. */
    summary(): {
        total: number;
        connected: number;
        error: number;
    };
}
