haive.mcp.installers.config_manager

MCP Configuration and Environment Management.

Handles .env files, configuration templates, and secure credential storage.

Classes

MCPConfigManager

Manages MCP server configurations and environment files.

MCPEnvironmentConfig

Environment configuration for MCP servers.

MCPServerPattern

Standard pattern for MCP server installation.

Module Contents

class haive.mcp.installers.config_manager.MCPConfigManager(config_dir=None)

Manages MCP server configurations and environment files.

Init .

Parameters:

config_dir (pathlib.Path | None) – [TODO: Add description]

add_server_config(config)

Add a new server configuration.

Parameters:

config (MCPEnvironmentConfig)

Return type:

bool

export_claude_desktop_config(server_name)

Export server config in Claude Desktop format.

Parameters:

server_name (str)

Return type:

dict[str, Any] | None

get_config_summary()

Get summary of all configurations.

Return type:

dict[str, Any]

get_pattern(pattern_name)

Get a server pattern by name.

Parameters:

pattern_name (str)

Return type:

MCPServerPattern | None

get_server_config(server_name)

Get server configuration by name.

Parameters:

server_name (str)

Return type:

MCPEnvironmentConfig | None

list_available_patterns()

List all available server patterns.

Return type:

list[str]

list_configured_servers()

List all configured servers.

Return type:

list[str]

class haive.mcp.installers.config_manager.MCPEnvironmentConfig(/, **data)

Bases: pydantic.BaseModel

Environment configuration for MCP servers.

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.config_manager.MCPServerPattern

Standard pattern for MCP server installation.