Skip to content
TrustedSkillsbeta
Developer

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

⚡ Quick Answer

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.

💡 Installing a skill from TrustedSkills? Most listings here are SKILL.md skills, not MCP servers, and this config file has no field for one. See install a skill in Claude Desktop — including why the skills CLI has no Claude Desktop target. This guide covers MCP servers.

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

OSConfig 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.

💡 When in doubt, use the full path: Whether your desktop session loads ~/.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.

💡 Recommendation: Use the full path approach. It's independent of shell init order and works consistently across all login managers and desktop environments.

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.

TT

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.