zeroclaw-labs/zeroclaw · error · anyhow::Error
mcp.servers[ ] with transport=stdio requires non-empty…
Error message
mcp.servers[{i}] with transport=stdio requires non-empty command What it means
Validation guard in validate_mcp_config for stdio-transport MCP servers: the server entry has transport=stdio but an empty command. The transport-to-required-leaf relationship is canonically owned by McpTransport::required_leaf which feeds the x-required-by-transport schema metadata; this runtime check enforces the same contract when the schema path is bypassed.
Solutions
- Provide a non-empty command for the stdio MCP server, or switch its transport to HTTP.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/zeroclaw-config/src/schema.rs:10107 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/fb0acccfb84ab24d.
Report an issue: GitHub.
Appendix: source
Thrown at crates/zeroclaw-config/src/schema.rs:10107
format!("mcp.servers[{i}].tool_timeout_secs"),
"mcp.servers[{i}].tool_timeout_secs must be greater than 0"
);
}
if timeout > MCP_MAX_TOOL_TIMEOUT_SECS {
anyhow::bail!(
"mcp.servers[{i}].tool_timeout_secs exceeds max {MCP_MAX_TOOL_TIMEOUT_SECS}"
);
}
}
// The transport -> required-leaf relationship is owned by
// `McpTransport::required_leaf`, which feeds the `x-required-by-transport`
// schema metadata. The validator matches on the `McpTransport` enum so a
// new variant is a compile error here rather than a runtime fall-through.
match server.transport {
McpTransport::Stdio => {
if server.command.trim().is_empty() {
anyhow::bail!(
"mcp.servers[{i}] with transport=stdio requires non-empty command"
);
}
}
McpTransport::Http | McpTransport::Sse => {
let url = server
.url
.as_deref()
.map(str::trim)
.filter(|value| !value.is_empty())
.ok_or_else(|| {
let transport_str = server.transport.wire_name();
::zeroclaw_log::record!(
WARN,
::zeroclaw_log::Event::new(
module_path!(),
::zeroclaw_log::Action::Reject
)View on GitHub (pinned to 88bb9c8533)