Skip to content

Commit

Permalink
docs: expand MCP server configuration instructions for WSL with nvm a…
Browse files Browse the repository at this point in the history
…nd pnpm examples

- Added detailed examples for configuring the `sequential-thinking` server using nvm and pnpm in WSL.
- Clarified the need to source the nvm environment for proper Node setup.
- Provided JSON configuration snippets to illustrate the setup process, enhancing usability for users managing Node versions in WSL.
  • Loading branch information
spences10 committed Jan 9, 2025
1 parent 4be2f36 commit 17e70d6
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions posts/getting-mcp-server-working-with-claude-desktop-in-wsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,46 @@ following to your `claude_desktop_config.json` file:
}
```

This (for some reason) doesn't need to know the path to the Node
executable.
This example was what I got working on a Linux instance that used
Volta for the node version management. This was the simplest way!

I tried something similar with the `sequential-thinking` server on
another machine that used `nvm` instead and it was a bit more
involved!

```json
{
"sequential-thinking": {
"command": "wsl.exe",
"args": [
"bash",
"-c",
"source ~/.nvm/nvm.sh && /home/scott/.nvm/versions/node/v20.12.1/bin/npx @modelcontextprotocol/server-sequential-thinking"
]
}
}
```

The key difference is that with nvm, I needed to source the nvm
environment first with `source ~/.nvm/nvm.sh` to ensure the Node
environment is properly set up.

Similar if you want to use pnpm dlx:

```json
{
"sequential-thinking": {
"command": "wsl.exe",
"args": [
"bash",
"-c",
"source ~/.nvm/nvm.sh && /home/scott/.local/share/pnpm/pnpm dlx @modelcontextprotocol/server-sequential-thinking"
]
}
}
```

Fiddly but it works! No need to install Node in Windows!

## Testing the Setup

Expand Down

0 comments on commit 17e70d6

Please sign in to comment.