void icon indicating copy to clipboard operation
void copied to clipboard

[Bug]MCP Tool Name issue (Server error: spawn npx ENOENT)

Open Casper-Mars opened this issue 7 months ago • 6 comments

VSCode Version: 1.99.3 Void Version: 1.4.9 Commit: 607a61c06810bfbc1ab56a8d9cfd7876d89c1c82 Date: 2025-07-01T10:49:45.634Z Electron: 34.3.2 ElectronBuildId: undefined Chromium: 132.0.6834.210 Node.js: 20.18.3 V8: 13.2.152.41-electron.0 OS: Darwin arm64 21.6.0

  1. Describe the issue/feature here! It is error here:

Image

But it work for Cursor. Same config.

Casper-Mars avatar Jul 02 '25 11:07 Casper-Mars

Image

Me too ,it work for WindSurf,how can i solve it

rainleon avatar Jul 04 '25 03:07 rainleon

i started having the same problem.

schoberwirt avatar Jul 06 '25 09:07 schoberwirt

This is likely a shell PATH inheritance issue i.e. gui-launched apps on macOS don’t get your login-shell’s PATH, so the mcp commands (e.g. npx) aren’t on their search path. one workaround is to launch Void from a shell so it picks up your PATH, for example: open -a Void. Alternatively you can add your Node/MCP paths explicitly in argv.json. Pls see #701 which has more context around this.

vrtnis avatar Jul 06 '25 18:07 vrtnis

Me too ,it work for WindSurf,how can i solve it

Use the full path to npx or uvx

Image

khill-fbmc avatar Jul 13 '25 14:07 khill-fbmc

#838 #705 #770 #701 #789 #833 #656 #419 #752 #701

duaneking avatar Jul 24 '25 15:07 duaneking

Hello everyone, the problem is that when the app is run in another environment, in order for it to work, people use open -a Void, but there are two other solutions:

  1. Launch Void in correct environment when starting the Osx: nano ~/Library/LaunchAgents/com.void.wrapper.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key> <string>com.void.wrapper</string>

  <key>ProgramArguments</key>
  <array>
    <string>/usr/bin/open</string>
    <string>-a</string>
    <string>Void</string>
  </array>

  <key>EnvironmentVariables</key>
  <dict>
    <key>PATH</key>
    <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin</string>
  </dict>

  <key>RunAtLoad</key> <true/>
</dict>
</plist>

  1. Permanent: sudo launchctl config user path "$(brew --prefix)/bin:$(npm config get prefix)/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" Reboot OSX and when you open Void, it will recognise the npx and the mcp will work.

  1. Permanent 2, edit the zprofile. nano ~/.zprofile

At the end of the file, add the paths where your npx is located.

export PATH="/usr/local/bin:/Users/too-rzy/.nvm/versions/node/v22.17.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH"

Happy Coding 🥳 Regards

klich3 avatar Aug 09 '25 01:08 klich3