📚guidebeginner

MCP Server Setup for Claude Desktop: Beginner to Advanced (2025)

Set up your first MCP server in 5 minutes. Copy-paste configs for filesystem, GitHub, Slack, and 50+ servers. Works on Windows, Mac, and Linux with Desktop Extensions or manual JSON setup.

ByMCP Directory Team
Published
⏱️15 minutes
mcpsetupclaude-desktopdesktop-extensionsconfigurationtutorialmcp-servermodel-context-protocolhow-toinstallationbeginnerwindowsmacoslinuxclaude-desktop-configmcp-tutorial

How to Set Up MCP Servers in Claude Desktop: Complete 2025 Guide

What You'll Learn

This guide teaches you how to set up MCP (Model Context Protocol) servers in Claude Desktop—the technology that lets Claude access files, databases, APIs, and external tools. By the end, you'll have working MCP servers that dramatically expand what Claude can do for you.

Two setup methods covered:

  • Desktop Extensions (5 minutes) - One-click installation, automatic updates
  • Manual Configuration (15-45 minutes) - Full control, custom servers

New to MCP? The Model Context Protocol is an open standard by Anthropic that enables AI assistants to securely interact with external data sources and tools. Think of MCP servers as plugins that give Claude superpowers.


Table of Contents

  1. Quick Start: Your First MCP Server
  2. Prerequisites
  3. Method 1: Desktop Extensions (Recommended)
  4. Method 2: Manual Configuration
  5. Popular MCP Server Configurations
  6. Troubleshooting Common Issues
  7. Security Best Practices
  8. Next Steps
  9. FAQ

Quick Start: Your First MCP Server

Want to get started immediately? Here's the fastest path to a working MCP server:

Option A: Desktop Extension (Easiest - 2 minutes)

  1. Open Claude DesktopSettings (gear icon) → Extensions
  2. Search for "Filesystem"
  3. Click Install → Grant permissions
  4. Start a new chat and ask: "List the files in my Documents folder"

Option B: Manual Setup (5 minutes)

Step 1: Create or edit the config file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Step 2: Add this configuration:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/your/folder"]
    }
  }
}

Step 3: Restart Claude Desktop completely (quit and reopen)

Step 4: Look for the MCP server indicator (hammer icon) in the chat input area


Prerequisites

Before setting up MCP servers, verify your system meets these requirements:

System Requirements

| Requirement | Minimum | Recommended | |-------------|---------|-------------| | Claude Desktop | Latest version | Latest version with Extensions | | Operating System | Windows 10, macOS 10.15, Ubuntu 18.04 | Windows 11, macOS 14+, Ubuntu 22.04 | | Node.js | v18.0.0 | v20.0.0+ (LTS) | | Python | 3.8+ (for Python servers) | 3.11+ | | Disk Space | 500 MB | 2 GB | | RAM | 4 GB | 8 GB+ |

Verify Your Installation

Open a terminal and run these commands:

# Check Node.js version
node --version
# Expected: v18.0.0 or higher

# Check npm version
npm --version
# Expected: 8.0.0 or higher

# Check Python (if using Python-based servers)
python --version
# Expected: Python 3.8.0 or higher

# Find Node.js path (important for manual config)
# macOS/Linux:
which node
# Windows:
where node

Missing Node.js? Download from nodejs.org (LTS version recommended).


Method 1: Desktop Extensions (Recommended)

Desktop Extensions are the easiest way to install MCP servers in 2025. They work like browser extensions—one-click install, automatic updates, and managed security.

Step 1: Access the Extensions Marketplace

  1. Open Claude Desktop
  2. Click the Settings icon (gear, bottom-left)
  3. Select the Extensions tab
  4. Click Browse Extensions

Claude Desktop Extensions Interface

Step 2: Browse Available Extensions

Extensions are organized by category:

Productivity

| Extension | Description | Setup Time | |-----------|-------------|------------| | Filesystem | Read and manage local files | 1 min | | Google Drive | Access Drive documents | 2 min | | Notion | Query Notion databases | 2 min | | Slack | Send messages, search channels | 3 min |

Development

| Extension | Description | Setup Time | |-----------|-------------|------------| | GitHub | Repository and code management | 2 min | | PostgreSQL | Database queries | 3 min | | Docker | Container management | 2 min | | Git | Version control operations | 1 min |

Data & Analytics

| Extension | Description | Setup Time | |-----------|-------------|------------| | SQLite | Local database queries | 1 min | | Pandas | Data analysis | 2 min | | Google Sheets | Spreadsheet operations | 3 min |

Tip: See our Top 10 MCP Servers 2025 Review for detailed comparisons and ratings.

Step 3: Install an Extension

Let's install the GitHub extension as an example:

  1. Search for "GitHub" in the Extensions marketplace
  2. Click "Install" on the GitHub MCP Extension
  3. Review permissions the extension requests:
    • Repository read/write access
    • Issue and PR management
    • Code search capabilities
  4. Click "Authorize" to proceed
  5. Authenticate with GitHub when prompted (OAuth flow)

Step 4: Configure Extension Settings

After installation:

  1. Click Configure next to the installed extension
  2. Authenticate with the service (GitHub, Google, etc.)
  3. Grant permissions for repository/file access
  4. Test the connection using the built-in validation

Your extension configuration is stored securely:

{
  "extensionId": "github-mcp",
  "version": "1.2.0",
  "status": "active",
  "permissions": ["repo:read", "issues:write", "pull_requests:write"]
}

Step 5: Verify Installation

Test your GitHub extension:

  1. Start a new conversation in Claude Desktop
  2. Ask Claude: "List my GitHub repositories"
  3. Verify the response shows your actual repositories
  4. Try additional commands like creating issues or searching code

Desktop Extensions vs Manual Configuration

| Feature | Desktop Extensions | Manual Configuration | |---------|-------------------|---------------------| | Setup Time | 1-5 minutes | 15-45 minutes | | Technical Skill | None required | JSON editing, command line | | Updates | Automatic | Manual | | Custom Servers | Limited to marketplace | Unlimited | | Security | Managed, encrypted | Self-managed | | Enterprise Support | Admin policies | Manual deployment | | Offline Use | Depends on extension | Full control |


Method 2: Manual Configuration

Manual configuration gives you complete control over MCP server setup. Use this method for:

  • Custom or private MCP servers
  • Servers not available as Extensions
  • Advanced configuration requirements
  • Development and testing

Step 1: Locate the Configuration File

Find your Claude Desktop configuration file:

Windows:

%APPDATA%\Claude\claude_desktop_config.json

Full path example: C:\Users\YourName\AppData\Roaming\Claude\claude_desktop_config.json

macOS:

~/Library/Application Support/Claude/claude_desktop_config.json

Linux:

~/.config/Claude/claude_desktop_config.json

Pro tip: Open the file in VS Code or another editor with JSON validation. Claude Desktop doesn't show configuration errors, so you'll waste time troubleshooting if your JSON is malformed.

Step 2: Create or Edit the Configuration File

If the file doesn't exist, create it with this structure:

{
  "mcpServers": {}
}

Step 3: Add Your First MCP Server

Let's add the Filesystem server for file access:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/yourname/Documents"
      ]
    }
  }
}

Configuration breakdown:

| Field | Description | Example | |-------|-------------|---------| | "filesystem" | Unique server name (your choice) | "my-files", "project-docs" | | "command" | Executable to run | "npx", "node", "python" | | "args" | Command-line arguments | Package name, paths, flags | | "env" | Environment variables (optional) | API keys, tokens |

Step 4: Add Multiple Servers

You can configure multiple MCP servers simultaneously:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/yourname/Documents"
      ]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
      }
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_CONNECTION_STRING": "postgresql://user:pass@localhost:5432/mydb"
      }
    }
  }
}

Step 5: Validate Your Configuration

Before restarting Claude Desktop, validate your JSON:

# Using Python
python3 -m json.tool claude_desktop_config.json

# Using Node.js
node -e "console.log(JSON.parse(require('fs').readFileSync('claude_desktop_config.json', 'utf8')))"

# Online validator: jsonlint.com

Common validation errors:

  • Trailing commas after the last item in arrays/objects
  • Missing quotes around strings
  • Unescaped backslashes in Windows paths (use \\ or /)

Step 6: Restart Claude Desktop

  1. Completely quit Claude Desktop (not just minimize)
    • macOS: Cmd+Q or right-click dock icon → Quit
    • Windows: Right-click system tray → Exit
  2. Restart Claude Desktop
  3. Look for the MCP indicator (hammer/tools icon) in the chat input
  4. Start a new conversation and test your servers

Windows-Specific Configuration

On Windows, npx is a batch script requiring cmd.exe. Use this format:

{
  "mcpServers": {
    "filesystem": {
      "command": "cmd",
      "args": [
        "/c", "npx", "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:/Users/YourName/Documents"
      ]
    }
  }
}

Or use absolute paths to Node.js:

{
  "mcpServers": {
    "filesystem": {
      "command": "C:/Program Files/nodejs/node.exe",
      "args": [
        "C:/Users/YourName/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js",
        "C:/Users/YourName/Documents"
      ]
    }
  }
}

Having issues? See our comprehensive MCP Server Troubleshooting Guide for solutions to common errors including "spawn npx ENOENT" and "connection closed."


Popular MCP Server Configurations

Here are ready-to-use configurations for the most popular MCP servers:

1. Filesystem Server (File Access)

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/yourname/Documents",
        "/Users/yourname/Projects"
      ]
    }
  }
}

Use cases: Read/write files, browse directories, search file contents

2. GitHub Server (Repository Management)

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Required token scopes: repo, read:org, read:packages

Use cases: Clone repos, manage issues/PRs, search code, analyze dependencies

Detailed setup: See our GitHub MCP Server Setup Guide for authentication and advanced configuration.

3. PostgreSQL Server (Database Queries)

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_CONNECTION_STRING": "postgresql://username:password@localhost:5432/database_name"
      }
    }
  }
}

Use cases: Run SQL queries, explore schemas, analyze data

4. SQLite Server (Local Database)

{
  "mcpServers": {
    "sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sqlite",
        "--db-path",
        "/path/to/your/database.db"
      ]
    }
  }
}

Use cases: Query local databases, data analysis, prototyping

5. Brave Search Server (Web Search)

{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "env": {
        "BRAVE_API_KEY": "your_brave_api_key"
      }
    }
  }
}

Use cases: Web search, research, fact-checking

6. Memory Server (Persistent Knowledge)

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

Use cases: Store facts, remember context across conversations

Complete Developer Setup

Here's a comprehensive configuration for software developers:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/developer/projects"
      ]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token"
      }
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_CONNECTION_STRING": "postgresql://dev:password@localhost:5432/devdb"
      }
    },
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

Troubleshooting Common Issues

Quick Fixes for Common Problems

| Problem | Quick Fix | |---------|-----------| | Server not appearing | Restart Claude Desktop completely | | "spawn npx ENOENT" (Windows) | Use "command": "cmd", "args": ["/c", "npx", ...] | | Connection closed immediately | Check for console.log() in server (use console.error() instead) | | JSON parse error | Validate JSON at jsonlint.com | | Node.js not found | Use absolute path: /opt/homebrew/bin/node or C:/Program Files/nodejs/node.exe |

Server Not Starting

Symptoms: No MCP indicator in Claude Desktop

Solutions:

  1. Validate JSON syntax with python3 -m json.tool config.json
  2. Use absolute paths for commands and arguments
  3. Test the server command directly in terminal
  4. Check Claude Desktop logs:
    • macOS: ~/Library/Logs/Claude/mcp.log
    • Windows: %APPDATA%\Claude\logs\mcp.log

Authentication Failures

Symptoms: "401 Unauthorized" or "Invalid token" errors

Solutions:

  1. Regenerate API tokens/keys
  2. Verify required permission scopes
  3. Check token expiration
  4. Use environment variables correctly in "env" block

Deep dive: See our MCP Authentication Troubleshooting Guide for detailed solutions.

Error -32000: Connection Closed

This is the most common MCP error. Main causes:

  1. stdout pollution - Server writes to stdout instead of stderr
  2. Missing dependencies - Required packages not installed
  3. Path issues - Relative paths fail in GUI apps

Solution for stdout pollution:

// Wrong - corrupts MCP protocol
console.log("Debug message");

// Correct - use stderr for logging
console.error("Debug message");

Complete error reference: Our MCP Troubleshooting Guide 2025 covers all error codes including -32000, -32001, and Inspector issues.


Security Best Practices

Protect your MCP server configurations and credentials:

Credential Management

  1. Never commit credentials to version control
  2. Use environment variables for sensitive data:
{
  "mcpServers": {
    "api-server": {
      "command": "node",
      "args": ["server.js"],
      "env": {
        "API_KEY": "${MY_API_KEY}",
        "DATABASE_URL": "${DATABASE_URL}"
      }
    }
  }
}
  1. Rotate tokens regularly (monthly for high-security environments)
  2. Use least-privilege permissions when creating API tokens

File System Access

  1. Limit directory access to necessary paths only
  2. Avoid exposing system directories or sensitive folders
  3. Use read-only access when write isn't needed

Network Security

  1. Use HTTPS for all remote MCP server connections
  2. Validate server certificates for production deployments
  3. Implement rate limiting for API-based servers

Enterprise security: See our MCP Security Best Practices Guide for comprehensive security implementation.


Next Steps

Now that you have MCP servers running, explore these resources:

Expand Your Setup

Advanced Topics

Troubleshooting

Community Resources


Frequently Asked Questions

What is an MCP server?

An MCP (Model Context Protocol) server is a standardized interface that allows Claude to connect to external tools, databases, APIs, and services. MCP servers expose three types of capabilities:

  • Resources - Data that Claude can read (files, database records, API responses)
  • Tools - Functions that Claude can execute (search, create files, run queries)
  • Prompts - Pre-built templates for common tasks

How do I install an MCP server in Claude Desktop?

You can install MCP servers using two methods:

  1. Desktop Extensions (easiest): Go to Settings > Extensions, browse available servers, and click Install.

  2. Manual configuration: Edit the claude_desktop_config.json file and add server configuration in the mcpServers object.

Where is the Claude Desktop config file located?

The configuration file location depends on your operating system:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Why is my MCP server not connecting?

Common causes include:

  1. Invalid JSON syntax - Validate your config file
  2. Wrong file paths - Always use absolute paths
  3. Missing dependencies - Ensure Node.js/Python is installed
  4. Logging to stdout - Use console.error() instead of console.log()

See our troubleshooting guide for detailed solutions.

Can I run multiple MCP servers simultaneously?

Yes! Claude Desktop supports multiple concurrent MCP servers. Add each server to the mcpServers object in your configuration file with a unique name. All servers run independently and Claude can use tools from any of them.

Are MCP servers secure?

MCP servers run locally on your machine with the permissions you grant. Security best practices include:

  • Using environment variables for credentials
  • Limiting file system access to necessary directories
  • Regularly rotating API tokens
  • Using HTTPS for remote servers

Do I need to restart Claude Desktop after configuration changes?

Yes. After modifying claude_desktop_config.json, you must completely quit Claude Desktop (not just minimize) and restart it for changes to take effect.

What's the difference between Desktop Extensions and manual configuration?

| Aspect | Desktop Extensions | Manual Configuration | |--------|-------------------|---------------------| | Setup | One-click install | Edit JSON files | | Updates | Automatic | Manual | | Custom servers | Marketplace only | Any server | | Security | Managed | Self-managed |


This guide is maintained by the MCP Directory team and updated regularly based on community feedback, MCP specification changes, and new server releases. Last updated: December 2025.