A mapping of server names to their respective configurations
Optional
options: ConvertMcpToLangchainOptionsOptional configuration settings
Configuration options for converting MCP servers to LangChain tools. Extends LogOptions to include provider-specific schema transformations and custom logging.
Optional
logLevel?: "trace" | "debug" | "info" | "warn" | "error" | "fatal"Log verbosity level. Higher levels include all lower levels (e.g., "debug" includes "info", "warn", "error", "fatal")
Optional
logger?: McpToolsLoggerCustom logger implementation. If not provided, uses default Logger with specified logLevel
Optional
llmProvider?: LlmProviderLLM provider for schema compatibility transformations. Performs provider-specific JSON schema modifications to prevent compatibility issues
A promise that resolves to: - tools: Array of StructuredTool instances ready for use with LangChain - cleanup: Function to properly terminate all server connections
McpInitializationError if any server fails to initialize (includes connection errors, tool listing failures, configuration validation errors)
Initializes multiple MCP (Model Context Protocol) servers and converts them into LangChain tools. This function concurrently sets up all specified servers and aggregates their tools.