Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fnm multishell makes it unable to run npx MCP server in Claude Desktop #1366

Open
piavgh opened this issue Jan 13, 2025 · 3 comments
Open

fnm multishell makes it unable to run npx MCP server in Claude Desktop #1366

piavgh opened this issue Jan 13, 2025 · 3 comments

Comments

@piavgh
Copy link

piavgh commented Jan 13, 2025

You can try this to add the brave-search MCP server to Claude Desktop (Mac OS latest version): https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search

The problem is: the npx path is changed every time a new shell session is opened (this also apply to Claude Desktop, each time you open it, it creates a new shell session)
If you tried which npx, each time it will show you a different path of npx as a random version here ~/.local/state/fnm_multishells

I want to disable multishell behavior like this. Is there any way?
Thanks

@plasmadice
Copy link

plasmadice commented Feb 8, 2025

Discovered this when trying to figure out why the Open in VLC browser extension was not able to find the node native client. I wasn't able to find a solution. Switched to nvm and set up auto-switching instead.

@piavgh
Copy link
Author

piavgh commented Feb 9, 2025

Discovered this when trying to figure out why the Open in VLC browser extension was not able to find the node native client. I wasn't able to find a solution. Switched to nvm and set up auto-switching instead.

yeah, I also had to switch to nvm and problem solved

@sonlexqt
Copy link

sonlexqt commented Mar 1, 2025

Here's my dirty workaround (create symlinks to fnm's default alias) - there should be better ways to do it.

#!/bin/bash

# Create or update the symlink to the current fnm Node version
sudo ln -sf /Users/sonle/.local/share/fnm/aliases/default/bin/node /usr/local/bin/node
sudo ln -sf /Users/sonle/.local/share/fnm/aliases/default/bin/npm /usr/local/bin/npm
sudo ln -sf /Users/sonle/.local/share/fnm/aliases/default/bin/npx /usr/local/bin/npx
sudo ln -sf /Users/sonle/.local/share/fnm/aliases/default/bin/corepack /usr/local/bin/corepack

echo "Node.js symlinks updated"
echo "node: $(node --version)"
echo "npm: $(npm --version)"
echo "npx: $(npx --version)"
echo "corepack: $(corepack --version)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants