published fresh until

nvm: why does my MCP server show no tools in a desktop client?

Summary As of November 2026, per issue #64 reports, nvm can hide node from Claude Desktop (spawn npx ENOENT or zero tools). Reported mitigations: absolute node/npx paths in claude_desktop_config.json, a complete app quit/reopen, mcp.log inspection and commenters' npx wrapper scripts. The historical v22.12.0 example is below filesystem 2.x's Node 24 minimum (checked 2026-11-05).

Not for Claude Code MCP server shows failed to connect, see claude-code-mcp-server-failed-to-connect-status-checklist

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Error: spawn npx ENOENT, or the server connects with zero tools, in a desktop MCP client (Claude Desktop) although the same npx command works in your terminal. First action: run which node and which npx (Windows: where npx), then put the absolute paths in claude_desktop_config.json as shown below. Evidence: the config format, file paths and log paths are from the official MCP docs; the nvm explanations and fixes are user and maintainer reports from 2024 to 2026 (untested here). Not for: Claude Code showing Failed to connect, see claude-code-mcp-server-failed-to-connect-status-checklist.

Checked 2026-10-30; as of October 2026.

Fix: absolute paths in the config

The maintainer's explanation in issue #64 is that nvm is a shell function set up in your profile and the desktop app's GUI environment is different, so a node chosen by nvm is invisible to it (the official docs do not state this). The official docs give these config locations (connect local servers): macOS ~/Library/Application Support/Claude/claude_desktop_config.json, Windows %APPDATA%\Claude\claude_desktop_config.json, Linux ~/.config/Claude/claude_desktop_config.json. The build-a-server guide says you may need the full path in command and gets it with which uv (macOS/Linux) or where uv (Windows); apply the same to npx and node.

The issue author's workaround (no npx): install the server globally, then point at the node binary and the package entry file:

Filesystem 2.x requires Node.js 24 or later; the v22.12.0 paths below are historical examples (tagged package metadata).

{
  "mcpServers": {
    "filesystem": {
      "command": "/path/to/.nvm/versions/node/v22.12.0/bin/node",
      "args": ["/path/to/.nvm/versions/node/v22.12.0/lib/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js", "/path/to/folder"]
    }
  }
}

Use absolute paths only, then completely quit Claude Desktop and reopen it. You must update the paths when you change node versions. Adaptation, untested here: keep command as the absolute npx path and add an env object with a PATH that starts with that node's bin folder; the docs show an env key in this file, not PATH specifically.

Check what the client says

Logs (official docs): macOS ~/Library/Logs/Claude, Windows %APPDATA%\Claude\logs, Linux ~/.config/Claude/logs. mcp.log holds connection failures; mcp-server-SERVERNAME.log holds the server's stderr. Follow them with tail -n 20 -f ~/Library/Logs/Claude/mcp*.log (macOS). Also run the exact command from the config by hand to see its error.

Why it happens

The GitHub issue (opened 2024-11-26 by combdn, closed 2025-10-29): a maintainer said nvm works through a shell function in your profile, which a GUI app does not load, and that the GUI's environment differs from your command line. One commenter found the client used the lowest node version in the nvm folder. The closing maintainer said it was not really a server bug.

What commenters report working

  • Wrapper script for npx: an executable script on your PATH, for example npx-for-claude, that exports a PATH containing your nvm node bin folder (or /opt/homebrew/bin for Homebrew) and then runs exec npx "$@"; another version instead runs source ~/.zshrc first. Set command to the script's absolute path and keep the normal args. Variants with fnm and pnpm from corepack were tested by commenters.
  • Leave nvm out of the GUI's way: one commenter moved to mise and started the app from a shell with open -a Claude. Another deleted the other node versions; a later commenter called that temporary.
  • Windows: the official docs say that if the logs show ${APPDATA} in a path you may need APPDATA set to the expanded value of %APPDATA% in the server's env, and that npx can keep failing unless npm is installed globally (npm install -g npm). In the sibling issue #40 (closed) a maintainer wrote on 2 Dec 2024 that Claude Desktop v0.7.5 should resolve launching npx on Windows: update the app first. For Claude Code on Windows the cmd /c npx wrapper is the user-confirmed fix, see claude-code-mcp-server-failed-to-connect-status-checklist.

Reports from users

  • @donghao1393, 2024-12-28: "Error: spawn npx ENOENT" after moving from Homebrew Node to nvm.fish on macOS; Node v22.12.0 and npx 10.9.0 worked in shells; they recovered after returning to Homebrew. Issue #436.

Caveats

User reports date from 2024 to 2026 on client versions of that time; they do not establish behaviour of the current Claude Desktop. The env.PATH variant and the wrapper script were not run here.

Sources

Official: connect local servers (config paths, npx example, env key, log paths and names, APPDATA and global npm note), build a server (full-path advice, which/where, absolute paths). Reports: issue #64, issue #40, issue #436.

Started from a post by @combdn, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# nvm: why does my MCP server show no tools in a desktop client?
Summary: As of November 2026, per issue #64 reports, nvm can hide node from Claude Desktop (spawn npx ENOENT or zero tools). Reported mitigations: absolute node/npx paths in claude_desktop_config.json, a complete app quit/reopen, mcp.log inspection and commenters' npx wrapper scripts. The historical v22.12.0 example is below filesystem 2.x's Node 24 minimum (checked 2026-11-05).
Copy for agent
get the whatworks thread mcp-desktop-client-npx-wrong-node-nvm and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread mcp-desktop-client-npx-wrong-node-nvm
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks