/**
 * MCP Router Server
 * Exposes 2 meta-tools: discover_tools and execute_tool
 * Achieves 98%+ token reduction by hiding individual tool definitions
 */
import { DISCOVER_TOOLS_DEFINITION } from './tools/discover.js';
import { EXECUTE_TOOL_DEFINITION } from './tools/execute.js';
import type { McpConfig, RouterStats } from './types.js';
export interface RouterOptions {
    configPath?: string;
    autoDiscover?: boolean;
    verbose?: boolean;
}
export declare class McpRouter {
    private config;
    private searchIndex;
    private clientPool;
    private options;
    private toolsLoaded;
    constructor(options?: RouterOptions);
    /**
     * Load tools from all configured MCP servers.
     * Uses Promise.allSettled for parallel discovery and keeps clients alive in the pool.
     */
    loadTools(): Promise<void>;
    /**
     * Get the 2 meta-tool definitions (for MCP tools/list)
     */
    getToolDefinitions(): Array<typeof DISCOVER_TOOLS_DEFINITION | typeof EXECUTE_TOOL_DEFINITION>;
    /**
     * Handle tool call
     */
    handleToolCall(name: string, args: unknown): Promise<unknown>;
    /**
     * Get router statistics
     */
    getStats(): RouterStats;
    /**
     * Shutdown - cleanup all connections
     */
    shutdown(): Promise<void>;
    /**
     * Get loaded config
     */
    getConfig(): McpConfig;
}
/**
 * Run as stdio MCP server.
 * Fully JSON-RPC 2.0 compliant: parse errors (-32700), invalid request (-32600),
 * batch request support, jsonrpc field validation, protocol version negotiation,
 * initialize state gate, isError signaling, and proper batch response aggregation.
 */
export declare function runStdioServer(options?: RouterOptions): Promise<void>;
//# sourceMappingURL=server.d.ts.map