skip to content
Rohan
A friendly white robot at a wooden desk holds a glowing card reading tools, resources, prompts. Three cables run from its side into a wall panel of sockets tagged Files, Browser and Issues, with one empty socket tagged Your system. A card on the desk reads claude mcp add, and a cat sleeps beside a plant.

Claude MCP: What It Is and How to Add a Server

Claude MCP explained: what an MCP server gives Claude, and how to add, configure, list and remove servers in Claude Code, Claude Desktop and claude.ai.

Table of Contents

Claude MCP is Claude connected to other systems through the Model Context Protocol, Anthropic's open standard for giving AI assistants tools and data. You add an MCP server, the server exposes what one system can do, and Claude can then read from it and act in it. In Claude Code, adding one is a single claude mcp add command.

That is the short version. The rest of this post covers what an MCP server actually gives Claude, how to add one in each Claude app, where the configuration lives, and the few security habits worth having from the first day.

What a Claude MCP server gives Claude

An MCP server is a small program that speaks the protocol and offers three kinds of things:

  • Tools: actions Claude can call, such as "create an issue" or "run this query".
  • Resources: data Claude can read, such as a file, a table or a page.
  • Prompts: reusable templates the server suggests for common tasks.

Servers run in one of two ways. A local server is a process on your own machine that Claude starts and talks to over standard input and output (stdio). A remote server runs somewhere else and Claude reaches it over HTTP. Local is simpler for your own files and tools; remote suits services you sign in to, and it works from claude.ai in a browser, where nothing can run on your machine.

Anthropic released MCP as an open standard in November 2024, so the same server works with Claude Code, Claude Desktop, claude.ai and other MCP clients. Whether a system needs its own MCP server, or whether the API it already has is enough, is a separate decision; I worked through it in MCP vs API.

How to add an MCP server in Claude Code

The command is claude mcp add. For a local server, everything after the two dashes is the command Claude Code runs to start it:

claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem ~/projects

Pass secrets as environment variables, not as arguments, with --env:

claude mcp add --env AIRTABLE_API_KEY=your-key airtable -- npx -y airtable-mcp-server

For a remote server, give the transport and the URL:

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

Remote servers usually sign you in with OAuth. Open a Claude Code session, type /mcp, pick the server and finish the login in the browser. A server that takes a fixed token instead accepts a header: --header "Authorization: Bearer your-token". The older SSE transport still works but is deprecated; use HTTP where a server offers it.

Scope: who gets the server

Every server is added at one of three scopes, set with --scope:

ScopeFlagStored inWho sees it
Local (default)--scope local~/.claude.json, under this projectOnly you, only in this project
Project--scope project.mcp.json in the project rootEveryone who clones the repository
User--scope user~/.claude.json, top levelOnly you, in every project

Use project scope for servers the whole team needs, such as the issue tracker for that repository, and commit the file. Use user scope for personal tools you want everywhere. Leave one-off experiments at the default.

The .mcp.json file (Claude MCP JSON config)

Project-scoped servers live in .mcp.json, and you can write it by hand:

{
  "mcpServers": {
    "issues": {
      "type": "http",
      "url": "https://example.com/mcp"
    },
    "database": {
      "type": "stdio",
      "command": "/path/to/db-server",
      "args": ["--read-only"],
      "env": { "DB_URL": "${DB_URL}" }
    }
  }
}

${VAR} expands from your environment, so the committed file holds no secrets; ${VAR:-default} supplies a fallback. To add a server from a JSON snippet without editing files, use claude mcp add-json <name> '<json>'. If you already set servers up in Claude Desktop, claude mcp add-from-claude-desktop imports them on macOS and WSL.

Listing and removing servers

claude mcp list            # every configured server
claude mcp get issues      # details for one
claude mcp remove issues   # delete it (add --scope project for .mcp.json)

Inside a session, /mcp shows which servers connected and which failed, and lets you switch one off without deleting it. That is the quickest fix when a server is misbehaving and you want it out of the way for an afternoon.

Claude Desktop and claude.ai

Claude Desktop reads local servers from claude_desktop_config.json. Open it from the Claude menu: Settings, then Developer, then Edit Config. It lives at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS and %APPDATA%\Claude\claude_desktop_config.json on Windows, and uses the same mcpServers shape as .mcp.json. Quit and reopen the app after editing it; Desktop only reads the file at start-up.

claude.ai in the browser cannot start local processes, so it uses remote servers only, which it calls connectors. Open Settings, choose Connectors, click Add and then "Add custom connector", paste the server URL and sign in. The connector's settings let you turn individual tools on or off, which is worth doing for anything that can write.

Security in three habits

An MCP server runs with real credentials and, for local servers, with your user account's permissions. Three habits cover most of the risk:

  1. Least privilege. Give a server the narrowest scope that does the job: specific folders, a read-only database user, a token limited to one repository.
  2. Trust before you connect. Anthropic's own docs warn that servers which fetch outside content can expose you to prompt injection. Install servers from their publisher, not from a random fork.
  3. Allow-list the risky tools. Leave read tools on, and keep tools that delete, send or pay behind a confirmation, or switched off.

The design side of this, deciding which actions a server should expose at all, is most of what MCP vs API is about.

Claude MCP vs Skills

MCP gives Claude access to a system; a Skill teaches it a procedure. The two fit together: the server fetches the data, the Skill says what to do with it. For the full comparison, including when to reach for each, see Claude Skills vs MCP servers.

Claude MCP: common questions

What is Claude MCP? Claude MCP is Claude using the Model Context Protocol, Anthropic's open standard for connecting AI assistants to other systems. Claude connects to MCP servers, and each server exposes tools, resources or prompts from one system, such as GitHub or a database, so Claude can read live data and take actions there.

How do I add an MCP server to Claude Code? Run claude mcp add. For a local server, put the launch command after two dashes: claude mcp add my-server -- npx -y some-mcp-server. For a remote server, pass the transport and URL: claude mcp add --transport http my-server https://example.com/mcp. Then run /mcp inside Claude Code to check it connected.

Where is the Claude MCP config file? It depends on the app. Claude Code keeps local and user servers in ~/.claude.json and shared project servers in .mcp.json at the project root. Claude Desktop uses claude_desktop_config.json, under ~/Library/Application Support/Claude on macOS and %APPDATA%\Claude on Windows. claude.ai stores connectors in your account settings.

How do I remove an MCP server from Claude? In Claude Code, run claude mcp remove followed by the server name, adding --scope project if it lives in .mcp.json. To pause a server without deleting it, open /mcp and turn it off. In Claude Desktop, delete its entry from the config file and restart the app.

What is the difference between Claude MCP and Claude Skills? MCP gives Claude access to another system; a Skill teaches Claude a procedure. An MCP server fetches the customer record, and a Skill says how to turn it into your standard report. They solve different problems, and most real workflows end up using both together.

Where to start

Pick one system you already open every day, add its server at local scope, and give Claude one real task in it. If the server earns its place, move it to project scope so the rest of the team gets it too.

Which system would you connect first?

Stay in the loop

Get practical notes on backend systems, databases, and building with AI in your inbox.

Email subscriptions are handled by Substack. Unsubscribe anytime. Form not loading? Subscribe on Substack.