-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MCP servers fail to connect with npx
on Windows
#40
Comments
Can you share your |
You should use the You can try:
|
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. |
Update: just tried on my windows machine, and got the exact same result. Is it possible this is geoblocked in Australia? |
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. |
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 |
@mckaywrigley what does your config file look like?
|
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 Detailed version: I followed the sqlite instructions but ran into a "Could not connect to MCP server sqlite" error. 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.
Since i have a newer Python installed (via miniconda), I resolved this by passing an extra 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? |
Sorry folks, and thanks for your patience! For As a workaround, you should be able to |
@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": { |
@oscarcalvo As @jspahrsummers mentioned, you have to use node directly, like this
|
@rkaradas You are right, thanks |
Any ways to access mcp-server inside WSL? I've tried this but no luck:
|
THANKS YOU !!!!!!! |
Since it's the only server you have configured, here's what I'd do (i've just tested this from scratch).
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:
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 |
OK - so the error message makes it look like Claude is reading a Can you re-check what is in the 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. 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? :) |
Is there any content in either of them? |
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:
Should return v22.12.0 Then run: This will show us the download directory - it should come back |
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 wayinstalling: install | npm Docs Note Don't use fnm method or winget, I have to change too many things when using MCPs
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 and restart Claude |
hmmm... maybe that's the problem. I do not have the “@modelcontextprotocol" folder ..... |
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. |
I GOT IT!!!! problem could be 3-fold
|
thank you thank you! Yes I'm learning py, just not as quick haha, very little coding background, baby steps. Thanks for the help! |
Thanks for the solution. npm install did work. I was able to configure file system :) |
Just wanted to add my solution to this without uninstalling node or using nvm on windows: Check where your node isPS D:\Javascript\foldername> where.exe node
C:\Users\username\AppData\Local\fnm_multishells\13228_1736585930049\node.exe claude_desktop_config.json{
"mcpServers": {
"filesystem": {
"command": "C:\\Users\\username\\AppData\\Local\\fnm_multishells\\13228_1736585930049\\npx.cmd",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"D:\\Javascript\\foldername"
],
"env": {
"PATH": "C:\\Users\\username\\AppData\\Local\\fnm_multishells\\13228_1736585930049;%PATH%",
"NODE_PATH": "C:\\Users\\username\\AppData\\Local\\fnm_multishells\\13228_1736585930049\\node_modules"
}
}
}
} The key is to use absolute path for npx command, then adding env PATH and NODE_PATH |
Thanks for the tip!
…On Mon, Jan 13, 2025 at 8:46 PM adi-prasetyo ***@***.***> wrote:
Just wanted to add my solution to this without uninstalling node or using
nvm on windows:
Check where your node is
PS D:\Javascript\foldername> where.exe node
C:\Users\username\AppData\Local\fnm_multishells\13228_1736585930049\node.exe
claude_desktop_config.json
{
"mcpServers": {
"filesystem": {
"command": "C:\\Users\\username\\AppData\\Local\\fnm_multishells\\13228_1736585930049\\npx.cmd",
"args": [
"-y",
***@***.***/server-filesystem",
"D:\\Javascript\\foldername"
],
"env": {
"PATH": "C:\\Users\\username\\AppData\\Local\\fnm_multishells\\13228_1736585930049;%PATH%",
"NODE_PATH": "C:\\Users\\username\\AppData\\Local\\fnm_multishells\\13228_1736585930049\\node_modules"
}
}
}
}
The key is to use absolute path for npx command, then adding env PATH and
NODE_PATH
—
Reply to this email directly, view it on GitHub
<#40 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXHY7K3GZUKX2JZFAOYP3JD2KSJA7AVCNFSM6AAAAABSO4TCKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBYHE2TAMJXGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This worked for me on Windows - needed to stop the Claude.exe task in task manager and then start the app again in order for it to really read and install the packages noted in my mcp config. Simply closing the app on windows and starting a new instance is not a full restart and does not seem to trigger a fresh look at the config, so trial and error adjustments there were not reflecting readily until I tried the full claude.exe process kill in task manager. Thanks for the tip! |
ctrl+q on windows does a "proper" quit, to save anyone the bother of using task manager :) wish someone had told me that earlier too. |
Sigue sucediendo lo mismo, lo solucione haciendo esto
|
I am on Windows with the latest desktop version, I have enabled developer mode and I am in Europe
The text was updated successfully, but these errors were encountered: