tinyhumansai/openhuman · error

unknown mcp arg: {other}

Error message

unknown mcp arg: {other}

What it means

The `openhuman mcp` argument loop recognizes only -v/--verbose, --transport, --host, --port, --auth-token, and -h/--help; any other token — an unknown flag or a stray positional — aborts parsing immediately with the offending token echoed.

Source

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

                    .parse()
                    .map_err(|_| anyhow::anyhow!("invalid --port value `{raw}`"))?;
                index += 2;
            }
            "--auth-token" => {
                let token = args
                    .get(index + 1)
                    .ok_or_else(|| anyhow::anyhow!("missing value for --auth-token"))?;
                if token.trim().is_empty() {
                    bail!("--auth-token must not be empty");
                }
                auth_token = Some(token.trim().to_string());
                index += 2;
            }
            "-h" | "--help" => {
                print_help();
                return Ok(());
            }
            other => bail!("unknown mcp arg: {other}"),
        }
    }

    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 =

View on GitHub (pinned to 7491200858)

Solutions

  1. Run `openhuman mcp --help` (print_help) to list the accepted flags for your build.
  2. Remove the unsupported flag; if it configured real behavior, find the equivalent in the core's config file.
  3. Update wrapper scripts pinned to an older CLI surface.

Example fix

# before
$ openhuman mcp --transport stdio --scope user
error: unknown mcp arg: --scope

# after
$ openhuman mcp --help   # accepted: -v/--verbose, --transport, --host, --port, --auth-token, -h/--help
$ openhuman mcp --transport stdio
Defensive patterns

Strategy: validation

Validate before calling

const MCP_ARGS: &[&str] = &["-v", "--verbose", "--transport", "--host", "--port", "--auth-token", "-h", "--help"];
// reject unknown tokens before spawning the subprocess

Prevention

When it happens

Trigger: Passing flags from another version or another tool's CLI (e.g. `--scope`, `--server`, `-s`) or a stray positional argument after `mcp`. The parse loop is a strict whitelist, so anything unrecognized lands here.

Common situations: Scripts written for a different MCP client; docs drift between versions; config snippets copy-pasted from Claude Desktop/Cursor examples.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/856ef188e287ea51. Report an issue: GitHub.