zeroclaw-labs/zeroclaw · error

mcp.servers[{i}].url must use http/https

Error message

mcp.servers[{i}].url must use http/https

What it means

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

Source

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

                            ::zeroclaw_log::Event::new(
                                module_path!(),
                                ::zeroclaw_log::Action::Reject
                            )
                            .with_outcome(::zeroclaw_log::EventOutcome::Failure)
                            .with_attrs(::serde_json::json!({
                                "index": i,
                                "transport": transport_str,
                            })),
                            "mcp.servers entry rejected: transport requires url"
                        );
                        anyhow::Error::msg(format!(
                            "mcp.servers[{i}] with transport={transport_str} requires url"
                        ))
                    })?;
                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"
                        );
                    }
                }

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Change the MCP server URL scheme to http or https.

When it happens

Trigger: Thrown at crates/zeroclaw-config/src/schema.rs:10140 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/9165a375ae24f484. Report an issue: GitHub.