Tutorials9 min read

How to Set Up MCP Servers with Claude Desktop: Complete Guide 2026

Step-by-step guide to connecting MCP servers to Claude Desktop. Learn how to configure filesystem, GitHub, database, and web search servers to supercharge your Claude workflow.

By MyMCPTools Team·

Claude Desktop is one of the most popular MCP-enabled AI clients, and for good reason — it supports a rich ecosystem of MCP servers that give Claude direct access to your files, databases, APIs, and tools. This guide walks you through everything you need to know to get MCP servers running with Claude Desktop in 2026.

Prerequisites

Before you start, make sure you have:

  • Claude Desktop installed (Mac or Windows) — download at claude.ai/download
  • Node.js v18+ installed (for npm-based MCP servers)
  • Python 3.10+ installed (for Python-based MCP servers)
  • A text editor for editing JSON config files

Where Is the Claude Desktop Config File?

Claude Desktop stores MCP server configuration in a JSON file. The location depends on your operating system:

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

If the file doesn't exist yet, create it. If it does exist, you'll add your MCP servers to the mcpServers object.

The Configuration Format

Every MCP server is defined with a command and optional arguments and environment variables:

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-name"],
      "env": {
        "API_KEY": "your-api-key-here"
      }
    }
  }
}

After editing the config file, restart Claude Desktop for the changes to take effect.

Step 1: Add the Filesystem MCP Server (Start Here)

The filesystem server is the most universally useful MCP server — it gives Claude read and write access to files and directories on your machine.

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

Replace the paths with the directories you want Claude to access. You can specify multiple directories. Note: Claude can only access the directories you explicitly list — this is a security feature, not a limitation.

Test it: After restarting Claude Desktop, ask "Can you list the files in my Documents folder?" You should see Claude accessing your files directly.

Step 2: Add the GitHub MCP Server

The GitHub MCP server lets Claude browse repositories, manage issues, review pull requests, and search code — all without leaving the conversation.

First, create a GitHub Personal Access Token at github.com/settings/tokens with repo scope. Then add:

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

Test it: Ask Claude "What are the open issues in my [repo-name] repository?"

Step 3: Add the Brave Search MCP Server

Give Claude the ability to search the web for current information, documentation, and research.

Get a free Brave Search API key at api.search.brave.com, then add:

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

Test it: Ask Claude "Search for the latest news about Model Context Protocol."

Step 4: Add a Database Server (PostgreSQL or SQLite)

If you work with databases, these servers let Claude query your data directly.

For SQLite:

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

For PostgreSQL:

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

Test it: Ask Claude "What tables are in my database?" or "Show me the last 10 rows of the users table."

Your Complete Config Example

Here's a complete claude_desktop_config.json with all four servers configured:

{
  "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_..." }
    },
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "env": { "BRAVE_API_KEY": "BSA..." }
    },
    "sqlite": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-sqlite", "--db-path", "/path/to/db.sqlite"]
    }
  }
}

Troubleshooting Common Issues

Claude doesn't see my MCP servers

  • Restart Claude Desktop completely (quit, not just close the window)
  • Check the JSON config is valid (use a JSON linter)
  • Make sure Node.js is in your PATH

MCP server connection errors

  • Check the Claude Desktop logs at ~/Library/Logs/Claude/mcp*.log (macOS)
  • Run the install command manually in terminal to check for errors
  • Verify your API keys are correct

npx is slow on first run

npx downloads packages on first run. This is normal — subsequent runs are cached and fast. Use npm install -g to pre-install servers if you prefer.

What to Add Next

Once your basics are working, consider adding:

  • Memory MCP — persistent memory across conversations
  • Puppeteer MCP — browser automation and web scraping
  • Slack or Notion MCP — team collaboration tool access
  • AWS or Docker MCP — infrastructure management

Browse the full catalog at MyMCPTools.com to find servers for your specific stack.

Related guides:

Recommended Tools

Better Stack

Free Plan

Get alerted when your APIs, browser tests, payment pipelines, or MCP server dependencies go down. Used by 100K+ developers.

Start monitoring free →

1Password

14-day Free Trial

Store and inject API keys, payment credentials, tokens, and file access secrets into your MCP server configs. Trusted by 150K+ developers.

Try 1Password free →

🔧 MCP Servers Mentioned in This Article

📁

Filesystem MCP Server

sandboxed read, write, edit, move and search access to an explicit whitelist of local directories, and it is the reference implementation most other filesystem MCP servers are modelled on. Shipped by Anthropic in the official modelcontextprotocol/servers monorepo (89,000+ stars, actively maintained), it is a Node.js server published to npm as @modelcontextprotocol/server-filesystem. The part worth understanding before you install is the access-control model, because there are now two ways to grant directories and they do not compose. Method one is command-line arguments: `npx -y @modelcontextprotocol/server-filesystem /path/one /path/two`. Method two, and the one the maintainers recommend, is MCP Roots — a client that supports the roots protocol sends its roots at initialization, and those roots COMPLETELY REPLACE any directories passed on the command line, then get replaced again on every `notifications/roots/list_changed`. That means allowed directories can change at runtime without restarting the server, but it also means a roots-capable client silently overrides your CLI arguments. If the server starts with no arguments and the client either does not support roots or sends an empty list, initialization throws an error. The tool surface is broad: `read_text_file` (with mutually exclusive `head`/`tail` line windows), `read_media_file` returning base64 image/audio content blocks, `read_multiple_files` which keeps going when individual reads fail, `write_file`, `edit_file`, `create_directory`, `list_directory`, `list_directory_with_sizes`, `move_file`, `search_files`, `directory_tree`, `get_file_info` and `list_allowed_directories`. `edit_file` is the one to learn — it does line-based and multi-line pattern matching with indentation detection and preservation, returns a git-style diff with context, and supports `dryRun: true` so you can preview a change before applying it; the maintainers recommend always running a dry run first. Every operation is refused outside the allowed set, and `list_allowed_directories` is the fastest way to confirm what the server actually believes it can touch.

Local
💻

GitHub MCP Server

authenticated access to the whole GitHub platform — repositories, files, branches, issues, pull requests, Actions runs, security alerts, discussions and notifications — from Claude, Cursor, VS Code, Copilot CLI and any other MCP host. There is no npm package for this server, and that trips up most people who try to install it: `@github/mcp-server` is not published to the npm registry, so any `npx` line you find for it will fail. GitHub ships it three other ways. The easiest is the hosted remote server at https://api.githubcopilot.com/mcp/, which needs no install at all — point an HTTP-transport MCP client at that URL and log in with OAuth (VS Code 1.101+, Claude Desktop, Claude Code, Cursor and Windsurf all support this). The second is the official Docker image ghcr.io/github/github-mcp-server, which is what the copy-paste command on this page runs; on github.com it now performs a browser-based OAuth login on first use and keeps the token in memory only, which is why the published Docker configs map a fixed loopback callback port (-p 127.0.0.1:8085:8085 with GITHUB_OAUTH_CALLBACK_PORT=8085) so the container can receive the callback. Prefer a token? Set GITHUB_PERSONAL_ACCESS_TOKEN instead — it takes precedence over OAuth, and the minimum useful scopes are repo, read:org and read:packages. The third is the native Go binary from the repository's releases, which needs no fixed port for the OAuth flow. GitHub Enterprise Server has no hosted option: use the local server with --gh-host or GITHUB_HOST set to your instance (include the https:// scheme — it defaults to http://, which GHES rejects). Toolsets can be narrowed with GITHUB_TOOLSETS, and an insiders channel is available at /mcp/insiders or via the X-MCP-Insiders header.

Auth required📘
🗄️

PostgreSQL MCP Server

The PostgreSQL MCP server was the Model Context Protocol reference server for Postgres, and it is retired: the source now sits in modelcontextprotocol/servers-archived — a repository GitHub reports as archived, described as "Reference MCP servers that are no longer maintained" — and the npm package @modelcontextprotocol/server-postgres carries a deprecation notice reading "Package no longer supported." It still installs and still runs, which is why most third-party setup articles have not caught up. What it provides is deliberately small: a single tool, query, which executes read-only SQL inside a READ ONLY transaction, plus per-table schema information exposed as MCP resources at postgres://<host>/<table>/schema, with column names and data types discovered from database metadata. There is no index advice, no health check, no separate schema-listing tool, and no write mode. Install is npx @modelcontextprotocol/server-postgres with a postgres:// connection string as the argument. For active work against Postgres, the maintained alternative is Postgres MCP Pro (crystaldba/postgres-mcp), which exposes nine tools including index tuning against hypothetical indexes and a database health check, and has an explicit restricted access mode; if your database is hosted on Supabase or Neon, their platform servers add branching and logs that a raw Postgres connection cannot see. Reach for this archived server only when you want the smallest possible surface — one process, one read-only query tool, nothing else.

Local📘
🗄️

SQLite MCP Server

conversational read and write access to any SQLite database file, plus a running business-insights memo that accumulates what the analysis turns up. It is a Python server on PyPI, not a Node one, and the difference is the single most common reason setups fail here: `@modelcontextprotocol/server-sqlite` does not exist on npm, so every npx line for it 404s. The working invocation is `uvx mcp-server-sqlite --db-path /path/to/database.db` (PyPI package mcp-server-sqlite, v2025.4.25), or the equivalent `mcp/sqlite` Docker image with a volume mounted at /mcp. The --db-path argument is required and points at the .db file; the server will create it if it is not there yet. Six tools are exposed, deliberately split by risk: read_query for SELECT only, write_query for INSERT/UPDATE/DELETE, create_table for DDL, list_tables and describe-table for schema introspection, and append_insight, which writes into a memo://insights resource that updates live as findings accumulate — that resource, not the SQL tools, is what makes this server different from a generic database connector. It also ships an mcp-demo prompt that takes a business topic, generates a plausible schema and sample data, and walks through an analysis end to end, which is the fastest way to see the memo behaviour without wiring up real data. One caveat to weigh before adopting it: this is an Anthropic reference implementation that now lives in modelcontextprotocol/servers-archived, archived on 2025-05-28. The published package still installs and runs, but it is frozen — no new features, no dependency updates, and no security patches.

Local
🔍

Brave Search MCP Server

The Brave Search MCP Server is the official server from Brave that gives AI assistants privacy-first web search through the independent Brave Search API — no tracking, no profiling, and results drawn from Brave's own web index rather than Google or Bing. It exposes five distinct tools that map directly to the Brave Search API endpoints: brave_web_search for general queries with pagination, freshness filters, and safe-search controls; brave_local_search for businesses, restaurants, and points of interest with automatic location filtering; brave_news_search for recent articles and current events; brave_image_search for image discovery; and brave_video_search for finding videos across the web. Authentication uses a single BRAVE_API_KEY (free tier available at brave.com/search/api) or a mounted BRAVE_API_KEY_FILE for Docker-secret setups. Install in Claude Desktop, Cursor, Windsurf, or VS Code with one npx command and choose stdio or streamable-HTTP transport. Because Brave operates its own crawler and index, the Brave Search MCP server is a strong choice for developers who want an alternative to Google-dependent search tools, need reproducible non-personalized results, or care about data privacy in agent workflows — Claude can pull fresh web context, verify facts, and research topics without leaking queries to ad-tech pipelines.

Local
🌍

Puppeteer MCP Server

browser automation over MCP — navigate, click, fill, screenshot and run JavaScript in a real Chromium instance — but the first thing to know is that this server is archived. It was one of Anthropic's original reference servers and now lives in modelcontextprotocol/servers-archived, a repository GitHub reports as archived with no commits since May 2025. The npm package @modelcontextprotocol/server-puppeteer is still installable and still runs, and its last publish is from the same period, so treat it as frozen rather than broken: no new features, no security patches, no dependency bumps on Puppeteer itself. For new work the maintained successors are Microsoft's Playwright MCP server and ExecuteAutomation's Playwright MCP server, both of which cover the same ground with active releases. If you are maintaining an existing integration, the surface is small and easy to reason about. Seven tools: `puppeteer_navigate` (takes an optional `launchOptions` object mirroring PuppeteerJS LaunchOptions — changing it restarts the browser — and an `allowDangerous` flag that must be true before flags like `--no-sandbox` or `--disable-web-security` are accepted), `puppeteer_screenshot` (CSS selector for element shots, 800x600 default, optional `encoded` for a base64 data URI instead of binary content), `puppeteer_click`, `puppeteer_hover`, `puppeteer_fill`, `puppeteer_select`, and `puppeteer_evaluate` for arbitrary JavaScript in the page context. It also exposes two resource types the tools alone do not give you: `console://logs` for the live browser console stream and `screenshot://<name>` for captured PNGs. The README carries an explicit security caution worth repeating — the browser runs on your own machine, so it can reach local files and internal IP addresses, and should not be pointed at untrusted pages while sensitive data is reachable. The npx install opens a visible browser window; the Docker image `mcp/puppeteer` runs headless Chromium instead.

Local
🧠

Memory

Knowledge graph-based persistent memory system. Store and retrieve contextual information.

Local

📚 More from the Blog