spawn npx ENOENT
Last verified:
The fix
spawn npx ENOENT: Cursor cannot find npx when it starts an MCP server. spawn node ENOENT is the same miss for node. Point command at the node binary. Error loading plugin - spawn git ENOENT is git, not this.
- 1
Read which program is missing
spawn npx ENOENTorspawn node ENOENTmeans stay on this page.Error loading plugin - spawn git ENOENT, with a colon or a hyphen, means Cursor cannot find git. That fix is the other page, linked below. Do not delete the MCP server entry to hide the line. - 2
Point command at node, and args at the server file
In a terminal where
nodeworks, print the binary (which node,nvm which node, orwhere.exe node). Use that absolute path ascommand. Pass the server's JavaScript entry as one argument.npxhas to be resolved on Cursor's PATH, and that PATH is not your shell PATH.{ "mcpServers": { "example": { "command": "/absolute/path/to/node", "args": ["/absolute/path/to/server/dist/index.js"] } } } - 3
Keep a path with spaces as one string
On Windows the node binary is often under
C:\Program Files\nodejs\node.exe. In JSON that is onecommandstring. Do not split it into two args on the space. If the server still fails, run the samecommandandargsin a terminal and read stderr. Fix the path from that output. - 4
Confirm the server lists its tools
Reload the MCP server after saving the config. The fix worked when that server shows its tools. If you cannot use an absolute path, quit Cursor completely and start it from a terminal so it inherits that shell's PATH (
cursor .). Opening it from the Dock or the Start menu drops that PATH again.
Why it happens
An MCP stdio server is a program Cursor spawns. spawn npx ENOENT or spawn node ENOENT means the operating system could not find that program. Cursor's extension host does not load your shell startup files, so nvm, fnm, volta, and asdf can put node and npx on the PATH inside a terminal while Cursor, opened from the Dock or the Start menu, still cannot see them.
The config is the user-level MCP config or the project .cursor/mcp.json. A wrong absolute path, a command of npx with no npx on that PATH, or a Windows path split on the space in Program Files all end as ENOENT. An empty tool list is the next failure: the process started and exited, or never finished registering. Error loading plugin - spawn git ENOENT is a different program. That line is git, used while Cursor fetches a plugin. Do not edit mcp.json to fix it.
The next error you'll probably hit
Once this is fixed, the usual follow-up is Error loading plugin - spawn git ENOENT. Error loading plugin - spawn git ENOENT: Cursor cannot find git while it loads a plugin. Install Git, run git --version, quit Cursor fully, and reopen. spawn npx ENOENT is an MCP server, not this.
Prompt to paste back into your AI tool
Paste this above the error.
Cursor failed to start an MCP server. The error is: <paste it, for example spawn npx ENOENT, spawn node ENOENT, or an empty tool list> Do not hide this by removing the server, swallowing the spawn error, or inventing a tool list. Do not say it is fixed unless the MCP server shows its tools. Do not invent click-paths through the Cursor UI. 1. If the line is Error loading plugin - spawn git ENOENT, or Error loading plugin: spawn git ENOENT, stop. That is git, not this file. Do not edit mcp.json for that line. 2. Otherwise the program named after spawn is not on Cursor's PATH. The extension host PATH is not an interactive shell (nvm, fnm, volta, asdf). 3. Set command to the absolute path of node, and args to the server entry file. Do not rely on npx alone. Keep a Windows path that contains spaces as one JSON string. 4. Tell me to run that same command in a terminal and to confirm Cursor lists the tools. Change only the MCP server config.
Common questions
+It works in my terminal and fails inside Cursor. Why?
The terminal sourced nvm, fnm, or a profile script. Cursor did not. spawn npx ENOENT is that missing PATH. An absolute path to node does not depend on the profile.
+The message is Cannot find module, not spawn ENOENT. Is this the same bug?
No. Cannot find module and Can't resolve are a bad import path. This page is only Cursor failing to launch node or npx for an MCP server.
+The line says Error loading plugin - spawn git ENOENT. Do I edit mcp.json?
No. That line is git, missing while Cursor fetches a plugin. Install Git, confirm git --version, and fully quit Cursor before reopening. The MCP config is for spawn npx ENOENT and spawn node ENOENT.
Related errors
- Error loading plugin - spawn git ENOENTError loading plugin - spawn git ENOENT: Cursor cannot find git while it loads a plugin. Install Git, run git --version, quit Cursor fully, and reopen. spawn npx ENOENT is an MCP server, not this.CursorNodeNov 3, 2026
- Connection failed. Please try againConnection failed. Please try again: Cursor 3.24.18 crashes before the request when no folder is open. Open a project folder. This is not a network outage.CursorTypeScriptOct 19, 2026
- Module not found: Can't resolveModule not found: Can't resolve means the import path or package is not on disk, often after an AI edit. Fix the path or install the package, then restart.CursorLovableBoltTypeScriptNext.jsOct 14, 2026
- it keeps rewriting the same fileit keeps rewriting the same file: the new error is in code the model added to hide the last one. Revert that diff and paste the original error once.CursorLovableBoltNext.jsReactOct 14, 2026