Skip to content
Claudekit.ai

MCP Servers for Claude: Setup Guide for Code and Desktop

What the Model Context Protocol is, how to add MCP servers for Claude in Claude Code and Claude Desktop, scopes, auth, and which server types to install first.

By Claudekit Team Published 11 min read

Out of the box, Claude can read your files and run commands. It can’t see your GitHub issues, your production database schema, your Figma file or a live browser. The Model Context Protocol (MCP) is how you connect those. This guide explains MCP in plain terms, shows exactly how to add servers to Claude Code and Claude Desktop, and suggests which categories to start with. Commands are verified against the official docs as of October 2026.

What MCP is

MCP is an open-source standard for connecting AI applications to external systems. The official site’s analogy is a USB-C port for AI: one standard connector, many devices. An MCP server exposes tools (actions), resources (data) and prompts to an MCP client such as Claude Code, Claude Desktop or another AI app.

Because it’s a standard, a server built once works across clients. Claude, ChatGPT, VS Code, Cursor and many other tools support MCP.

Servers come in two shapes:

  • Remote servers run as a web service and you connect by URL (for example https://mcp.notion.com/mcp). Most SaaS vendors now offer these, usually with OAuth sign-in.
  • Local (stdio) servers run as a process on your machine, typically launched with npx, uvx, docker or a binary. They suit tools that need local access.

Adding MCP servers to Claude Code

All of this happens with the claude mcp command in your terminal.

# Basic syntax
claude mcp add --transport http <name> <url>

# Example: Notion
claude mcp add --transport http notion https://mcp.notion.com/mcp

# Example with a bearer token
claude mcp add --transport http secure-api https://api.example.com/mcp \
  --header "Authorization: Bearer your-token"

The older SSE transport is deprecated. On recent versions, --transport http falls back to SSE automatically when a server only supports SSE.

Local stdio server

# Basic syntax
claude mcp add [options] <name> -- <command> [args...]

# Example: Airtable
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \
  -- npx -y airtable-mcp-server

The -- matters: everything after it is passed to the server untouched, so flags like -y or --port aren’t mistaken for Claude’s own options.

From a JSON block written for another client

Setup instructions often give a Claude Desktop–style mcpServers block. Pass the inner object to add-json:

claude mcp add-json example '{"command":"npx","args":["-y","@example/mcp-server"]}'

If an entry has a url, make sure it also has "type": "http"; without a type, Claude Code treats it as stdio and skips it.

Import from Claude Desktop

If you already configured servers in Claude Desktop:

claude mcp add-from-claude-desktop

Manage servers

claude mcp list          # list configured servers
claude mcp get notion    # details for one server
claude mcp remove notion # remove it

Inside a session, run /mcp to see status, reconnect, enable or disable servers, and complete OAuth sign-in. A checkmark means connected; an ✘ shows the failure detail.

Scopes: who gets the server

ScopeLoads inShared with teamStored in
local (default)Current project onlyNo~/.claude.json
projectCurrent project onlyYes, via version control.mcp.json in the project root
userAll your projectsNo~/.claude.json
claude mcp add --transport http shared-server --scope project https://example.com/mcp

Claude Code asks for approval before using project-scoped servers from .mcp.json in interactive sessions (reset choices with claude mcp reset-project-choices). When the same server name is defined in more than one scope, local wins over project, which wins over user.

Keep secrets out of .mcp.json

.mcp.json supports environment variable expansion, so you can commit the file without tokens:

{
  "mcpServers": {
    "api-server": {
      "type": "http",
      "url": "${API_BASE_URL:-https://api.example.com}/mcp",
      "headers": {
        "Authorization": "Bearer ${API_KEY}"
      }
    }
  }
}

${VAR} expands to the variable; ${VAR:-default} supplies a fallback.

Authentication

Many remote servers use OAuth 2.0. Add the server, then run /mcp and choose to authenticate; Claude Code opens the browser flow and stores the tokens. If a stored token is rejected, Claude Code refreshes and retries once, then flags the server in /mcp for re-authentication. Removing a remote server also deletes its stored OAuth tokens.

If you sign in to Claude Code with a claude.ai account, connectors you’ve added at claude.ai (Settings → Connectors) are also available in Claude Code automatically.

Adding MCP servers to Claude Desktop

Claude Desktop (macOS, Windows and Linux) reads local servers from a JSON config file (prefer clicks? see our no-code Claude Desktop MCP setup):

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

Open it from Settings → Developer → Edit Config (from the Claude menu in your system menu bar, not the in-window settings). The official quickstart uses the filesystem server as its example:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/Users/username/Downloads"
      ]
    }
  }
}

The trailing arguments are the only directories the server may access. Use absolute paths, make sure Node.js is installed, and fully restart Claude Desktop after editing. If the server doesn’t appear, check the JSON syntax and the logs (on Windows in %APPDATA%\Claude\logs).

For remote servers in Claude Desktop and claude.ai, add them as connectors in settings rather than editing the JSON file.

Server categories worth starting with

You don’t need dozens. Start with the categories that remove the most copy-paste from your day, or jump to our ranked list of the best MCP servers for developers.

CategoryWhat it unlocksExamples
Code hostingRead PRs and issues, create issues, review diffsGitHub MCP Server
Up-to-date docsCurrent library docs instead of stale training dataContext7
Browser automationClick through your app, take screenshots, test flowsPlaywright MCP, Chrome DevTools MCP
DatabasesInspect schemas, run read-only queriesDBHub
Files (Desktop)Let Claude Desktop read and write chosen foldersFilesystem server
Project toolsTickets, docs, design filesNotion, Linear, Asana, Figma (vendor-hosted servers)
MonitoringErrors and logs in contextSentry and similar vendor servers

Two quick examples from the official Claude Code docs.

GitHub (fine-grained personal access token):

claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
  --header "Authorization: Bearer YOUR_GITHUB_PAT"

Then ask: “Review PR #456 and suggest improvements” or “Show me all open PRs assigned to me”.

PostgreSQL via DBHub (use a read-only database user):

claude mcp add --transport stdio db -- npx -y @bytebase/dbhub \
  --dsn "postgresql://readonly:pass@prod.db.com:5432/analytics"

Then ask: “Show me the schema for the orders table”.

Where to find servers

  • The MCP Registry at registry.modelcontextprotocol.io lists published servers.
  • The modelcontextprotocol/servers repository hosts a small set of reference servers (Everything, Fetch, Filesystem, Git, Memory, Sequential Thinking, Time). Many older servers there, including the original GitHub and Postgres ones, are archived; prefer vendor-maintained replacements.
  • Anthropic’s connector directory at claude.ai/directory lists reviewed remote servers that also work in Claude Code.
  • Our MCP server directory reviews notable servers with install commands.

Claude Code enables tool search by default: only tool names and server instructions load at session start, and full tool definitions load when Claude needs them. Adding servers therefore has a small context footprint. Still, each server is a process or connection, a credential and a trust decision, so keep the list to what you use. /context shows what’s loaded.

Security checklist

  1. Trust the source. Prefer official vendor servers or well-maintained open-source ones.
  2. Least privilege. Fine-grained tokens scoped to specific repos; read-only database users.
  3. Watch for prompt injection. Servers that fetch web pages, issues or emails bring untrusted text into Claude’s context.
  4. No secrets in git. Use ${VAR} expansion and keep tokens in your environment.
  5. Review project servers. A cloned repo’s .mcp.json can launch processes; approve only what you recognise.

Building your own server

To expose an internal API, start with the official build guide at modelcontextprotocol.io or our TypeScript MCP server tutorial. Two shortcuts:

  • Anthropic’s mcp-builder skill guides Claude through building a server in Python (FastMCP) or TypeScript.
  • The official mcp-server-dev plugin scaffolds one: /plugin install mcp-server-dev@claude-plugins-official, then /mcp-server-dev:build-mcp-server.

Test it with the MCP Inspector before connecting it to Claude.

MCP in your Claude kit

MCP servers are the “hands” of a Claude kit. Combine them with skills that tell Claude how to use a server for your workflow, scope heavy servers to one subagent via its mcpServers field, and bundle the lot in a plugin (plugins can ship their own .mcp.json).

Frequently asked questions

Is MCP only for Claude?

No. MCP is an open-source standard. Claude, ChatGPT, VS Code, Cursor and many other clients support it, so the same server usually works across tools.

Does adding many MCP servers slow Claude Code down or eat context?

Claude Code uses tool search by default, so only tool names and server instructions load at session start and full definitions load when needed. Each server is still a running connection to manage, so add the ones you use.

Where does Claude Code store MCP configuration?

Local and user scoped servers live in ~/.claude.json; project scoped servers live in .mcp.json at the project root, which you can commit. Claude Desktop uses claude_desktop_config.json.

Are MCP servers safe?

Only as safe as the server and the data it fetches. A server runs with the access you give it, and servers that pull external content can expose you to prompt injection. Use official or well-maintained servers, least-privilege tokens and read-only database users.

Get the weekly Claude digest

New skills, MCP servers, prompts and Claude updates — one short email a week. No spam, unsubscribe anytime.

The newsletter is launching soon. Follow the RSS feed in the meantime.