Developer Troubleshooting EngineInstant OS Fixes
MCP Error Decoder
Search exact error strings and stack traces from Claude Desktop, Cursor, and OpenAI Codex CLI. Inspect root causes and copy verified terminal fixes.
Category:
Environment & RuntimeCritical
spawn npx ENOENT / command not found
Symptom
AI client crashes or logs 'Error: spawn npx ENOENT' immediately when trying to launch a configured MCP server.
Root Cause
The AI host application (Claude Desktop, Cursor, etc.) was launched in a graphical desktop environment that does not inherit your terminal's user $PATH, or Node.js is not installed globally.
Remediation & Quick Fix
Replace 'command': 'npx' with the absolute path to your npx binary (e.g. C:/Program Files/nodejs/npx.cmd on Windows or /usr/local/bin/npx on macOS).
OS Diagnostic Commands:
mac
# Find your exact npx binary location:
which npx
# Example output: /usr/local/bin/npx or /opt/homebrew/bin/npxwindows
# Find your exact npx.cmd binary location in PowerShell:
where.exe npx.cmd
# Example output: C:\Program Files\nodejs\npx.cmdlinux
# Find npx binary path:
which npx
# Example output: /usr/bin/npxVerified Configuration Example:
{
"mcpServers": {
"filesystem": {
"command": "C:/Program Files/nodejs/npx.cmd",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "C:/Users/name/sandbox"]
}
}
}