zeroclaw-labs/zeroclaw · error

mcp.servers[{i}].url must use https when tls_ca_cert_path is

Error message

mcp.servers[{i}].url must use https when tls_ca_cert_path is set

What it means

Error "mcp.servers[{i}].url must use https when tls_ca_cert_path is set" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-config/src/schema.rs:10154

                    })?;
                let parsed = reqwest::Url::parse(url)
                    .with_context(|| format!("mcp.servers[{i}].url is not a valid URL"))?;
                if !matches!(parsed.scheme(), "http" | "https") {
                    anyhow::bail!("mcp.servers[{i}].url must use http/https");
                }
                if let Some(ca_path) = server.tls_ca_cert_path.as_deref() {
                    if ca_path.trim().is_empty() {
                        validation_bail!(
                            RequiredFieldEmpty,
                            format!("mcp.servers[{i}].tls_ca_cert_path"),
                            "mcp.servers[{i}].tls_ca_cert_path must not be empty"
                        );
                    }
                    if !std::path::Path::new(ca_path).is_absolute() {
                        anyhow::bail!("mcp.servers[{i}].tls_ca_cert_path must be an absolute path");
                    }
                    if parsed.scheme() != "https" {
                        anyhow::bail!(
                            "mcp.servers[{i}].url must use https when tls_ca_cert_path is set"
                        );
                    }
                }
            }
        }
    }
    Ok(())
}

fn validate_proxy_url(field: &str, url: &str) -> Result<()> {
    let parsed = reqwest::Url::parse(url)
        .with_context(|| format!("Invalid {field} URL: '{url}' is not a valid URL"))?;

    match parsed.scheme() {
        "http" | "https" | "socks5" | "socks5h" | "socks" => {}
        scheme => {
            anyhow::bail!(

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Switch the MCP server URL to https when a custom CA certificate is configured.

When it happens

Trigger: Thrown at crates/zeroclaw-config/src/schema.rs:10154 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/46a13aabc2aafa53. Report an issue: GitHub.