import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { WalletConfig } from '../index'; /** * MCP Server for MCP Wallet * This class implements the Model-Context-Protocol (MCP) server * to expose wallet functionality to AI assistants. */ export declare class McpServer { private wallet; private config; mcpServer: Server; private transport; private tools; private pendingConfirmations; /** * Create a new MCP server instance * @param walletConfig Wallet configuration * @param serverConfig Server configuration */ constructor(walletConfig: WalletConfig, serverConfig?: McpServerConfig); /** * Start the MCP server * @returns Promise that resolves when the server is started */ start(): Promise; /** * Confirm a pending transaction * @param txId Transaction ID to confirm * @returns Promise that resolves with the transaction result */ confirmTransaction(txId: string): Promise; /** * Reject a pending transaction * @param txId Transaction ID to reject */ rejectTransaction(txId: string): void; /** * Setup MCP request handlers * This configures how the server responds to different MCP requests */ private setupRequestHandlers; /** * Register wallet tools with the MCP server * This exposes wallet functionality to MCP clients */ private registerTools; /** * Stop the MCP server */ stop(): Promise; } /** * MCP Server Configuration */ export interface McpServerConfig { /** * Port to listen on * @default 3000 */ port?: number; /** * Allowed operation types * - read: Read-only operations (getAddress, getBalance, etc.) * - prepare: Preparation operations (createTransaction, estimateGas, etc.) * - info: Information services (getTokenPrice, getNetworkStatus, etc.) * - transaction: Transaction operations (sendTransaction, sendToken, etc.) * @default ['read', 'prepare', 'info'] */ allowedOperations?: ('read' | 'prepare' | 'info' | 'transaction')[]; /** * Whether to require confirmation for transactions * @default true */ requireConfirmation?: boolean; } /** * Create a new MCP server instance * @param walletConfig Wallet configuration * @param serverConfig Server configuration * @returns MCP server instance */ export declare function createMcpServer(walletConfig: WalletConfig, serverConfig?: McpServerConfig): McpServer;