MongoDB MCP fails outside Editor window mode: npm prefix resolves to Cursor app resources path (ENOENT), and MCP tools may not register

Thanks for the feedback @Haiwei_Wang! This is a known bug that’s gaining traction pretty quickly.

Two known workarounds:

  1. Set command to the absolute path of system npx (e.g., /Users/<user>/.nvm/versions/node/<version>/bin/npx)
  2. Add "env": { "NPM_CONFIG_PREFIX": "<npm config get prefix value>" } to each MCP server entry in mcp.json