WSL MCP Configuration
Hello! I saw your YouTube video on this project, and thought it was super cool! My personal dev system is Windows 11 running WSL, which has unique challenges for this type of application. I run Claude in Windows Desktop, but Node I run in WSL terminal. The provided/example MCP server configuration did not work for this scenario. After some troubleshooting, I've come up with this configuration instead:
~\AppData\Roaming\Claude\claude_desktop_config.json
{
"mcpServers": {
"desktop-commander": {
"command": "wsl",
"args": [
"bash",
"-ic",
"npx -y @wonderwhy-er/desktop-commander"
]
}
}
}
This allows Claude to connect to WSL, load bash in interactive mode, and execute the MCP server. With this configuration, everything else worked out of the box! I'm excited to play with this further, thanks! I hope this configuration helps other people use this project on a split Windows/WSL setup like I'm running.
Which command have you used to install? I wonder if this could be suggested to Smithery
I performed a manual installation. I'm new to interacting with MCP, so maybe Smithery install method already solves for this problem. It would be interesting to try again and see if that's the case.
@mdiener87 I tried to install on WSL as follows and got an error: npx @wonderwhy-er/desktop-commander setup {"type":"info","timestamp":"2025-03-22T12:54:23.121Z","message":"Claude config file not found at: /home/saro/Library/Application Support/Claude/claude_desktop_config.json"} {"type":"info","timestamp":"2025-03-22T12:54:23.123Z","message":"Creating default config file..."} {"type":"error","timestamp":"2025-03-22T12:54:23.124Z","message":"Failed to start server: ENOENT: no such file or directory, open '/home/saro/Library/Application Support/Claude/claude_desktop_config.json'"}
I would appreciate it if you could let me know how you installed manually. Thanks!
@mdiener87 your command worked like a charm. Thanks for sharing!
@mdiener87 I tried to install on WSL as follows and got an error: npx @wonderwhy-er/desktop-commander setup {"type":"info","timestamp":"2025-03-22T12:54:23.121Z","message":"Claude config file not found at: /home/saro/Library/Application Support/Claude/claude_desktop_config.json"} {"type":"info","timestamp":"2025-03-22T12:54:23.123Z","message":"Creating default config file..."} {"type":"error","timestamp":"2025-03-22T12:54:23.124Z","message":"Failed to start server: ENOENT: no such file or directory, open '/home/saro/Library/Application Support/Claude/claude_desktop_config.json'"}
I would appreciate it if you could let me know how you installed manually. Thanks!
IIRC, I used npm install -g @wonderwhy-er/desktop-commander to install the repo.
Just wanted to add that in case you're not using bash as your default shell, you can replace it with other shells in the config. In my case, I'm using zsh as my default shell and that's where node is installed, so I this is my config:
{
"mcpServers": {
"desktop-commander": {
"command": "wsl",
"args": [
"zsh",
"-ic",
"npx -y @wonderwhy-er/desktop-commander"
]
}
}
}
I'm also using asdf, so I had to create a .tool-versions file in my home folder within Windows (/mnt/c/Users/<username>/.tool-versions). This is required for the npx command to run.
Hello! I saw your YouTube video on this project, and thought it was super cool! My personal dev system is Windows 11 running WSL, which has unique challenges for this type of application. I run Claude in Windows Desktop, but Node I run in WSL terminal. The provided/example MCP server configuration did not work for this scenario. After some troubleshooting, I've come up with this configuration instead:
~\AppData\Roaming\Claude\claude_desktop_config.json{ "mcpServers": { "desktop-commander": { "command": "wsl", "args": [ "bash", "-ic", "npx -y @wonderwhy-er/desktop-commander" ] } } }This allows Claude to connect to WSL, load bash in interactive mode, and execute the MCP server. With this configuration, everything else worked out of the box! I'm excited to play with this further, thanks! I hope this configuration helps other people use this project on a split Windows/WSL setup like I'm running.
legend. thank you