Install MCP Claude Desktop Linux: Config & Setup Guide
Install MCP on Claude Desktop Linux โ config file path at ~/.config/Claude/, NVM workarounds, and Linux-specific tips for successfully adding MCP skills to your Claude Desktop setup.
๐Last updated 4 March 2026
Edit ~/.config/Claude/claude_desktop_config.json, add skills under mcpServers, restart Claude Desktop. The nvm PATH issue is the most common problem on Linux โ fix it by using the full path to npx or adding nvm to ~/.profile.
Linux adds one gotcha that catches almost everyone who uses nvm: Claude Desktop launches as a non-interactive process and doesn't inherit the shell PATH where nvm lives. Here's how to navigate that โ plus the rest of the setup.
Prerequisites
- Claude Desktop (AppImage or .deb from claude.ai/download)
- Node.js:
sudo apt install nodejs npmor via nvm (recommended)
Config File Location
Linux follows the XDG spec:
~/.config/Claude/claude_desktop_config.json
Setting Up
mkdir -p ~/.config/Claude
nano ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "@trustedskills/weather-mcp"]
}
}
}
Config Paths: Linux vs Everything Else
| OS | Config path |
|---|---|
| Linux | ~/.config/Claude/claude_desktop_config.json |
| Mac | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%Claudeclaude_desktop_config.json |
The nvm Problem โ and Two Ways to Fix It
If you installed Node.js via nvm, you've probably noticed: nvm works great in your terminal, but Claude Desktop acts like Node doesn't exist. That's because nvm adds npx to your shell's PATH โ but only for interactive shells. Claude Desktop launches non-interactively and never runs those shell initialisation scripts.
We set up MCP skills for a developer running Ubuntu 22.04 with nvm. Claude Desktop kept logging "npx: command not found". Adding nvm to ~/.profile fixed it for him. But on a second machine with a different login manager, ~/.profile wasn't being sourced at all โ full path to npx was the only reliable fix. When in doubt, use the full path.
Fix Option 1: Full path (most reliable)
which npx
# /home/yourname/.nvm/versions/node/v20.11.0/bin/npx
{
"mcpServers": {
"weather": {
"command": "/home/yourname/.nvm/versions/node/v20.11.0/bin/npx",
"args": ["-y", "@trustedskills/weather-mcp"]
}
}
}
Fix Option 2: Add nvm to non-interactive profile
Add to ~/.profile:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
Log out and back in, then restart Claude Desktop.
Checking Logs
tail -f ~/.config/Claude/logs/mcp*.log
Frequently Asked Questions
Where is the Claude Desktop config on Linux?
At ~/.config/Claude/claude_desktop_config.json, following XDG spec. Create the directory first: mkdir -p ~/.config/Claude.
Why can't Claude Desktop find npx on Linux?
Almost always nvm. Claude Desktop launches non-interactively and doesn't inherit the shell PATH where nvm puts its binaries. Use the full path to npx from which npx, or add nvm init to ~/.profile.
Does Claude Desktop work on all Linux distros?
The AppImage works on most distros. The .deb is for Ubuntu/Debian. MCP config setup is identical across all distributions.
TrustedSkills Team
The TrustedSkills team builds and tests AI agent integrations across Claude, OpenClaw, Cursor, and VS Code. We verify every skill in our registry and have set up hundreds of MCP configs across every major platform.