/**
 * MCP (Model Context Protocol) Server for code-buddy
 *
 * Implements the MCP specification for tool and resource sharing.
 * Allows any MCP client (Claude Desktop, FileCommander, etc.) to use code-buddy capabilities.
 *
 * @see https://modelcontextprotocol.io/
 */
interface McpTool {
    name: string;
    description: string;
    inputSchema: {
        type: 'object';
        properties: Record<string, unknown>;
        required?: string[];
    };
}
export interface McpServerOptions {
    name?: string;
    version?: string;
    verbose?: boolean;
    workdir?: string;
}
export declare class McpServer {
    private rl;
    private initialized;
    private options;
    private tools;
    private resources;
    private prompts;
    constructor(options?: McpServerOptions);
    /**
     * Start the MCP server
     */
    start(): Promise<void>;
    /**
     * Stop the server
     */
    stop(): void;
    /**
     * Register a custom tool
     */
    registerTool(name: string, description: string, inputSchema: McpTool['inputSchema'], handler: (args: Record<string, unknown>) => Promise<unknown>): void;
    /**
     * Register a custom resource
     */
    registerResource(uri: string, name: string, handler: () => Promise<string>, options?: {
        description?: string;
        mimeType?: string;
    }): void;
    private handleMessage;
    private dispatch;
    private handleInitialize;
    private handleInitialized;
    private handleShutdown;
    private handleToolsList;
    private handleToolsCall;
    private handleResourcesList;
    private handleResourcesRead;
    private handlePromptsList;
    private handlePromptsGet;
    private handleCompletion;
    private registerBuiltInTools;
    private registerBuiltInResources;
    private registerBuiltInPrompts;
    private send;
    private sendError;
    private log;
}
export declare function createMcpServer(options?: McpServerOptions): McpServer;
export {};
