{"record":{"id":"afe4ea13fffd1e2c","repo":"tinyhumansai/openhuman","slug":"mcp-transport-http-unavailable-built-without-th","errorCode":null,"errorMessage":"mcp --transport http unavailable: built without the http-server feature","messagePattern":"mcp --transport http unavailable: built without the http-server feature","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/mcp/server/stdio.rs","lineNumber":112,"sourceCode":"                let bind_addr: SocketAddr =\n                    format!(\"{bind_host}:{port}\").parse().map_err(|err| {\n                        anyhow::anyhow!(\"invalid bind address `{bind_host}:{port}`: {err}\")\n                    })?;\n                log::debug!(\n                    \"[mcp_server] starting HTTP/SSE MCP server bind={bind_addr} auth={}\",\n                    auth_token.is_some()\n                );\n                rt.block_on(run_http(HttpServerConfig {\n                    bind_addr,\n                    auth_token,\n                }))?;\n            }\n            // Built without the axum transport (#5048): the stdio path above\n            // still works; `--transport http` reports the build fact.\n            #[cfg(not(feature = \"http-server\"))]\n            {\n                let _ = (&bind_host, port, &auth_token);\n                bail!(\"mcp --transport http unavailable: built without the http-server feature\");\n            }\n        }\n    }\n    Ok(())\n}\n\n/// Initialize logging for the MCP server.\n///\n/// MCP servers run as subprocesses of clients (Claude Desktop, Cursor, …) which\n/// surface the server's stderr to the user when something goes wrong. We\n/// therefore always install the tracing subscriber — otherwise `log::error!` /\n/// `log::warn!` events get silently dropped and field-debugging requires\n/// re-running with `--verbose`.\n///\n/// Default level is `warn` to keep the stderr stream quiet under normal use\n/// while still surfacing problems; `--verbose` promotes it to `debug` so\n/// `[mcp_server]` traces become visible. A user-set `RUST_LOG` always wins.\nfn init_mcp_logging(verbose: bool) {","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/mcp/server/stdio.rs#L94-L130","documentation":"The HTTP transport arm of the MCP server is compiled only under the `http-server` Cargo feature (axum + socketioxide, #5048), which is ON in default builds. In a slim build compiled without it, `--transport http` reaches a #[cfg(not(feature = \"http-server\"))] block that bails with this build fact and exits; the stdio arm still works. The message exists so the failure is a one-line diagnostic instead of a server that mysteriously never comes up.","triggerScenarios":"Running `openhuman mcp --transport http` on a binary built `--no-default-features` or with an explicit feature list omitting `http-server`. Note the http arm actually requires both `mcp` and `http-server` (the run path is cfg(all(feature = \"mcp\", feature = \"http-server\"))).","commonSituations":"Slim/embedded builds trimmed for size or kernel-profile artifacts (`--no-default-features --features flows`) accidentally used as a full core; minimal CI binaries reused locally; custom embeds composing their own feature sets.","solutions":["Rebuild with the gate: `cargo build --bin openhuman-core --features mcp,http-server` (the default feature set already includes both).","Or use the stdio transport, which requires only `mcp`.","If you embed the core, surface http-server availability at startup (the core has an http-server status surface) instead of discovering it at first invocation."],"exampleFix":"# before — slim artifact without the axum transport\n$ cargo build --bin openhuman-core --no-default-features --features mcp\n$ openhuman-core mcp --transport http\nerror: mcp --transport http unavailable: built without the http-server feature\n\n# after — include the gate (the http arm needs mcp + http-server)\n$ cargo build --bin openhuman-core --features mcp,http-server\n$ openhuman-core mcp --transport http --auth-token \"$MCP_TOKEN\"","handlingStrategy":"fallback","validationCode":"fn mcp_http_transport_compiled_in() -> bool {\n    cfg!(all(feature = \"mcp\", feature = \"http-server\"))\n}\n// gate flag/UI exposure on this instead of letting users hit the runtime bail","typeGuard":null,"tryCatchPattern":"Catch the bail and fall back to the stdio transport (available under `mcp` alone), or surface 'rebuild with --features http-server' to the operator — this error is a build fact, not a runtime condition to retry.","preventionTips":["Default features include http-server — document any deliberate deviation in slim builds.","Assert feature flags in build scripts for artifacts expected to serve HTTP MCP.","Embedders should consult the core's http-server status surface at startup rather than probing at first call."],"tags":["mcp","http-server","feature-gate","build-config"],"backgroundTag":"feature-not-compiled-in","analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}