Claude Desktop MCP servers using npx fail to connect on Windows; fix by using absolute node.exe path after global install
On Windows 11, Claude Desktop fails to connect to several MCP servers (filesystem, github, memory, puppeteer, brave-search, google-maps, postgres) configured with npx in claude_desktop_config.json, while uvx-based servers such as sqlite and fetch connect. How can the npx-based servers be made to connect?
Originally asked on GitHub: https://github.com/modelcontextprotocol/servers/issues/76
5 answers
Status: a maintainer replied that this is the same issue as modelcontextprotocol/servers#40 and that a fix was being worked on. The issue was closed as not planned. Until then, commenters reported that the workaround below got their servers connecting.
Steps that worked for commenters:
- Install each server package globally. Run these in Command Prompt:
npm install -g @modelcontextprotocol/server-filesystem @modelcontextprotocol/server-github @modelcontextprotocol/server-memory @modelcontextprotocol/server-puppeteer @modelcontextprotocol/server-brave-search @modelcontextprotocol/server-google-maps @modelcontextprotocol/server-postgres
Check each install with npm list -g. One commenter said the install step had to succeed for the rest to work.
-
Find the absolute paths with where node and npm root -g. Example outputs in the thread include D:\Program\nvm\node.exe and C:/Program Files/nodejs/node.exe.
-
In claude_desktop_config.json, replace the npx command with the full path to node.exe. Pass the package's dist/index.js path as the first argument, followed by the original arguments:
{ "mcpServers": { "filesystem": { "command": "C:/Program Files/nodejs/node.exe", "args": [ "C:/Program Files/nodejs/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js", "C:/Users/you/projects" ] } } }
Repeat for each server with its own dist/index.js. One Windows 10 user reported that only memory and puppeteer connected at first. They fixed the rest by using the full node.exe path instead of just "node". Another user reported that github initially failed and later worked after they added their token to the env block. The thread does not confirm that the token is strictly required.
Security note: the config stores GITHUB_PERSONAL_ACCESS_TOKEN and other API keys in plain text, so use tokens with limited scopes.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Original config used npx -y with the @modelcontextprotocol/server-* packages for seven servers and uvx for sqlite and fetch. The npx-based servers failed to connect while the uvx-based ones worked.
Source: https://github.com/modelcontextprotocol/servers/issues/76 (opens external site)
Did this work for you?What @ChanMeng666 tried on GitHub (Worked)
Commenter suggested installing each server package globally with npm install -g, finding node with where node and global modules with npm root -g, then setting command to the absolute node.exe path and passing dist/index.js as the first argument. Several users reported this worked.
Did this work for you?What @mcgraf tried on GitHub (Partly worked)
A Windows 10 user followed the global install and absolute path steps but only the memory and puppeteer servers connected.
Did this work for you?What @mcgraf tried on GitHub (Worked)
A user changed the command from node to the full path of node.exe and got the remaining servers working.
Did this work for you?
Related questions
- mcp-server-fetch: 'AnyUrl' object has no attribute 'decode' error
- Does the official MCP Postgres example validate SQL before executing it?
- How to fix UTF-8 Japanese text corruption/crash in mcp-server-sqlite with Claude Desktop on Windows?
- MCP Knowledge Graph Memory Server fails with ${workspaceFolder} in MEMORY_FILE_PATH
- npx @modelcontextprotocol/server-filesystem: ERR_MODULE_NOT_FOUND for zod-to-json-schema