production_mcp_toolΒΆ

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ΒΆ

ClassesΒΆ

ListInstalledMCPTool

Tool to list currently installed MCP servers.

MCPCapabilityRequest

Request to find and install MCP servers by capability.

MCPInstallationResult

Result of MCP server installation.

MCPServerOption

Information about an available MCP server.

ProductionMCPTool

Production-ready tool for MCP server discovery and installation.

FunctionsΒΆ

create_production_mcp_tools(...)

Create production-ready MCP discovery and management tools.

Module ContentsΒΆ

class production_mcp_tool.ListInstalledMCPTool(production_tool: ProductionMCPTool, **kwargs)ΒΆ

Bases: langchain_core.tools.BaseTool

Tool to list currently installed MCP servers.

description: str = '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.

name: str = 'list_installed_mcp_servers'ΒΆ

The unique name of the tool that clearly communicates its purpose.

production_toolΒΆ
class production_mcp_tool.MCPCapabilityRequest(/, **data: Any)ΒΆ

Bases: pydantic.BaseModel

Request to find and install MCP servers by capability.

auto_install: bool = NoneΒΆ
capability_query: str = NoneΒΆ
include_experimental: bool = NoneΒΆ
max_options: int = NoneΒΆ
prefer_fastmcp: bool = NoneΒΆ
class production_mcp_tool.MCPInstallationResult(/, **data: Any)ΒΆ

Bases: pydantic.BaseModel

Result of MCP server installation.

available_tools: list[str]ΒΆ
client_config: dict[str, Any]ΒΆ
error_message: str | None = NoneΒΆ
installation_notes: strΒΆ
server_name: strΒΆ
success: boolΒΆ
class production_mcp_tool.MCPServerOption(/, **data: Any)ΒΆ

Bases: pydantic.BaseModel

Information about an available MCP server.

capabilities: list[str]ΒΆ
category: strΒΆ
description: strΒΆ
install_command: str | NoneΒΆ
is_fastmcp_compatible: boolΒΆ
name: strΒΆ
repository_url: strΒΆ
stars: int | NoneΒΆ
transport_types: list[str]ΒΆ
class production_mcp_tool.ProductionMCPTool(engine: haive.core.engine.aug_llm.AugLLMConfig, **kwargs)ΒΆ

Bases: 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.

args_schema: 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

description: str = Multiline-StringΒΆ
Show Value
"""
    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"
    """

Used to tell the model how/when/why to use the tool.

You can provide few-shot examples as a part of the description.

doc_loaderΒΆ
engineΒΆ
installed_servers: dict[str, dict]ΒΆ
name: str = 'discover_install_mcp_server'ΒΆ

The unique name of the tool that clearly communicates its purpose.

production_mcp_tool.create_production_mcp_tools(engine: haive.core.engine.aug_llm.AugLLMConfig) list[langchain_core.tools.BaseTool]ΒΆ

Create production-ready MCP discovery and management tools.

production_mcp_tool.loggerΒΆ