tinyhumansai/openhuman · error
invalid bind address `{bind_host}:{port}`: {err}
Error message
invalid bind address `{bind_host}:{port}`: {err} What it means
Formatting bind_host:port into a SocketAddr failed to parse — the host is not a valid IP literal (a hostname like "localhost" is rejected by SocketAddr::parse) or the port is out of range. Fires before the HTTP MCP server binds.
Source
Thrown at src/openhuman/mcp/server/stdio.rs:96
}
init_mcp_logging(verbose);
let rt = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()?;
match transport {
McpTransport::Stdio => {
log::debug!("[mcp_server] starting stdio MCP server");
rt.block_on(async { run_stdio(tokio::io::stdin(), tokio::io::stdout()).await })?;
}
McpTransport::Http => {
#[cfg(feature = "http-server")]
{
let bind_addr: SocketAddr =
format!("{bind_host}:{port}").parse().map_err(|err| {
anyhow::anyhow!("invalid bind address `{bind_host}:{port}`: {err}")
})?;
log::debug!(
"[mcp_server] starting HTTP/SSE MCP server bind={bind_addr} auth={}",
auth_token.is_some()
);
rt.block_on(run_http(HttpServerConfig {
bind_addr,
auth_token,
}))?;
}
// Built without the axum transport (#5048): the stdio path above
// still works; `--transport http` reports the build fact.
#[cfg(not(feature = "http-server"))]
{
let _ = (&bind_host, port, &auth_token);
bail!("mcp --transport http unavailable: built without the http-server feature");
}
}View on GitHub (pinned to 7491200858)
Solutions
- Use an IP literal for --host, e.g. 127.0.0.1 instead of localhost
- Confirm --port is within 0-65535
- Resolve hostnames to IPs before passing them to the server CLI
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/mcp/server/stdio.rs:96 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/c2c2f6fb02feb6a5.
Report an issue: GitHub.