Fast Fix
Find npx in your terminal and use the full path in your MCP config.
which npx node -p "process.env.PATH"
Example Config
Replace /absolute/path/to/npx with the path from your machine.
{
"mcpServers": {
"filesystem": {
"command": "/absolute/path/to/npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
}
}
}Why It Happens
Cursor may launch as a GUI app and miss shell initialization from .zshrc, nvm, fnm, asdf, or package manager shims.
FAQ
What does ENOENT mean?
The executable was not found. In this case, Cursor cannot find npx.
Is this an MCP server bug?
Usually no. It is usually command resolution before the server even starts.
Can I use npm instead of npx?
Sometimes, but the server package instructions usually determine the safest command.