/** * MCP (Model Context Protocol) client integration for browser-use. * * This module provides integration between external MCP servers and browser-use's action registry. * MCP tools are dynamically discovered and registered as browser-use actions. */ import { EventEmitter } from 'events'; import { MCPClientConfig, MCPServerConfig, MCPTool, MCPToolResult } from './types'; /** * Basic MCP Client implementation for TypeScript */ export declare class MCPClient extends EventEmitter { private serverConfig; private clientConfig; private serverProcess; private connected; private tools; private messageId; private pendingRequests; constructor(serverConfig: MCPServerConfig, clientConfig?: Partial); /** * Connect to the MCP server and discover available tools */ connect(): Promise; /** * Disconnect from the MCP server */ disconnect(): Promise; /** * Get list of available tools */ getTools(): MCPTool[]; /** * Call a tool on the MCP server */ callTool(toolName: string, arguments_?: Record): Promise; /** * Set up JSON-RPC communication with the server */ private setupJsonRpcCommunication; /** * Handle incoming messages from the server */ private handleMessage; /** * Send a JSON-RPC request to the server */ private sendRequest; /** * Initialize the MCP session */ private initialize; /** * List available tools from the server */ private listTools; } //# sourceMappingURL=client.d.ts.map