import type { MCPContentBlock, MCPResource, MCPServerConfig, MCPServerState, MCPToolDefinition, MCPToolResult, MCPTransport } from '../../types/connector/index.js';
import type { MCPServerId } from '../../types/ids/index.js';
export interface MCPServerToolProvider {
    listTools(): MCPToolDefinition[];
    callTool(name: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
}
export interface MCPServerResourceProvider {
    listResources(): MCPResource[];
    readResource(uri: string): Promise<MCPContentBlock[]>;
}
export declare class MCPServer {
    readonly id: MCPServerId;
    private config;
    private toolProvider;
    private resourceProvider?;
    private transport;
    private running;
    private connectedClients;
    private startedAt?;
    private log;
    constructor(config: MCPServerConfig, toolProvider: MCPServerToolProvider, resourceProvider?: MCPServerResourceProvider);
    start(transport: MCPTransport): Promise<void>;
    stop(): Promise<void>;
    isRunning(): boolean;
    getState(): MCPServerState;
    private handleRequest;
    private dispatch;
    private handleInitialize;
    private handleToolsList;
    private handleToolsCall;
    private handleResourcesList;
    private handleResourcesRead;
    private respond;
    private respondError;
}
//# sourceMappingURL=server.d.ts.map