How to Install an MCP Server in Claude Desktop (2026 Guide)

Installing an MCP Server in Claude Desktop

What Is MCP?

The Model Context Protocol (MCP) is a standard that lets Claude Desktop connect to external tools, APIs, databases, and services. Think of it as a bridge between Claude and your applications. Instead of copy-pasting information manually, Claude can directly query databases, fetch files, or call APIs through MCP servers. Once installed, these capabilities appear as tools Claude can use within conversations.

Locating Your Configuration File

Before installing an MCP server, you need to find Claude Desktop's configuration file.

On macOS: Navigate to ~/Library/Application Support/Claude/claude_desktop_config.json. You can quickly access this by opening Finder, pressing Command+Shift+G, pasting the path, and hitting Enter.

On Windows: The file lives at %APPDATA%\Claude\claude_desktop_config.json. Open File Explorer, paste this path into the address bar, and press Enter. Windows will expand %APPDATA% to your actual AppData folder.

If this file doesn't exist yet, you'll create it in the next step.

Understanding the JSON Format

The configuration file uses a specific JSON structure. Here's what a basic file looks like:

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["@organization/mcp-server-package"],
      "disabled": false
    }
  }
}

Each MCP server gets its own entry under mcpServers. The key (server-name) is your label for it. The command field specifies what to run (usually npx), and args contains the package name and any arguments. The disabled field lets you toggle servers on or off without removing them.

Using the npx MCP-Remote Pattern

Most modern MCP servers are distributed as npm packages. The standard pattern uses npx to run them directly without installing globally:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["@modelcontextprotocol/server-github", "--token", "YOUR_GITHUB_TOKEN"],
      "disabled": false
    },
    "filesystem": {
      "command": "npx",
      "args": ["@modelcontextprotocol/server-filesystem", "/Users/yourname/allowed-dir"],
      "disabled": false
    }
  }
}

Notice that environment variables or sensitive tokens can be passed as arguments. Some servers prefer environment variables instead—check the server's documentation for specifics.

Step-by-Step Installation

1. Open your configuration file using any text editor (VS Code, Sublime, or even Notepad).

2. Add your MCP server entry following the JSON format above. Ensure proper JSON syntax with commas between entries and no trailing commas.

3. Save the file and close your editor.

4. Restart Claude Desktop completely. This is crucial—Claude won't load new configurations while running. Quit the application entirely (don't just close the window), then relaunch it.

Verifying Installation

After restarting Claude Desktop, start a new conversation. Look for a hammer icon (⚒️) at the bottom of the compose area. Click it to see available tools. Your newly installed MCP server's tools should appear in this list. Try invoking one to confirm it works.

Common Installation Errors

"command not found: npx" — Install Node.js from nodejs.org. npx comes bundled with npm.

Invalid JSON syntax — Use a JSON validator (jsonlint.com) to check your file before saving.

Server not appearing in tools list — Restart Claude Desktop completely. Partial closes won't reload the config.

"command not executable" — Ensure file paths use forward slashes even on Windows, or properly escape backslashes in JSON.

Authentication errors — Verify that tokens and credentials in your config are correct and haven't expired.

---

Want your agent discoverable as an MCP tool? List it free on Agent Exchange (agentexchange.work) — agents earn USDC per call.

→ List your AI agent free — earn USDC per call