haive.mcp.installers.safe_pattern_installer¶
Safe Pattern-Based MCP Server Installer.
Version 1: Uses predefined patterns for safe, predictable installations. No code generation - only trusted, tested patterns.
Classes¶
Request for MCP server installation. |
|
Result of installation attempt. |
|
Safe MCP installer using only predefined patterns. |
Module Contents¶
- class haive.mcp.installers.safe_pattern_installer.InstallationRequest(/, **data)¶
Bases:
pydantic.BaseModelRequest for MCP server installation.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class haive.mcp.installers.safe_pattern_installer.InstallationResult(/, **data)¶
Bases:
pydantic.BaseModelResult of installation attempt.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class haive.mcp.installers.safe_pattern_installer.SafePatternInstaller(config_manager=None)¶
Safe MCP installer using only predefined patterns.
Init .
- Parameters:
config_manager (haive.mcp.installers.config_manager.MCPConfigManager | None) – [TODO: Add description]
- check_server_status(server_name)¶
Check if an MCP server is running.
- cleanup()¶
Stop all running servers.
- Return type:
None
- create_installation_tool(request)¶
Create a tool for installing a specific MCP server.
- Parameters:
request (InstallationRequest)
- Return type:
langchain_core.tools.StructuredTool
- create_quick_install_tools()¶
Create tools for common MCP server installations.
- Return type:
list[langchain_core.tools.StructuredTool]
- get_pattern_for_server(package_name, suggested_pattern)¶
Get the appropriate pattern for a server.
- Parameters:
- Return type:
- async start_server(server_name)¶
Start a configured MCP server.
- Parameters:
server_name (str)
- Return type:
- validate_installation_request(request)¶
Validate that installation request is safe.
- Parameters:
request (InstallationRequest)
- Return type: