{"record":{"id":"64f1b89b9b3c7961","repo":"tinyhumansai/openhuman","slug":"command-was-not-found-this-mcp-server-needs-n","errorCode":null,"errorMessage":"`{command}` was not found. This MCP server needs Node.js, which doesn't appear to be installed (or isn't on OpenHuman's PATH). Install Node.js from https://nodejs.org and restart OpenHuman.","messagePattern":"`(.+?)` was not found\\. This MCP server needs Node\\.js, which doesn't appear to be installed \\(or isn't on OpenHuman's PATH\\)\\. Install Node\\.js from https://nodejs\\.org and restart OpenHuman\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/mcp/config_servers/stdio.rs","lineNumber":101,"sourceCode":"            command.env(key, value);\n        }\n\n        // Resolve the command up front so a missing Node/uv runtime fails with\n        // actionable guidance instead of a bare ENOENT from `spawn`.\n        let effective_path = self\n            .env\n            .iter()\n            .rev()\n            .find(|(key, _)| key == \"PATH\")\n            .map(|(_, value)| value.as_str())\n            .unwrap_or(resolved_path.as_str());\n        if spawn_env::locate_command(&self.command, effective_path, self.cwd.as_deref()).is_none() {\n            tracing::warn!(\n                target: \"[mcp_client::stdio]\",\n                command = %self.command,\n                \"stdio MCP command not found on resolved PATH\"\n            );\n            anyhow::bail!(spawn_env::missing_command_error(&self.command));\n        }\n\n        let mut child = command\n            .spawn()\n            .with_context(|| format!(\"spawning MCP stdio server `{}`\", self.command))?;\n        let stdin = child\n            .stdin\n            .take()\n            .ok_or_else(|| anyhow::anyhow!(\"stdio server missing stdin\"))?;\n        let stdout = child\n            .stdout\n            .take()\n            .ok_or_else(|| anyhow::anyhow!(\"stdio server missing stdout\"))?;\n        let mut session = StdioSession {\n            child,\n            stdin,\n            stdout: BufReader::new(stdout),\n            initialize: McpInitializeResult {","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/mcp/config_servers/stdio.rs#L83-L119","documentation":"Raised by the stdio MCP transport before spawning: `spawn_env::locate_command` could not find `npx`, `npm`, or `node` on the resolved PATH (config `env` PATH override, else the OpenHuman spawn PATH), so the server process is never started. `missing_command_error` recognizes Node-family commands by basename (after the last `/` or `\\\\`, case-insensitive) and emits this Node.js-specific guidance. A `tracing::warn` with target `[mcp_client::stdio]` is emitted alongside.","triggerScenarios":"A `[[mcp_client.servers]]` stdio entry with `command = \"npx\"` (or `node`/`npm`, or an absolute path whose basename is one of these) on a machine without Node.js installed, or where Node is installed via a shell-only PATH injection (nvm, volta shim, homebrew shellenv) that OpenHuman's process does not inherit.","commonSituations":"GUI-launched OpenHuman not inheriting the login shell PATH (macOS .zshrc-only nvm setup); Node installed for the user but OpenHuman running as a service/other user; Windows Node installed but not on system PATH; fresh machine where the MCP server was configured before installing its runtime.","solutions":["Install Node.js from https://nodejs.org and fully restart OpenHuman (not just reload the window).","If Node is already installed, add its bin dir to the PATH OpenHuman sees — prefer the system PATH over shell-rc-only setup, or set an explicit `env = { PATH = \"...\" }` on the server entry (the last PATH entry in `env` wins).","Use an absolute `command` path to the npx/node binary to bypass PATH resolution entirely.","Verify with `which npx` in the same environment OpenHuman launches from."],"exampleFix":"# before (config.toml) — relies on inherited PATH\n[[mcp_client.servers.context7]]\ncommand = \"npx\"\nargs = [\"-y\", \"@upstash/context7-mcp\"]\n\n# after — pin the absolute binary, or inject PATH explicitly\n[[mcp_client.servers.context7]]\ncommand = \"/opt/homebrew/bin/npx\"\nargs = [\"-y\", \"@upstash/context7-mcp\"]\n# alternatively:\n# [[mcp_client.servers.context7.env]]\n# key = \"PATH\"\n# value =\"/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin\"","handlingStrategy":"validation","validationCode":"// before enabling a Node-based stdio server, verify the runtime is visible:\nlet path = std::env::var(\"PATH\").unwrap_or_default();\nif spawn_env::locate_command(\"npx\", &path, None).is_none() {\n    // surface a setup hint instead of letting the first call fail\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install Node.js system-wide rather than via shell-rc-only managers when running GUI apps.","Pin `command` to an absolute binary path in config to bypass PATH resolution.","Restart OpenHuman fully after installing runtimes — PATH is snapshotted at launch."],"tags":["mcp","stdio","nodejs","path","command-not-found"],"backgroundTag":"command-not-found","analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}