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 servers to your Claude Desktop setup.
Last updated 27 September 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 for Linux (beta), on Ubuntu 22.04+ or Debian 12+. Install it from Anthropic's apt repository: see the install guide.
- Node.js 18 or later, via nvm (recommended). Distribution packages can be older than that.
Config File Location
The quickest way to open the file is Settings → Developer → Edit Config. On Linux it normally lives here:
~/.config/Claude/claude_desktop_config.json
Setting Up
mkdir -p ~/.config/Claude
nano ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}
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%\Claude\claude_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.
~/.profile depends on your login manager. A full path to npx in the config works whichever start-up files load.
Fix Option 1: Full path (most reliable)
which npx
# /home/yourname/.nvm/versions/node/v20.11.0/bin/npx
{
"mcpServers": {
"memory": {
"command": "/home/yourname/.nvm/versions/node/v20.11.0/bin/npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}
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 Status
Open Settings → Developer to see each server's status. In a chat, click the + button and open Connectors to see which servers connected.
Frequently Asked Questions
Where is the Claude Desktop config on Linux?
Normally at ~/.config/Claude/claude_desktop_config.json. Settings → Developer → Edit Config opens it for you.
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?
No. The beta supports Ubuntu 22.04+ and Debian 12+, on x86_64 and arm64. On Fedora, Arch and other distributions, use Claude Code in the terminal instead.
TrustedSkills Team
The TrustedSkills team maintains the TrustedSkills index of AI agent skills. The index records where each skill comes from and how to install it. It does not review or audit skill code.