pub fn load_server_from_config(name: &str) -> Result<(ServerId, ServerConfig)>Expand description
Loads server configuration from ~/.claude/mcp.json by server name.
§Arguments
name- Server name from mcp.json (e.g., “github”)
§Returns
Returns (ServerId, ServerConfig) if server is found in config.
§Errors
Returns error if:
- Config file doesn’t exist or is malformed
- Server name not found in config
§Examples
use mcp_execution_cli::commands::common::load_server_from_config;
let (id, config) = load_server_from_config("github").unwrap();
assert_eq!(id.as_str(), "github");