salsr
February 13, 2025, 1:30am
1
What I’ve tried:
C:\Windows\System32\wsl.exe -e bash -ic "cd /home/myname/mcp-servers/supabase-mcp && /home/myname/.nvm/versions/node/v20.18.0/bin/node build/index.js"
Results in the Cursor Settings > MCP Servers screen showing:
NO TOOLS FOUND
Repeating that command in wsl bash works fine though
bash -ic "cd /home/myname/mcp-servers/supabase-mcp && /home/myname/.nvm/versions/node/v20.18.0/bin/node build/index.js"
**Supabase MCP server running on stdio**
So this isn’t an mcp server specific issue.
Has anyone got MCP servers up and running in WSL, using NVM?
2 Likes
Agnos
February 13, 2025, 9:26pm
2
Dear developers.
I have the same problem. I went into WSL hoping to fix a problem with MCP servers on Windows, but if I open Cursor in WSL with npx installed, Cursor still can’t process tools properly and gives the same error
1 Like
I would not be suprised if MCP servers are not yet supported over WSL or SSH fully yet.
I’ll throw this to the team to make sure we try to get this sorted in the future!
2 Likes
mikaelh
February 25, 2025, 2:02pm
4
Hi @salsr
This seems to work for me:
"filesystem_cursor_test": {
"command": ["wsl.exe"],
"args": [
"bash -c 'source /home/myname/.nvm/nvm.sh; npx -y @modelcontextprotocol/server-filesystem /home/myname/projects/myapp'"
]
}
Unfortunately it seems to open a cmd window. I will look into this later.
1 Like
salsr
February 27, 2025, 6:00am
5
Thanks for the response @mikaelh but with the new Cursor Settings > MCP Servers (0.46.6)
How are you structuring that config within the MCP Servers +Add new MCP Server, for example I want to run this:
Name: browser-tools
Type: command
Command: npx @agentdeskai /browser-tools-mcp
I’ve tried changing the command to:
cmd /c npx @agentdeskai/browser-tools-mcp
or to:
"wsl.exe 'npx @agentdeskai/browser-tools-mcp'"
I keep on getting “Failed to create client”
1 Like
I encountered the same issue.
salsr
March 1, 2025, 3:47am
8
Whilst we wait for the Cursor team to work out a better solution here, I now
Install NodeJS in Windows, install MCP globally within Windows and then within MCP Servers run the package like:
node C:\\Users\\<yourname>\\AppData\\Roaming\\npm\\node_modules\\@agentdeskai\\browser-tools-mcp\\dist\\mcp-server.js
It’s less than ideal.
As i was in the same boat,
to by-pass the current restriction (cursor try to run the MCP on the host),
i launch a MCP server from the wsl side, and then use MCP over sse in cursor.
salsr
March 1, 2025, 4:32am
10
To be clear are you installing the mcp or running npx?
it depends of the mcp, but for the moment you need to have a MCP that can be installed in WSL and runnning as a server with SSE, with that you can choose in cursor the server mode for your MCP instead of the command one.
But your MCP must have a server mode. for my need i have made one myself with bunjs, and creating some tool. here a gist of the server if you like living on the edge
bun MCP sse server starting point
HYPRGK
March 23, 2025, 7:11pm
12
I think I have finally solved the issue for my particular situation, I hope it helps others here.
I am using WSL and nvm and I eventually worked out that when Cursor calls WSL bash, the WSL bash instance has no knowledge of the current user’s nvm install, npx nor their profile
So first you should enter which npx at a wsl prompt to find out where npx is installed
You will also need to check where your .nvm setup folder is located as well
So the solution is to manually initialise nvm and also …
^ This is how I managed to resolve my similar issue when using WSL with nvm. Hopefully it helps you fix your problems too!
1 Like
Thank you so much, this also worked for me. Specifically, I was using the convex MCP. I have been pulling my hair out over this one for a few days.
2 Likes
After hours and hours of trying different methods to get MCP to work on WSL2 this actually did it. You rock dude
1 Like