modelcontextprotocol/servers

MCP servers fail to connect with `npx` on Windows

Closed this issue · 112 comments

image

I am on Windows with the latest desktop version, I have enabled developer mode and I am in Europe

Can you share your %APPDATA%\Claude\claude_desktop_config.json? (In case this doesn't make sense, I'm referring to step 2 in the Windows quickstart guide here: https://modelcontextprotocol.io/quickstart#installation)

The docs are a bit confusing, and I had a similar issue. You should add the individual MCP servers under the mcpServers key in the JSON like so.

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        ...
      ]
    },
    "memory": {
      "command": "npx",
      "args": [...]
    }
  }
}

They should then show up correctly in the Developer config.

image

image

Thank you, it works! Now, how do I integrate Github?

You should use the github config that you had before, instead of the filesystem and memory configs that I have. You can add it as another key after filesystem and memory, though those configs won't work exactly as I have written since I omitted the args key for brevity.

You can try:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y",  "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
      }
    }
  }
}

OK Thanks, it's super cool for your help. But well... it's not working. I entered the key correctly but when I ask Claude, for example to create an issue, it won't do it

image

Are you able to get the GitHub server working with the MCP Inspector? That will help narrow down whether this is a desktop app issue, or a problem with the server setup.

I've got almost the exact same situation. I have two servers configured:

{
  "mcpServers": {
    "sqlite": {
      "command": "uvx",
      "args": ["mcp-server-sqlite", "--db-path", "/Users/glen/src/experiments/claude-local-sqlite"]
    },
    "brave_search": {
      "command": "npx",
      "args": ["@modelcontextprotocol/server-brave-search"],
      "env": {
        "BRAVE_API_KEY": "<redacted>"
      }
    }
  }
}

My debug log looks fine:

image

Settings looks fine:

image

But no 🔌 icon in the chat window:

image

And a flat refusal to do anything with the connections:

image

Update: just tried on my windows machine, and got the exact same result. Is it possible this is geoblocked in Australia?

Same issue here, there is no 🔌, I do have the filesystem server running but I get a message in Claude Desktop of it failing to attach to the MCP server.

image

image

To add more context based on what geelen said, I am from New Zealand and running on Windows so could be georestrictions, or it could be some device setup.

Having issues running MCPInspector as well so debugging is a bit difficult
image

Update on my end, I switched over to a MacBook as there seemed to be some issues with running this on Windows see: modelcontextprotocol/inspector#76

For the filesystem server it is now working as well as the Github server. The region locked theory is wrong, it's just device configuration/OS support.

For the SQLite and Brave Search the issues #37 #42 may be helpful for the others in this thread as there seems to be some issues with pathing sometimes - though I am still facing issues on Windows.

You're quite right. I had a typo in the path to my DB! That was crashing things, even stopping me from adding other tools.

I'm also experiencing issues with the filesystem server on Windows. Here's my configuration:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\Username\\Desktop"
      ]
    }
  }
}

Same behavior on Windows 11 and Mac OS. Claude desktop 0.71.1 version on both devices.

I'm also experiencing issues with the filesystem server on Windows. Here's my configuration:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\Username\\Desktop"
      ]
    }
  }
}

The same problem with me. My configuration :

{
    "mcpServers": {
        "filesystem": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-filesystem",
                "A:\\Desktop\\"
            ]
        }
    }
}

Experiencing similar issues on Mac OS using Claude Desktop 0.71.1.

I am having the same issue on Windows 10 with latest Claude Desktop

Same issue, log file attached:
image

@mckaywrigley what does your config file look like?

code ~/Library/Application\ Support/Claude/claude_desktop_config.json

Here's what works for me (mac):

TL;DR Try using an absolute path and specify the latest Python version in claude_desktop_config.json when configuring uvx.


Detailed version:

I followed the sqlite instructions but ran into a "Could not connect to MCP server sqlite" error.
After enabling developer mode, i checked to the log file through Developer (menu bar) → Open MCP Log File (mcp.log) and found this error "Could not start MCP server sqlite: Error: spawn uvx ENOENT".

The fix was to use an absolute path in claude_desktop_config.json, e.g.

> which uvx
/usr/local/Homebrew/bin/uvx

After restarting Claude, the "Attach from MCP" button still wasn't appearing next to "Upload files" button.
Checking mcp-server-sqlite.log (in the same directory as mcp.log), I saw this error:

No solution found when resolving tool dependencies:
Because the current Python version (3.9.1) does not satisfy Python>=3.10
(omitted)

Since i have a newer Python installed (via miniconda), I resolved this by passing an extra --python arg to uvx, using the absolute path to python binary.

My full JSON config file:

{
  "mcpServers": {
    "sqlite": {
      "command": "/usr/local/Homebrew/bin/uvx",
      "args": [
        "--python",
        "/usr/local/Homebrew/Caskroom/miniconda/base/bin/python3",
        "mcp-server-sqlite",
        "--db-path",
        "/Users/<user>/test.db"
      ]
    }
  }
}

@thenameless7741 Just to check, are you on an Intel Mac? /usr/local/Homebrew isn't searched as part of the path right now, but that's something we could fix.

Sorry folks, and thanks for your patience! For npx calls in particular, we believe there's an issue with how Claude Desktop is launching subprocesses on Windows, which modelcontextprotocol/typescript-sdk#68 (once integrated) should hopefully fix. 🤞

As a workaround, you should be able to npm install -g the MCP servers you care about, and use node to invoke them directly (instead of npx).

@jspahrsummers I'm still using the old Homebrew setup on my M1 and haven't migrated over to the /opt directory yet. I suspect there are a few others out there in the same boat as me.

@jspahrsummers FYI, I'm using Windows. The memory server is installed globally, but it’s still not working. The closest I’ve gotten is with this config, which starts the server, but after 1 minute, Claude shows the same error: 'Couldn't attach...'

"mcpServers": {
"memory": {
"command": "mcp-server-memory",
"args": []
}
}

@oscarcalvo As @jspahrsummers mentioned, you have to use node directly, like this

{
	"mcpServers" : {
		"filesystem": {
			"command": "node",
			"args": [
			"C:\\Program Files\\nodejs\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js", 
			"C:\\"
			]
		}
	}
}

@rkaradas You are right, thanks

Any ways to access mcp-server inside WSL?

I've tried this but no luck:

"command": "wsl",
            "args":
            [
                "bash",
                "-ic",
                "node /home/timur/dev/personal/mcp/mcp-server-jina/build/index.js"
            ],
"command": "node",
            "args":
            [
                "\\wsl.localhost\\Ubuntu-22\\home\\timur\\dev\\personal\\mcp\\mcp-server-jina\\build\\index.js"
            ],

@oscarcalvo As @jspahrsummers mentioned, you have to use node directly, like this

{
	"mcpServers" : {
		"filesystem": {
			"command": "node",
			"args": [
			"C:\\Program Files\\nodejs\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js", 
			"C:\\"
			]
		}
	}
}

THANKS YOU !!!!!!!

@oscarcalvo As @jspahrsummers mentioned, you have to use node directly, like this

{
	"mcpServers" : {
		"filesystem": {
			"command": "node",
			"args": [
			"C:\\Program Files\\nodejs\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js", 
			"C:\\"
			]
		}
	}
}

This workaround does not work for me? Still getting "Could not attach to MCP server filesystem". I'm on an m2 mac.

this is what mine looks like:

{
  "mcpServers": {
    "filesystem": {
      "command": "/Users/username/.nvm/versions/node/v20.0.0/bin/node",
      "args": [
        "/Users/username/.nvm/versions/node/v20.0.0/lib/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js",
        "/Users/username/Documents/"
      ]
    }
  }
}

@amirrezapanahi Can you share the error showing up in the logs? See here for more details on how to access: https://modelcontextprotocol.io/docs/tools/debugging#viewing-logs

im trying the example on the website and getting this error on windows,

2024-11-26T21:18:48.459Z [error] Could not start MCP server sqlite: Error: spawn uvx ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn uvx',
path: 'uvx',
spawnargs: [Array]

https://modelcontextprotocol.io/docs/tools/debugging#viewing-logs

🤦 i had a typo in my path. working fine now !

Screenshot 2024-11-26 at 21 30 19

i wonder if it would be useful for this GUI button to perform the following command:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
rather than read from the only single mcp.log.

#64
This fixed all issues I was having. npx appears to have issues with MCPs.

UVX packages work well also (e.g. fetch & github ones)

this solved it for me
{
"mcpServers": {
"filesystem": {
"command": "node",
"args": [
"C:\Users\petar\AppData\Roaming\npm\node_modules\@modelcontextprotocol\server-filesystem\dist\index.js",
"C:\Users\petar\Desktop\FS"
]
}
}
}

Thanks for this (was diagnosing and found this thread). Confirmed working - this also works for the Inspector tool.

this solved it for me

@mar0der I don't think this will work as this is not valid json. You need double slashes for escaping.

@oscarcalvo As @jspahrsummers mentioned, you have to use node directly, like this

{
	"mcpServers" : {
		"filesystem": {
			"command": "node",
			"args": [
			"C:\\Program Files\\nodejs\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js", 
			"C:\\"
			]
		}
	}
}

If you're like me and the above solution doesn't work as is, try running the following command:

npm root -g

to find out where the node modules are installed in your system, and replace

C:\Program Files\nodejs\node_modules

above with the output of the command.

@deepseven thanks!!!

This solution worked for me on Windows. Here's my working configuration:

{
  "mcpServers": {
    "filesystem": {
      "command": "node",
      "args": [
        "C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js",
        "C:\\"
      ]
    }
  }
}

image

Hi all, I'm on Windows and have tried the fixe noted above (i.e., using node directly) but Claude Desktop is still not attaching to the MCP server. The log files have said "Attempting to connect to MCP server filesystem..." and then "Connected to MCP server filesystem!". The config file I am using is in the image. Any ideas?

image
image
image

You need to have the index.js referenced .../@modelcontextprotocol/server-filesystem/dist/index.js in the first arg.

Also - if you're not already try using the Inspector tool - it's quicker and easier to diagnose issues.

@evalstate, you are a star! Thank you it now works ... I should have probably just come here earlier instead of noodling around for 90 min lol

Thanks for the help. Here is what worked for me:

Windows MCP Server Connection Fix

Issue: MCP servers not properly attaching in Claude Desktop on Windows despite showing as "connected" in logs.

Root cause: Using npx to run servers can cause attachment issues on Windows.

Solution:
1. Install server package locally:
```powershell
npm install @modelcontextprotocol/server-memory
  1. Locate installed package:
Get-ChildItem -Path node_modules/@modelcontextprotocol/server-memory/dist/index.js
  1. Update claude_desktop_config.json (%AppData%\Claude\claude_desktop_config.json):
{
  "mcpServers": {
    "memory": {
      "command": "node",
      "args": [
        "C:\\Users\\[USERNAME]\\node_modules\\@modelcontextprotocol\\server-memory\\dist\\index.js"
      ]
    }
  }
}
  1. Restart Claude Desktop completely.

Success indicators:

  • Hammer icon appears in chat box
  • Hovering shows "X MCP tools available"
  • Server tools become accessible to Claude

This fix ensures proper server attachment rather than just connection. The plugin icon may not appear on Windows, but the hammer icon indicates successful attachment.

Hello I am trying to install MCP in my mac. However the require json file is not in my folder

~/Library/Application\ Support/Claude/

These are the files I can see in my computer

Cache GPUCache Shared Dictionary config.json
Code Cache IndexedDB SharedStorage sentry
Cookies Local Storage TransportSecurity sqlite_mcp_server.db
Cookies-journal Network Persistent State Trust Tokens window-state.json
Crashpad Preferences Trust Tokens-journal
DawnGraphiteCache Service Worker WebStorage
DawnWebGPUCache Session Storage blob_storage

I tried modifying config.json but then the app would stop working.

Have you tried to nano that dir with the config file?

Pro tip: copy the readme of the server repo into claude and describe your problem and should be able to help you! I did this earlier today on macOS and got it working!

Hello all
On windows 11 > latest Claude Desktop app
trying to make the Brave search work
have the brave api key.
anyone has found a solution?
image

Says it's installed but Doesn't show up on the GUI, and I get errors and cant search locally or on the web!

image image

Help anyone?

@fabiendostie having the same error im on windows 10

Update: just tried on my windows machine, and got the exact same result. Is it possible this is geoblocked in Australia?

I am in USA (Texas), same exact issue. And MCP Inspector works (even github). Not errors anywhere. MCP's show up under developer tab, but Claude Desktop does not use them.

Since this is an issue with the system not knowing what version of node to use, (whether it is because of nvm or different versions on the system) it seems like the for sure way to solve this is to explicitly state the version of node if you can.

This issue is also stated in this thread regarding nvm: #64

Once you point to the correct node version, use the corresponding index.js file in the argument for the server you want to connect to.

This is what i did on MacOS:

{
    "mcpServers": {
        "sqlite": {
            "command": "uvx",
            "args": ["mcp-server-sqlite", "--db-path", "/Users/natefikru/test.db"]
        },
        "puppeteer": {
            "command": "/Users/natefikru/.nvm/versions/node/v22.4.0/bin/node",
            "args": ["/Users/natefikru/Documents/servers/src/puppeteer/dist/index.js"]
        },
        "brave-search": {
            "command": "/Users/natefikru/.nvm/versions/node/v22.4.0/bin/node",
            "args": ["/Users/natefikru/Documents/servers/src/brave-search/dist/index.js"],
            "env": {
              "BRAVE_API_KEY": "xxx"
            }
        },
        "github": {
            "command": "/Users/natefikru/.nvm/versions/node/v22.4.0/bin/node",
            "args": ["/Users/natefikru/Documents/servers/src/github/dist/index.js"],
            "env": {
              "GITHUB_PERSONAL_ACCESS_TOKEN": "xxx"
            }
        }
    }
}

@natefikru just tried this method on Windows 10 unfortunately it didn't work (for the "xxx" I used my real keys just changed it for this btw)
might try to run a virtual MacOS to see if I can get it to work

image

Fixing MCP Server Connection Issues in Claude Desktop

Installation Steps

1. Install Required Packages

npm install -g @modelcontextprotocol/server-filesystem
npm install -g @modelcontextprotocol/server-memory
npm install -g @modelcontextprotocol/server-brave-search
npm install -g @modelcontextprotocol/server-github

2. Update Configuration

Replace content in claude_desktop_config.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "node",
      "args": [
        "C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js",
        "c:/"
      ]
    },
    "memory": {
      "command": "node",
      "args": [
        "C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-memory/dist/index.js"
      ]
    },
    "git": {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "C:/Users/YOUR_USERNAME/Projects/NodeJs/super_ai_agents"
      ]
    },
    "brave-search": {
      "command": "node",
      "args": [
        "C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_BRAVE_API_KEY"
      }
    },
    "github": {
      "command": "node",
      "args": [
        "C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-github/dist/index.js"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_TOKEN"
      }
    }
  }
}

Note: Replace YOUR_USERNAME, YOUR_BRAVE_API_KEY, and YOUR_GITHUB_TOKEN with your actual values.

3. Test Server Connections

Run these commands individually to verify each server:

node C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js c:/
node C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-memory/dist/index.js
node C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js
node C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-github/dist/index.js

4. Final Steps

  1. Restart your PC
  2. Launch Claude Desktop application
  3. Check connection logs

Success Indicators

Look for these messages in the logs:

[info] Connected to MCP server memory!
[info] Connected to MCP server git!
[info] Connected to MCP server filesystem!
[info] Connected to MCP server brave-search!
[info] Connected to MCP server github!

Important Notes

  • Use forward slashes (/) in paths
  • Replace placeholders with your actual values
  • Install all servers globally using npm
  • Restart PC after configuration changes

After followed all steps mentioned above, my Claude Desktop app successfully attached with all MCPs.
Attached MCPs
Attached MCPs_2

How I enabled the MCP Brave Search. In Windows, really pay attention to the absolute path

Following steps by @Chatmala , i make a few adjustment below:

  • OS: Windows 10
  • CMD: Using Windows Command Prompt (have problem with PowerShell)
  • for below guide, please change all the YOUR_USERNAME into your own login name path

Steps:

  1. open windows command prompt (I'm not using Power Shell) and run command below:
    npm install -g @modelcontextprotocol/server-brave-search
    
  2. by default it will install in the folder under your login. in my case as below:

C:\Users\YOUR_USERNAME\AppData\Roaming\npm\node_modules@modelcontextprotocol\server-brave-search\dist\index.js

  1. try running command below to test that it able to execute:
node C:\Users\YOUR_USERNAME\AppData\Roaming\npm\node_modules\@modelcontextprotocol\server-brave-search\dist\index.js

the output will display something like below, just one line of notification. ctrl-c to kill it:
brave_search_console

  1. Locating the claude_desktop_config.json
    if you open the setting in Claude Desktop, you can find where does the file claude_desktop_config.json is referred/created in your folder:
    config1
    config2

  2. Update the claude_desktop_config.json . Mine as below:

note: As you can see, I also have setup using sqlite3 and it able to run. It requires Python 3.10 and above. Please let me know if requires the steps on this, but basically really pay attention to the absolute path!

folder: C:\Users\YOUR_USERNAME\AppData\Roaming\Claude\claude_desktop_config.json

{
  "mcpServers": {
	"sqlite": {
	  "command": "C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Microsoft\\WinGet\\Links\\uvx",
	  "args": [     
		"mcp-server-sqlite", 
		"--db-path", 
		"E:\\dev\\claude\\mcp\\test.db"
	  ]
	},
	"brave-search": {
	  "command": "node",
	  "args": [
		"C:\\Users\\YOUR_USERNAME\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-brave-search\\dist\\index.js"
	  ],
	  "env": {
		"BRAVE_API_KEY": "BRAVE-API-KEY"
	  }
	}
  }
}
  1. Close the Claude Desktop. Make sure the one on the taskbar also closed. Click to open it again.

  2. You can notice under the "Attach from MCP" icon, some of the services appear. For me I have 8 registered.
    mcp_service1
    mcp_service2

  3. you can start prompting to test the power of MCP! Kudos Anthrop\c!

@ymdarum Your solution works as well when using nvm for windows. Good Catch Man! You nailed it!

@ymdarum it worked!

@ymdarum thanks man, this worked for me as well

Actually there is similar problem with python based MCP servers . When I try to run it with uvx it fails but when I run it with python command it works fine. I think the MCP servers should be ran in more ancient way using python or npm rather than uvx or npx.

Also why in the world is there no linux app of Claude . While more than 90% of development is done on Linux . This is really sad and mine boggling.

🎉this works for me :

{
  "mcpServers": {
    "git": {
      "command": "python3.11",
      "args": [
        "-m",
        "mcp_server_git",
        "--repository",
        "C:\\Users\\heman\\Desktop\\test_mcp_git"
      ]
    },
    "memory": {
      "command": "node",
      "args": [
        "C:\\Users\\heman\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-memory\\dist\\index.js"
      ]
    },
    "filesystem": {
      "command": "node",
      "args": [
        "C:\\Users\\heman\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js",
        "C:\\Users\\heman\\Desktop",
        "C:\\Users\\heman\\Desktop\\test_mcp_git"
      ]
    },
    "github": {
      "command": "node",
      "args": [
        "C:\\Users\\heman\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-github\\dist\\index.js"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "my-token"
      }
    }
  }
}

Faced the same issue in Mac because my node is setup using node version manager asdf in my case. All I did was Find the npx installation path with which npx. Copy the path to my configuration below e.g: /Users/<me>/.asdf/shims/npx. And it worked for me.

{
  "mcpServers": {
    "github": {
      "command": "/Users/<me>/.asdf/shims/npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": ""
      }
    }
  }
}

i am on a windows pc and my servers for filesystem, brave, etc work fine
but the one for gdrive isn't able to authorize
this is my config file:

"gdrive": {
  "command": "node",
  "args": [
    "C:\\Users\\user\\node_modules\\@modelcontextprotocol\\server-gdrive\\dist\\index.js"      ]
}

}

would appreciate any guidance on how to get the gdrive mcp to work, please. thx!

image
{ "mcpServers": { "filesystem": { "command": "cmd", "args": [ "/c", "set NODE_DEBUG=* && npx -y @modelcontextprotocol/server-filesystem", "c:\\users\\<youraccountname>\\claude-server" ] } } }

my OS is windwos 11 23h2. I found that even killed all claude tasks, you also need to kill the node.exe process(es, sometime, here were 2 node.exe tasks. )

the guide file "https://modelcontextprotocol.io/quickstart#file-system-access" or sample file "https://github.com/dave2nian/servers/tree/main/src/filesystem" in args part "-y" that mean is auto answer to keep communication with MCP filesystem server. but node.js is a event driven service, it don't need to keep the link. so I tried to change args from -y to /c.

know it is working.

image

enjoy it~

Hey folks, there's a new version of Claude Desktop that should resolve issues launching npx on Windows. Please update to v0.7.5 and give it another shot! (If you have any issues auto-updating, you can always download the latest from https://claude.ai/download.)

Thanks for your patience!

Our updater is a bit quieter than we'd like, the short version to force the update is, "Help => Check for updates", wait some time, then "File => Exit" and restart the app

Fixing MCP Server Connection Issues in Claude Desktop

Installation Steps

1. Install Required Packages

npm install -g @modelcontextprotocol/server-filesystem
npm install -g @modelcontextprotocol/server-memory
npm install -g @modelcontextprotocol/server-brave-search
npm install -g @modelcontextprotocol/server-github

2. Update Configuration

Replace content in claude_desktop_config.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "node",
      "args": [
        "C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js",
        "c:/"
      ]
    },
    "memory": {
      "command": "node",
      "args": [
        "C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-memory/dist/index.js"
      ]
    },
    "git": {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "C:/Users/YOUR_USERNAME/Projects/NodeJs/super_ai_agents"
      ]
    },
    "brave-search": {
      "command": "node",
      "args": [
        "C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_BRAVE_API_KEY"
      }
    },
    "github": {
      "command": "node",
      "args": [
        "C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-github/dist/index.js"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_TOKEN"
      }
    }
  }
}

Note: Replace YOUR_USERNAME, YOUR_BRAVE_API_KEY, and YOUR_GITHUB_TOKEN with your actual values.

This worked for me almost. I just had to replace my local /node_modules/@modelcontextprotocol location. It wasn't the same place as this because I have NVM installed and it was off the NVM directory.

BUT NOW IT WORKS!!!!!!!~ THANK YOU EVERYONE

OMG, just as I got it fixed and now there is a new version of Claude desktop. Lets go back to the original *config.json and see if it works without the explicit location notation.

yeah, at least for me, the new update has fixed my connection issue

I'm also experiencing issues with the filesystem server on Windows. Here's my configuration:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\Username\\Desktop"
      ]
    }
  }
}

The same problem with me. My configuration :

{
    "mcpServers": {
        "filesystem": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-filesystem",
                "A:\\Desktop\\"
            ]
        }
    }
}

Same problem on my Win 11. Sad!

I'm also experiencing issues with the filesystem server on Windows. Here's my configuration:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\Username\\Desktop"
      ]
    }
  }
}

The same problem with me. My configuration :

{
    "mcpServers": {
        "filesystem": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-filesystem",
                "A:\\Desktop\\"
            ]
        }
    }
}

Same problem on my Win 11. Sad!

Did you get ANY of the other MCP servers to connect to ClaudeDesktop? Meaning, do you see the tool icon element in the lower right corner of the prompt box area. Are you able to execute any MCP specific actions?

Sorry folks, and thanks for your patience! For npx calls in particular, we believe there's an issue with how Claude Desktop is launching subprocesses on Windows, which modelcontextprotocol/typescript-sdk#68 (once integrated) should hopefully fix. 🤞

As a workaround, you should be able to npm install -g the MCP servers you care about, and use node to invoke them directly (instead of npx).

Hi there - is there tutorial on this/ I'm running into the same issue "Error in MCP connection to server github: Error spawn npx ENOENT". I'm a newbie, hoping to configure MCP on Claude AI to explore the features, any help would be appreciated!!

If you are on Windows and comfortable running a PowerShell script, try this for node based servers: https://llmindset.co.uk/resources/mcp-installer/ .

If you are on Windows and comfortable running a PowerShell script, try this for node based servers: https://llmindset.co.uk/resources/mcp-installer/ .

Hi there - thanks for the help! I ran a PowerShell Script and installed
Nodejs but still running into issues - Claude fails to connect to servers,
I'm trying to install the filesystem.
Here's my code and error msg I'm seeing. I'm also not seeing the Tools icon
.... any idea what could have gone wrong?
Claude Error
code

Remove the "-y" argument.

Sorry -- just wanted to add...

If you ran the powershell script (and server-filesystem wasn't already there) then it should look something like:

...

    "server-filesystem": {
      "command": "node",
      "args": [
        "C:\\Program Files\\nodejs\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js"
      ]
    }

...

To add those folders you would end up with a config like:

{
  "mcpServers": {
    "server-filesystem": {
      "command": "node",
      "args": [
        "C:\\Program Files\\nodejs\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js",
        "/Users/meizh/Desktop",
        "/Users/meizh/Documents"
      ]
    }
  }
}


Thank you!! still.... not sure what's causing it.... see screenshot. I followed your code
code 2
error log

Since it's the only server you have configured, here's what I'd do (i've just tested this from scratch).

  • Rename your claude_desktop_config.json file to claude_desktop_config.old
  • Open PowerShell, and download the script from earlier to a folder
  • Run Set-ExecutionPolicy Bypass -Scope Process in powershell
  • Run .\mcp-install.ps1 @modelcontextprotocol/server-filesystem
  • Edit your claude_desktop_config.json folder and add the folders you want to use (don't forget to add a comma after the first argument).
  • Start Claude and enjoy.

If that still doesn't work, paste the content of the Logs folder in here.

image
Hm... may I doing something wrong?

Since it's the only server you have configured, here's what I'd do (i've just tested this from scratch).

  • Rename your claude_desktop_config.json file to claude_desktop_config.old
  • Open PowerShell, and download the script from earlier to a folder
  • Run Set-ExecutionPolicy Bypass -Scope Process in powershell
  • Run .\mcp-install.ps1 @modelcontextprotocol/server-filesystem
  • Edit your claude_desktop_config.json folder and add the folders you want to use (don't forget to add a comma after the first argument).
  • Start Claude and enjoy.

If that still doesn't work, paste the content of the Logs folder in here.

Sure, I wouldn't run that from system32.

From there I would:

  • cd ~ -> (takes you to home folder)
  • curl -o mcp-install.ps1 https://llmindset.co.uk/scripts/mcp-install.ps1 -> (downloads and save the install script to your home folder)
  • .\mcp-install.ps1 @modelcontextprotocol/server-filesystem -> (installs the server)

Once that's done, you can then edit the claude_desktop_config file to add the folders you want to use.

[EDITED - I messed up the curl command, sorry]

Edit bump

Sure, I wouldn't run that from system32.

From there I would:

  • cd ~ -> (takes you to home folder)
  • curl -o mcp-install.ps1 https://llmindset.co.uk/scripts/mcp-install.ps1 -> (downloads and save the install script to your home folder)
  • .\mcp-install.ps1 @modelcontextprotocol/server-filesystem -> (installs the server)

Once that's done, you can then edit the claude_desktop_config file to add the folders you want to use.

[EDITED - I messed up the curl command, sorry]

Thank you for your relentless efforts trying to help :))))...btw Happy 2025~~~
I tried what you've recommended, still no luck, here's the code, not sure i've done something wrong, apprecaite any insight you might have :)

Before I ran the Pwershell Script, I made sure i'm running from system64 tho it says system32 - reason why it's saying system32 is because "On bit64 Windows The folder C:\Windows\System32\ actually holds 64-bit system files - according to ChatGPT".....
I also made sure that the "claude_desktop_config.json" has been renamed to "claude_desktop_config.old".
Here comes the screenshots.....

image
At this point, a new "claude_desktop_config.json" file has been created in folder C:\Users\meizh\AppData\Roaming\Claude
I opened the json file and saw this script.
image
I opened Claude to see this error msg
image
Then I overrode the json script to below... saved and relaunched Claude...
image
Saw this error msg.... "Could not attach to MCP server server-filesystem"
image

Side question - it's been a hell of a workaround trying to add one MCP to Claude, is it going to be the same for all other MCP's? I'm also looking to add the Brave Search one....

OK - looks like its nearly there. Go in to settings, developer and click here to open the logs folder.
image

In there you should find a file called mcp-server-filesystem.log. Show us the contents of that.

For what it's worth, I got my server-filesystem to fail by specifying an invalid path on startup.

Side question:- once this issue is solved, you should be all set :)

OK - looks like its nearly there. Go in to settings, developer and click here to open the logs folder. image

In there you should find a file called mcp-server-filesystem.log. Show us the contents of that.

For what it's worth, I got my server-filesystem to fail by specifying an invalid path on startup.

Side question:- once this issue is solved, you should be all set :)

Exciting!!
here's what i have.. is it about the y arg?
image

image

OK - so the error message makes it look like Claude is reading a claude_desktop_config.json which still has a "-y" in the args section of the Config file... so perhaps there is more than one config file.

Can you re-check what is in the claude_desktop_config.json file by opening it from here:

image

That will open an explorer window with the file highlighted. Right-click, open in notepad or vscode and lets have a look what's in that specific one.

OK - so the error message makes it look like Claude is reading a claude_desktop_config.json which still has a "-y" in the args section of the Config file... so perhaps there is more than one config file.

Can you re-check what is in the claude_desktop_config.json file by opening it from here:

image

That will open an explorer window with the file highlighted. Right-click, open in notepad or vscode and lets have a look what's in that specific one.

Sure thing.
I clicked on "Edit Config" and was redicted to C:\Users\meizh\AppData\Roaming\Claude
I then opened "claude_desktop_config.json"
this is what i have (pretty sure i took the -y out):
image

🤔.

OK. Can you go back to the logs folder, delete all the files in there, restart Claude Desktop and then see what's there? Perhaps we are looking at a stale log file with the old config in.

Claude is still giving the error message, right?

:)

🤔.

OK. Can you go back to the logs folder, delete all the files in there, restart Claude Desktop and then see what's there? Perhaps we are looking at a stale log file with the old config in.

Claude is still giving the error message, right?

:)

Yep - still the same error.
okay - i deleted all files in "logs" folder and relaunched Claude same error
image
However now in the logs folder I only see 2 files?
image

Is there any content in either of them?

Is there any content in either of them?

yep
image
image

Cool. So we know that Node.js is installed and running.

The error message in the log file is saying it can't find the server-filesystem MCP Server code (which is odd because npm should have downloaded it earlier).

Let's check 2 things before going further:

Go back to powershell and run the following:

node --version

Should return v22.12.0

Then run: npm root -g

This will show us the download directory - it should come back c:\program files\nodejs\node_modules. I'm wondering if you are on a virtual desktop environment?

I'm not on a virtual machine but here's the result......did i install nodejs in the wrong folder..../?
image

Just better idea is dont use node and use python instead for this MCP thing, it just works.

Never create any MCP server using node but use python instead

Just better idea is dont use node and use python instead for this MCP thing, it just works.

Never create any MCP server using node but use python instead

Hi... thank you for the solution.... I'm not sure how to use python to do this, have limited coding experience... i simpily followed an youtube video thinking it'd be easy.... sigh...

I would like to add, for windows users, I fixed my issue by doing to following:

Completely Uninstalling:

How to Completely Remove Node.js from Windows ? - GeeksforGeeks

Installing node the right way

installing: install | npm Docs

Note

Don't use fnm method or winget, I have to change too many things when using MCPs
Don't use installer per the official docs
Node.js — Download Node.js®

We strongly recommend using a Node version manager to install Node.js and npm. We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.

Or "Method 2" from: How to Install Node.js on Windows: Top 4 Methods

nvm install latest
nvm use ...
node -v

Check whether there is a @modelcontextprotocol folder under c:\users\meizh\appdata\roaming\npm\node_modules. If so change the path
under "args": it from "C:\\Program Files\\nodejs\\..." to c:\\users\\meizh\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js.

and restart Claude

Check whether there is a @modelcontextprotocol folder under c:\users\meizh\appdata\roaming\npm\node_modules. If so change the path under "args": it from "C:\\Program Files\\nodejs\\..." to c:\\users\\meizh\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js.

and restart Claude

hmmm... maybe that's the problem. I do not have the “@modelcontextprotocol" folder .....
image

Just better idea is dont use node and use python instead for this MCP thing, it just works.

Never create any MCP server using node but use python instead

Hi... thank you for the solution.... I'm not sure how to use python to do this, have limited coding experience... i simpily followed an youtube video thinking it'd be easy.... sigh...

First of all you are very beautiful. And python is actually very easy, in fact the easiest language out there, you can learn in a day or two.