npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-nvm-bridge

v1.0.0

Published

Bridge to make MCP (Model Context Protocol) servers work seamlessly with NVM (Node Version Manager)

Readme

mcp-nvm-bridge

npm version License: MIT

Bridge to make MCP (Model Context Protocol) servers work seamlessly with NVM (Node Version Manager).

The Problem

When using NVM (Node Version Manager), MCP servers fail to run properly because:

  • npx uses the wrong Node.js version
  • Module resolution fails due to incorrect paths
  • Environment variables from NVM aren't passed through
  • The standard MCP installation instructions don't work

This affects millions of developers who use NVM for Node.js version management.

The Solution

mcp-nvm-bridge automatically detects NVM, resolves the correct paths, and bridges MCP servers to work perfectly with your NVM setup. No more manual configuration or path hunting!

Installation

npm install -g mcp-nvm-bridge

Usage

Basic Usage

Instead of struggling with paths, just use mcp-nvm-bridge:

# Run any MCP server through the bridge
mcp-nvm-bridge @modelcontextprotocol/server-filesystem /home

# With arguments
mcp-nvm-bridge @modelcontextprotocol/server-github --token YOUR_TOKEN

# Local servers work too
mcp-nvm-bridge ./my-local-server.js --port 3000

Generate Claude Desktop Configuration

Automatically generate the configuration file for Claude Desktop:

# Generate config for multiple servers
mcp-nvm-bridge --generate-config filesystem github memory

# This creates/updates the Claude Desktop config with proper paths

Quick Setup

Install and configure a server in one command:

# Install and configure the filesystem server
mcp-nvm-bridge --setup filesystem

# This will:
# 1. Install the server globally
# 2. Generate the configuration
# 3. Verify everything works

How It Works

  1. Detects NVM - Checks multiple indicators to determine if NVM is active
  2. Resolves Paths - Finds the correct Node.js, npm, and module paths
  3. Bridges Execution - Spawns MCP servers with the proper environment
  4. Preserves stdio - Maintains the exact stdio channels MCP requires

Configuration

Claude Desktop Configuration

After running --generate-config, your claude_desktop_config.json will contain:

{
  "mcpServers": {
    "filesystem": {
      "command": "mcp-nvm-bridge",
      "args": ["@modelcontextprotocol/server-filesystem", "/home"]
    },
    "github": {
      "command": "mcp-nvm-bridge", 
      "args": ["@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "your-token-here"
      }
    }
  }
}

Environment Variables

  • MCP_NVM_DEBUG=true - Enable debug output
  • MCP_NVM_SILENT=true - Suppress informational messages

Troubleshooting

Debug Mode

Run with debug output to see what's happening:

MCP_NVM_DEBUG=true mcp-nvm-bridge @modelcontextprotocol/server-filesystem

Common Issues

Server not found

  • Make sure the server is installed: npm install -g @modelcontextprotocol/server-filesystem
  • Or let npx handle it automatically

Permission denied

  • Check file permissions: chmod +x your-server.js
  • Make sure NVM has proper permissions

Still not working?

  • Check NVM is active: nvm --version
  • Try the debug mode above
  • Open an issue with the debug output

Programmatic Usage

You can also use mcp-nvm-bridge programmatically:

const { bridge, isNVMActive, getNVMInfo } = require('mcp-nvm-bridge');

// Check if NVM is active
if (isNVMActive()) {
  console.log('NVM detected!');
  console.log(getNVMInfo());
}

// Bridge a server programmatically
const child = await bridge('@modelcontextprotocol/server-filesystem', ['/home']);

Supported Platforms

  • ✅ macOS
  • ✅ Linux
  • ✅ WSL (Windows Subsystem for Linux)
  • ❌ Windows (native) - NVM for Windows uses a different structure

How It Solves The Problem

Without mcp-nvm-bridge (Broken)

# This fails with NVM
npx @modelcontextprotocol/server-filesystem

# Error: Cannot find module...

With mcp-nvm-bridge (Working)

# This just works!
mcp-nvm-bridge @modelcontextprotocol/server-filesystem

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. See CONTRIBUTING.md for details.

License

MIT © Harsh Joshi

Acknowledgments

  • Thanks to Anthropic for creating the Model Context Protocol
  • Thanks to the NVM project for Node.js version management
  • Thanks to all developers who reported issues and helped test

Links