Skip to main content

load_mcp_config_from

Function load_mcp_config_from 

Source
pub fn load_mcp_config_from(path: &Path) -> Result<McpConfig>
Expand description

Loads MCP configuration from the given path.

This is the primary, testable entry point. load_mcp_config is a thin wrapper that resolves the default ~/.claude/mcp.json location.

§Errors

Returns an error if the file cannot be read or the JSON is malformed.

§Examples

use mcp_execution_cli::commands::common::load_mcp_config_from;
use std::path::Path;

let config = load_mcp_config_from(Path::new("/tmp/mcp.json")).unwrap();
println!("{} servers configured", config.mcp_servers.len());