/**
 * MCP Server
 *
 * Exposes new_indusvx tools as an MCP server.
 * Compatible with Claude Desktop, Cursor, etc.
 *
 * Reference: MCP server implementation patterns.
 */
import type { AgentTool } from "../bot/types.js";
/**
 * Options for creating an MCP server.
 */
export interface MCPServerOptions {
    /** Server name */
    name: string;
    /** Server version */
    version?: string;
    /** Tools to expose */
    tools: AgentTool<any>[];
    /** Optional description */
    description?: string;
}
/**
 * Tool converted for MCP protocol.
 */
interface MCPConvertedTool {
    name: string;
    description?: string;
    inputSchema: Record<string, unknown>;
    outputSchema?: Record<string, unknown>;
    execute: (args: Record<string, unknown>) => Promise<unknown>;
}
/**
 * MCP Server - exposes new_indusvx tools via the Model Context Protocol.
 *
 * Supports stdio transport for subprocess communication.
 *
 * @example
 * ```typescript
 * import { MCPServer } from "new_indusvx/mcp";
 * import { createBashTool } from "new_indusvx/agent/tools";
 *
 * const server = new MCPServer({
 *   name: "My Tools Server",
 *   version: "1.0.0",
 *   tools: [createBashTool()],
 * });
 *
 * await server.startStdio();
 * ```
 */
export declare class MCPServer {
    private options;
    private tools;
    private buffer;
    private isConnected;
    /** Server name */
    readonly name: string;
    /** Server version */
    readonly version: string;
    constructor(options: MCPServerOptions);
    /**
     * Start the server using stdio transport.
     *
     * This is typically used when running the server as a subprocess
     * that MCP clients (like Claude Desktop) spawn.
     */
    startStdio(): Promise<void>;
    /**
     * Stop the server.
     */
    stop(): Promise<void>;
    /**
     * Add a tool to the server.
     */
    addTool(tool: AgentTool<any>): void;
    /**
     * Remove a tool from the server.
     */
    removeTool(name: string): boolean;
    /**
     * List all available tools.
     */
    listTools(): MCPConvertedTool[];
    private convertTool;
    private typeBoxToJsonSchema;
    private processBuffer;
    private handleMessage;
    private handleRequest;
    private handleInitialize;
    private handleToolsList;
    private handleToolsCall;
    private sendResponse;
    private sendError;
}
/**
 * Create an MCP server from tools.
 *
 * @example
 * ```typescript
 * const server = createMCPServer({
 *   name: "My Tools",
 *   tools: [bashTool, readTool, writeTool],
 * });
 *
 * await server.startStdio();
 * ```
 */
export declare function createMCPServer(options: MCPServerOptions): MCPServer;
export {};
