production_mcp_tool =================== .. py:module:: production_mcp_tool .. autoapi-nested-parse:: Production MCP Discovery and Installation Tool. Leverages the existing haive-mcp infrastructure with 1,960 servers to: 1. RAG search through the complete MCP server database 2. Agent picks the best server based on capabilities 3. Install it dynamically using FastMCP or standard MCP 4. Return ready-to-use LangChain MCP client configuration This tool integrates with the AugLLMConfig pattern and builds on the existing MCPDocumentationLoader and agents. Attributes ---------- .. autoapisummary:: production_mcp_tool.logger Classes ------- .. autoapisummary:: production_mcp_tool.ListInstalledMCPTool production_mcp_tool.MCPCapabilityRequest production_mcp_tool.MCPInstallationResult production_mcp_tool.MCPServerOption production_mcp_tool.ProductionMCPTool Functions --------- .. autoapisummary:: production_mcp_tool.create_production_mcp_tools Module Contents --------------- .. py:class:: ListInstalledMCPTool(production_tool: ProductionMCPTool, **kwargs) Bases: :py:obj:`langchain_core.tools.BaseTool` Tool to list currently installed MCP servers. .. py:attribute:: description :type: str :value: 'List all currently installed MCP servers and their capabilities' Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. .. py:attribute:: name :type: str :value: 'list_installed_mcp_servers' The unique name of the tool that clearly communicates its purpose. .. py:attribute:: production_tool .. py:class:: MCPCapabilityRequest(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Request to find and install MCP servers by capability. .. py:attribute:: auto_install :type: bool :value: None .. py:attribute:: capability_query :type: str :value: None .. py:attribute:: include_experimental :type: bool :value: None .. py:attribute:: max_options :type: int :value: None .. py:attribute:: prefer_fastmcp :type: bool :value: None .. py:class:: MCPInstallationResult(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Result of MCP server installation. .. py:attribute:: available_tools :type: list[str] .. py:attribute:: client_config :type: dict[str, Any] .. py:attribute:: error_message :type: str | None :value: None .. py:attribute:: installation_notes :type: str .. py:attribute:: server_name :type: str .. py:attribute:: success :type: bool .. py:class:: MCPServerOption(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Information about an available MCP server. .. py:attribute:: capabilities :type: list[str] .. py:attribute:: category :type: str .. py:attribute:: description :type: str .. py:attribute:: install_command :type: str | None .. py:attribute:: is_fastmcp_compatible :type: bool .. py:attribute:: name :type: str .. py:attribute:: repository_url :type: str .. py:attribute:: stars :type: int | None .. py:attribute:: transport_types :type: list[str] .. py:class:: ProductionMCPTool(engine: haive.core.engine.aug_llm.AugLLMConfig, **kwargs) Bases: :py:obj:`langchain_core.tools.BaseTool` Production-ready tool for MCP server discovery and installation. This tool leverages the existing haive-mcp infrastructure with 1,960 servers to provide intelligent server discovery, installation, and configuration. .. py:attribute:: args_schema :type: type[pydantic.BaseModel] Pydantic model class to validate and parse the tool's input arguments. Args schema should be either: - A subclass of pydantic.BaseModel. - A subclass of pydantic.v1.BaseModel if accessing v1 namespace in pydantic 2 - a JSON schema dict .. py:attribute:: description :type: str :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ Discover and install MCP servers from a database of 1,960+ documented servers. Use this tool when you need to add new capabilities to your agent by finding and installing Model Context Protocol (MCP) servers. The tool uses RAG to search through comprehensive server documentation and can install servers automatically. Examples: - "I need PostgreSQL database access" - "Find servers for GitHub repository management" - "Install filesystem operations with read/write" - "Get me weather data integration capabilities" - "Find servers that can process images" """ .. raw:: html
Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. .. py:attribute:: doc_loader .. py:attribute:: engine .. py:attribute:: installed_servers :type: dict[str, dict] .. py:attribute:: name :type: str :value: 'discover_install_mcp_server' The unique name of the tool that clearly communicates its purpose. .. py:function:: create_production_mcp_tools(engine: haive.core.engine.aug_llm.AugLLMConfig) -> list[langchain_core.tools.BaseTool] Create production-ready MCP discovery and management tools. .. py:data:: logger