{"record":{"id":"856ef188e287ea51","repo":"tinyhumansai/openhuman","slug":"unknown-mcp-arg-other","errorCode":null,"errorMessage":"unknown mcp arg: {other}","messagePattern":"unknown mcp arg: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/mcp/server/stdio.rs","lineNumber":76,"sourceCode":"                    .parse()\n                    .map_err(|_| anyhow::anyhow!(\"invalid --port value `{raw}`\"))?;\n                index += 2;\n            }\n            \"--auth-token\" => {\n                let token = args\n                    .get(index + 1)\n                    .ok_or_else(|| anyhow::anyhow!(\"missing value for --auth-token\"))?;\n                if token.trim().is_empty() {\n                    bail!(\"--auth-token must not be empty\");\n                }\n                auth_token = Some(token.trim().to_string());\n                index += 2;\n            }\n            \"-h\" | \"--help\" => {\n                print_help();\n                return Ok(());\n            }\n            other => bail!(\"unknown mcp arg: {other}\"),\n        }\n    }\n\n    init_mcp_logging(verbose);\n\n    let rt = tokio::runtime::Builder::new_multi_thread()\n        .enable_all()\n        .build()?;\n\n    match transport {\n        McpTransport::Stdio => {\n            log::debug!(\"[mcp_server] starting stdio MCP server\");\n            rt.block_on(async { run_stdio(tokio::io::stdin(), tokio::io::stdout()).await })?;\n        }\n        McpTransport::Http => {\n            #[cfg(feature = \"http-server\")]\n            {\n                let bind_addr: SocketAddr =","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/mcp/server/stdio.rs#L58-L94","documentation":"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.","triggerScenarios":"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.","commonSituations":"Scripts written for a different MCP client; docs drift between versions; config snippets copy-pasted from Claude Desktop/Cursor examples.","solutions":["Run `openhuman mcp --help` (print_help) to list the accepted flags for your build.","Remove the unsupported flag; if it configured real behavior, find the equivalent in the core's config file.","Update wrapper scripts pinned to an older CLI surface."],"exampleFix":"# before\n$ openhuman mcp --transport stdio --scope user\nerror: unknown mcp arg: --scope\n\n# after\n$ openhuman mcp --help   # accepted: -v/--verbose, --transport, --host, --port, --auth-token, -h/--help\n$ openhuman mcp --transport stdio","handlingStrategy":"validation","validationCode":"const MCP_ARGS: &[&str] = &[\"-v\", \"--verbose\", \"--transport\", \"--host\", \"--port\", \"--auth-token\", \"-h\", \"--help\"];\n// reject unknown tokens before spawning the subprocess","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Version-pin wrapper scripts against the CLI they were written for.","Smoke-test `openhuman mcp --help` output in deploy pipelines to catch surface drift.","Keep host/port/token in the documented flag forms rather than inventing new ones."],"tags":["mcp","cli","argument-validation"],"backgroundTag":"invalid-cli-argument","analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}