tinyhumansai/openhuman · error · anyhow::Error

stdio server missing stdout

Error message

stdio server missing stdout

What it means

After spawning the stdio MCP child, child.stdout was None — stdout was not piped for this spawn, so the host can never read JSON-RPC responses from the server. A transport-setup defect, not a server behaviour problem.

Source

Thrown at src/openhuman/mcp/config_servers/stdio.rs:114

            tracing::warn!(
                target: "[mcp_client::stdio]",
                command = %self.command,
                "stdio MCP command not found on resolved PATH"
            );
            anyhow::bail!(spawn_env::missing_command_error(&self.command));
        }

        let mut child = command
            .spawn()
            .with_context(|| format!("spawning MCP stdio server `{}`", self.command))?;
        let stdin = child
            .stdin
            .take()
            .ok_or_else(|| anyhow::anyhow!("stdio server missing stdin"))?;
        let stdout = child
            .stdout
            .take()
            .ok_or_else(|| anyhow::anyhow!("stdio server missing stdout"))?;
        let mut session = StdioSession {
            child,
            stdin,
            stdout: BufReader::new(stdout),
            initialize: McpInitializeResult {
                protocol_version: LATEST_PROTOCOL_VERSION.into(),
                capabilities: json!({}),
                server_info: json!({}),
                instructions: None,
            },
        };

        let response = self
            .send_request_on_session(
                &mut session,
                "initialize",
                json!({
                    "protocolVersion": LATEST_PROTOCOL_VERSION,

View on GitHub (pinned to 7491200858)

Solutions

  1. Ensure the StdioCommand is created with stdout piped (Stdio::piped) before spawn
  2. Verify the command is not redirecting stdout to a file or /dev/null
  3. Re-spawn the child with both stdin and stdout piped
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/openhuman/mcp/config_servers/stdio.rs:114 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/1f922566c104732b. Report an issue: GitHub.