Troubleshooting

Fix Cursor MCP spawn npx ENOENT

ENOENT means Cursor tried to spawn npx but could not find it in the environment available to the app.

Last updated: June 12, 2026

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.