dynamic_mcp_toolΒΆ
Dynamic MCP Discovery and Installation Tool.
This tool leverages the haive-mcp repositoryβs 992 server database to: 1. RAG search through MCP server documentation and metadata 2. Let agent pick the right server based on capabilities 3. Install it dynamically using FastMCP 4. Set up watch dog for server updates
Integrates with AugLLMConfig pattern and uses FastMCP for modern MCP server setup.
ClassesΒΆ
Tool for dynamic MCP server discovery, installation, and management. |
|
Request to install an MCP server. |
|
Result of MCP server installation. |
|
Tool to list currently installed MCP servers. |
FunctionsΒΆ
Create MCP discovery and management tools. |
Module ContentsΒΆ
- class dynamic_mcp_tool.DynamicMCPTool(engine: haive.core.engine.aug_llm.AugLLMConfig, **kwargs)ΒΆ
Bases:
langchain_core.tools.BaseTool
Tool for dynamic MCP server discovery, installation, and management.
This tool: 1. Uses RAG to search the 992 MCP server database 2. Presents options to the user/agent 3. Installs selected servers using FastMCP 4. Returns ready-to-use MCP client 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 dynamically based on capability requirements. Use this tool when you need to add new capabilities to your agent by finding and installing Model Context Protocol (MCP) servers. The tool searches through 992 documented MCP servers, analyzes their capabilities, and can install them automatically. Examples: - "I need database access capabilities" - "Find servers that can work with GitHub" - "Install filesystem operations server" - "Get me weather data integration" """
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ΒΆ
- class dynamic_mcp_tool.MCPServerInstallRequest(/, **data: Any)ΒΆ
Bases:
pydantic.BaseModel
Request to install an MCP server.
- class dynamic_mcp_tool.MCPServerInstallResult(/, **data: Any)ΒΆ
Bases:
pydantic.BaseModel
Result of MCP server installation.
- class dynamic_mcp_tool.MCPServerListTool(dynamic_mcp_tool: DynamicMCPTool, **kwargs)ΒΆ
Bases:
langchain_core.tools.BaseTool
Tool to list currently installed MCP servers.
- description: str = 'List all currently installed and available MCP servers'ΒΆ
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
- dynamic_mcp_toolΒΆ