Model Context Protocol (MCP) is how you give Claude AI access to tools — your email, your files, your databases, GitHub, Discord, and dozens of other services. The setup lives entirely inside a single JSON config file. This guide walks through exactly where that file is, what it looks like, and how to add your first server.

What Is MCP?

MCP (Model Context Protocol) is an open standard published by Anthropic that lets Claude communicate with external tools and data sources in real time. Without MCP, Claude only knows what you paste into the chat. With MCP, Claude can read your inbox, query a database, browse the web, or push a file to GitHub — all from within a conversation.

Each MCP integration is a small server process that runs locally on your machine (or remotely, if hosted). Claude Desktop connects to these servers at startup using the config file described below.

Prerequisites

  • Claude Desktop — download the Mac or Windows version from claude.ai/download
  • Node.js 18+ — most MCP servers are distributed as npm packages. Download from nodejs.org
  • A terminal (macOS Terminal, Windows PowerShell, or Windows Terminal)

Step 1 — Find the Config File

Claude Desktop reads MCP server configuration from a file called claude_desktop_config.json. Its location depends on your OS:

OS Path
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. The folder will already be there after Claude Desktop has been launched at least once.

macOS shortcut: Open Terminal and run:

open ~/Library/Application\ Support/Claude/

Windows shortcut: Press Win + R, paste %APPDATA%\Claude, press Enter.

Step 2 — Understand the Config Format

The config file is plain JSON with a single top-level key: mcpServers. Each entry under mcpServers is a named server with a command and optional args and env fields.

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "@scope/package-name"],
      "env": {
        "SOME_API_KEY": "your-key-here"
      }
    }
  }
}
  • "server-name" — any label you choose; this is just what Claude uses to identify the server internally
  • "command" — the executable to run (usually npx, node, or python3)
  • "args" — arguments passed to the command
  • "env" — environment variables, used for API keys and credentials

Step 3 — Add Your First Server

As a concrete example, here's how to add MAILsimple — the IMAP/SMTP email connector for Claude built by CCMS — alongside Anthropic's official filesystem server:

{
  "mcpServers": {
    "mailsimple": {
      "command": "npx",
      "args": ["-y", "@ccms/mailsimple-mcp"],
      "env": {
        "IMAP_HOST":     "imap.yourprovider.com",
        "IMAP_PORT":     "993",
        "IMAP_USER":     "you@yourdomain.com",
        "IMAP_PASSWORD": "your-app-password",
        "SMTP_HOST":     "smtp.yourprovider.com",
        "SMTP_PORT":     "587"
      }
    },
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/yourname/Documents"
      ]
    }
  }
}

Replace the IMAP_* and SMTP_* values with your actual email provider settings. For Gmail, use an App Password rather than your main account password.

Step 4 — Restart Claude Desktop

MCP servers are only loaded at startup. After saving claude_desktop_config.json:

  1. Fully quit Claude Desktop — on Mac, right-click the dock icon → Quit; on Windows, right-click the system tray icon → Quit
  2. Reopen Claude Desktop
  3. Start a new conversation

Step 5 — Verify the Server Is Connected

In a new Claude conversation, click the tools icon (hammer icon) at the bottom-left of the input box. You should see the tools exposed by your MCP servers listed there. If a server failed to start, it will either be absent or show an error.

You can also ask Claude directly:

"What tools do you have available right now?"

Claude will list every tool it can see from connected MCP servers.

Troubleshooting Common Issues

Server doesn't appear in the tools list

  • Check the JSON syntax in your config file — a missing comma or bracket breaks the entire file. Run it through jsonlint.com to validate
  • Make sure Node.js is installed and npx is in your PATH — run npx --version in a terminal to confirm
  • Fully quit and reopen Claude Desktop after every config change

Server starts but Claude can't connect

  • Check env values — wrong credentials or missing environment variables are the most common cause
  • For IMAP connectors, confirm your email provider allows IMAP access and that you're using an app password if 2FA is enabled

npx is slow on first run

The first time npx -y @scope/package runs it downloads the package. Subsequent startups use the npm cache and are fast. This is normal.

Adding Multiple Servers

You can connect as many MCP servers as you like — just add more entries under mcpServers. Here's a larger config combining email, filesystem, GitHub, and web search:

{
  "mcpServers": {
    "mailsimple": {
      "command": "npx",
      "args": ["-y", "@ccms/mailsimple-mcp"],
      "env": {
        "IMAP_HOST": "imap.yourprovider.com",
        "IMAP_PORT": "993",
        "IMAP_USER": "you@yourdomain.com",
        "IMAP_PASSWORD": "your-app-password",
        "SMTP_HOST": "smtp.yourprovider.com",
        "SMTP_PORT": "587"
      }
    },
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/yourname/Documents",
        "/Users/yourname/Projects"
      ]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
      }
    },
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "env": {
        "BRAVE_API_KEY": "your-brave-api-key"
      }
    }
  }
}

Where to Find MCP Servers

The main places to discover MCP servers:

Frequently Asked Questions

Do MCP servers run in the cloud or locally?

By default, the servers described here run as local processes on your machine. They start when Claude Desktop starts and stop when it quits. Your credentials never leave your machine — the MCP server communicates directly with the remote service (your email provider, GitHub, etc.) on your behalf.

Is it safe to put credentials in the config file?

The config file is stored in your user profile and is only readable by your own OS account. It is not sent to Anthropic. That said, use app passwords or limited-scope API tokens rather than your main account password wherever possible.

Can I use MCP on Claude.ai (the web app)?

Currently, MCP server connections are a Claude Desktop feature. Claude.ai in the browser does not yet support locally-run MCP servers in the same way.

What's the difference between MCP and normal Claude tool use?

Tool use in Claude's API lets developers define custom tools in code. MCP is a standardized protocol that wraps that capability — so any compliant MCP server can plug into Claude Desktop without writing custom integration code each time.