Skip to main content

connect_mcp_clients

Function connect_mcp_clients 

Source
pub async fn connect_mcp_clients(
    container: &Container,
    mcp: &BTreeMap<String, McpServerSpec>,
    log_dir: &Path,
    cli_env: &CliEnvEntries,
) -> Result<Vec<Arc<McpClient>>>
Expand description

Spawn one McpClient per backing MCP declared in mcp, in key-sorted (BTreeMap) iteration order. cli_env provides any --env overlay entries to merge per server. Adapter construction is the caller’s job because only the REPL path consumes adapters.