tinyhumansai/openhuman · error

missing value for --transport

Error message

missing value for --transport

What it means

CLI argument parsing in run_stdio_from_cli (the `openhuman mcp` / `mcp-server` entry, compiled even when the mcp feature is off): `--transport` was given as the last argument with no following value. It is a usage error, not a runtime failure — the value must be `stdio` or `http`; re-run with e.g. `--transport http`.

Source

Thrown at src/openhuman/mcp/server/stdio.rs:38

pub fn run_stdio_from_cli(args: &[String]) -> Result<()> {
    let mut verbose = false;
    let mut transport = McpTransport::Stdio;
    let mut bind_host = "127.0.0.1".to_string();
    let mut port: u16 = 9300;
    let mut auth_token: Option<String> = None;

    let mut index = 0usize;
    while index < args.len() {
        match args[index].as_str() {
            "-v" | "--verbose" => {
                verbose = true;
                index += 1;
            }
            "--transport" => {
                let value = args
                    .get(index + 1)
                    .ok_or_else(|| anyhow::anyhow!("missing value for --transport"))?;
                transport = match value.as_str() {
                    "stdio" => McpTransport::Stdio,
                    "http" => McpTransport::Http,
                    other => bail!("unknown --transport value `{other}` (expected stdio or http)"),
                };
                index += 2;
            }
            "--host" => {
                bind_host = args
                    .get(index + 1)
                    .ok_or_else(|| anyhow::anyhow!("missing value for --host"))?
                    .clone();
                index += 2;
            }
            "--port" => {
                let raw = args
                    .get(index + 1)
                    .ok_or_else(|| anyhow::anyhow!("missing value for --port"))?;

View on GitHub (pinned to 7491200858)

Solutions

  1. Supply the value: --transport stdio or --transport http
  2. Check for a missing space or split flag/value in the command line
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/mcp/server/stdio.rs:38 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/51e29ae394ee5738. Report an issue: GitHub.