Solution for MCP Servers Connection Issues with NVM/NPM #31
Closed
ChanMeng666
started this conversation in
General
Replies: 0 comments 1 reply
-
Thanks for writing this up! I'm going to merge this with #64, in the hopes that we can figure out a cross-platform better way of supporting NVM here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Solution for MCP Servers Connection Issues with NVM/NPM
Background
This solution is inspired by and builds upon the workaround discussed in Issue #64. While the original solution was for macOS, this implementation is specifically for Windows systems using NVM (Node Version Manager).
Problem
When using NVM or standard Node.js installation, the default configuration using
npx
commands fails to connect MCP servers in Claude Desktop.Solution Overview
The solution involves:
npx
Step-by-Step Guide
1. Locate Node.js and npm paths
Open Command Prompt (CMD) as administrator and run:
This will show your Node.js executable path. Example output:
Then find your global npm packages location:
Example output:
2. Install Required Packages Globally
Run these commands in CMD:
3. Verify Installations
Check each package installation:
Expected output format:
4. Update Configuration File
Modify your
claude_desktop_config.json
with the following content (adjust paths according to your system):5. Important Notes
\\
) in all Windows pathsuvx
commands unchangedenv
sections if needed6. Apply Changes
Verification
After restart, all MCP servers should connect successfully. The
uvx
-based servers will continue to work as before, and the npm-based servers should now connect properly with the new configuration.Troubleshooting
If you encounter issues:
dir
commandnpm list -g
This solution has been tested on Windows 11 (Build 22631.4460) with Node.js managed by NVM.
Beta Was this translation helpful? Give feedback.
All reactions