{"record":{"id":"34b9a74cd300dfb8","repo":"tinyhumansai/openhuman","slug":"unknown-transport-value-other-expected-stdi","errorCode":null,"errorMessage":"unknown --transport value `{other}` (expected stdio or http)","messagePattern":"unknown --transport value `(.+?)` \\(expected stdio or http\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/mcp/server/stdio.rs","lineNumber":42,"sourceCode":"    let mut bind_host = \"127.0.0.1\".to_string();\n    let mut port: u16 = 9300;\n    let mut auth_token: Option<String> = None;\n\n    let mut index = 0usize;\n    while index < args.len() {\n        match args[index].as_str() {\n            \"-v\" | \"--verbose\" => {\n                verbose = true;\n                index += 1;\n            }\n            \"--transport\" => {\n                let value = args\n                    .get(index + 1)\n                    .ok_or_else(|| anyhow::anyhow!(\"missing value for --transport\"))?;\n                transport = match value.as_str() {\n                    \"stdio\" => McpTransport::Stdio,\n                    \"http\" => McpTransport::Http,\n                    other => bail!(\"unknown --transport value `{other}` (expected stdio or http)\"),\n                };\n                index += 2;\n            }\n            \"--host\" => {\n                bind_host = args\n                    .get(index + 1)\n                    .ok_or_else(|| anyhow::anyhow!(\"missing value for --host\"))?\n                    .clone();\n                index += 2;\n            }\n            \"--port\" => {\n                let raw = args\n                    .get(index + 1)\n                    .ok_or_else(|| anyhow::anyhow!(\"missing value for --port\"))?;\n                port = raw\n                    .parse()\n                    .map_err(|_| anyhow::anyhow!(\"invalid --port value `{raw}`\"))?;\n                index += 2;","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/mcp/server/stdio.rs#L24-L60","documentation":"Argument parsing for `openhuman mcp` accepts exactly two lowercase transport literals — \"stdio\" and \"http\" — and rejects anything else at parse time, before the server or runtime starts. Matching is case-sensitive, so `HTTP` and `SSE` are equally invalid.","triggerScenarios":"Passing `--transport SSE`, `--transport HTTP` (uppercase), `--transport ws`, or any other client-convention value to `openhuman mcp`. (A missing value after the flag is a separate, earlier error.)","commonSituations":"Values copied from other MCP clients' configs (Claude Desktop-era `sse` transport naming); case typos; scripts written against a different tool's CLI.","solutions":["Use exactly `stdio` or `http`, lowercase.","Map remote/SSE-style server configs to `http` — that is this binary's network transport.","Run `openhuman mcp --help` (print_help) to confirm the accepted values on your build."],"exampleFix":"# before\n$ openhuman mcp --transport SSE\nerror: unknown --transport value `SSE` (expected stdio or http)\n\n# after\n$ openhuman mcp --transport http","handlingStrategy":"validation","validationCode":"const VALID_TRANSPORTS: &[&str] = &[\"stdio\", \"http\"];\nif !VALID_TRANSPORTS.contains(&transport_arg.as_str()) {\n    anyhow::bail!(\"--transport must be one of {VALID_TRANSPORTS:?} (case-sensitive)\");\n}","typeGuard":"fn is_valid_mcp_transport(v: &str) -> bool {\n    matches!(v, \"stdio\" | \"http\")\n}","tryCatchPattern":null,"preventionTips":["Pin literal lowercase values in wrapper scripts and configs.","Add a CI smoke test that runs `openhuman mcp --help` and asserts the accepted flag set.","Translate other clients' `sse` naming to `http` at your integration boundary."],"tags":["mcp","cli","argument-validation","transport"],"backgroundTag":"invalid-cli-argument","analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}