Troubleshooting
Fix "spawn npx ENOENT" when starting an MCP server
The error means your AI app could not find the npx command. Either Node.js is not installed, or the app cannot see it because desktop apps do not always load the same PATH as your terminal. Install Node.js, then use the full path to npx in the server config and restart the app.
Why it happens
- Node.js is not installed.
- Node.js is installed through a version manager (nvm, fnm, volta) that only your terminal knows about.
- The app was open while you installed Node.js and has not been restarted.
How to fix it
- 1
Check that Node.js is installed
Open a terminal and run
node -vandnpx -v. If either fails, install the LTS version from nodejs.org, then restart your AI app. - 2
Use the full path to npx
Find the path with
which npx(macOS and Linux) orwhere npx(Windows). Put that full path in the config instead of plainnpx:"command": "/Users/you/.nvm/versions/node/v22.11.0/bin/npx" - 3
Restart the app completely
Quit the app (not just the window) and open it again so it picks up the new PATH and config.
- 4
On Windows, call npx through cmd
Some Windows setups need
"command": "cmd"with"args": ["/c", "npx", "-y", "package-name"].
Still stuck? Every server page on this site shows the exact config for each app. Find your server.