---
title: "How to Set Up MCP in Claude Code"
description: "Connect MCP servers in Claude Code with the claude mcp add command: HTTP, SSE and stdio transports, scopes, verifying with /mcp, and common servers to start with."
type: "guide"
locale: "en"
category: "Claude Code"
canonical: "https://agenticschool.dev/guides/claude-code-mcp-setup"
datePublished: "2026-06-13"
dateModified: "2026-06-13"
---

# How to Set Up MCP in Claude Code

- Category: Claude Code
- Keywords: claude code mcp setup, connect claude to mcp, mcp server claude code, claude mcp tutorial, claude mcp add
- Canonical URL: https://agenticschool.dev/guides/claude-code-mcp-setup
- Locale: en

> Connect MCP servers in Claude Code with the claude mcp add command: HTTP, SSE and stdio transports, scopes, verifying with /mcp, and common servers to start with.

MCP (Model Context Protocol) is an open standard that connects Claude Code to external tools, databases and services through one common interface, so the agent can read and act on those systems directly instead of you copying data into chat. This guide shows you exactly how to set up MCP in Claude Code: what connecting a server gives you, how to add one with the claude mcp add command for each transport, the scopes that decide who shares the connection, how to verify and authenticate with /mcp, and the common servers worth starting with. Every command here is current as of June 2026.

## What MCP gives you in Claude Code

Connect a server when you find yourself copying data into chat from another tool, like an issue tracker, a database or a monitoring dashboard. Once connected, Claude can read and act on that system directly. An MCP server exposes tools (actions the agent can run), resources (read-only data it can fetch) and prompts (reusable templates), and because MCP is a shared standard, an integration is written once per tool and works across every MCP-aware client. That is why support spread so fast and why there is now an MCP server for almost everything you would want to connect.

- Implement from an issue tracker: "Add the feature described in JIRA ENG-4521 and open a PR."
- Query a database directly instead of pasting rows into chat.
- Integrate designs, monitoring data and other services the agent could not otherwise see.
- Tools, resources and prompts: actions to run, data to read, templates to reuse.

## Adding a server with claude mcp add

The fastest way to connect a server is the claude mcp add command. There are three transports. HTTP is the recommended choice for remote, cloud-based servers. Stdio runs a server as a local process on your machine, ideal for tools that need direct system access. SSE also exists but is deprecated in favour of HTTP. For stdio servers, the double dash separates Claude's own options from the command that runs the server, and everything after it is passed to the server untouched.

```bash
# Remote HTTP server (recommended for cloud services)
claude mcp add --transport http notion https://mcp.notion.com/mcp

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

# Local stdio server (note the -- before the command)
claude mcp add --transport stdio airtable \
  --env AIRTABLE_API_KEY=YOUR_KEY -- npx -y airtable-mcp-server
```
Adding remote HTTP and local stdio MCP servers with claude mcp add. SSE also exists but is deprecated.

## Choosing a scope

The --scope flag decides who can use the server and where the config is stored. Local (the default) keeps it to you in the current project. Project shares it with everyone via a committed .mcp.json file at the repo root, so a project-scoped server is the right choice for connections your whole team needs. User makes it available to you across all your projects. Servers that need credentials should take them through environment variables (the --env flag), never hard-coded keys, so the same .env discipline applies and secrets stay out of committed config.

```json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "./data"]
    },
    "playwright": {
      "command": "npx",
      "args": ["-y", "@playwright/mcp@latest"]
    }
  }
}
```
A project-scoped .mcp.json (committed to the repo) connecting a filesystem server and a Playwright browser server.

Project-scoped servers from .mcp.json are not trusted automatically: they appear as pending approval until you review and approve them when you run Claude interactively, which protects you from running untrusted server code a teammate added.

## Verifying and authenticating

After adding a server, confirm it is working. From the shell, "claude mcp list" shows all configured servers and their status, "claude mcp get <name>" shows details for one, and "claude mcp remove <name>" deletes it. Inside a Claude Code session, the /mcp panel shows each connected server, its tool count, and lets you authenticate with servers that require OAuth 2.0 by walking you through the browser sign-in. If a request needs a server that is still connecting, Claude waits for it before continuing.

```bash
# List all configured servers and their status
claude mcp list

# Details for one server
claude mcp get notion

# Remove a server
claude mcp remove notion

# Inside a session: check status and authenticate (OAuth)
/mcp
```
Managing and verifying MCP servers. Use /mcp inside a session to authenticate via OAuth.

## Common servers and connecting deliberately

Good first connections are the filesystem server (scoped to a folder), the Playwright server (so the agent can drive a real browser), and a database server for your stack. But connect deliberately: every server adds its tool definitions to your context window, so each one has a real, ongoing cost. An MCP server is also third-party code with access to your systems, so vet what you connect just as you would a dependency. Often a CLI tool you already have, named in your CLAUDE.md, does the job with less overhead than a dedicated server. Three servers you use beat fifteen that bloat your context.

## Steps

### 1. Pick a server to connect

Decide what the agent needs to reach that it currently cannot, such as a database, a browser, or an issue tracker, and find its MCP server (HTTP for cloud services, stdio for local tools).

### 2. Add it with claude mcp add

Run claude mcp add with the right transport: --transport http <name> <url> for remote, or --transport stdio <name> -- <command> for local. Pass credentials with --env, never hard-coded.

### 3. Choose the scope

Use --scope project to share via a committed .mcp.json, --scope user for all your own projects, or leave the default local scope for just this project. Approve any pending project servers when prompted.

### 4. Verify the connection

Run "claude mcp list" to confirm the server and its status, then open /mcp inside a session to see its tool count and authenticate via OAuth if the server requires it.

### 5. Use it, and prune what you do not

Ask the agent to use the server's tools. Remove servers you do not use with "claude mcp remove" so your context stays lean, and prefer a CLI named in CLAUDE.md when one would do the job.

## FAQ

### How do I add an MCP server to Claude Code?

Use the claude mcp add command. For a remote server: "claude mcp add --transport http <name> <url>". For a local server: "claude mcp add --transport stdio <name> -- <command>". Add credentials with --env flags, and use --scope project to share via a committed .mcp.json.

### What is MCP in Claude Code?

MCP (Model Context Protocol) is an open standard that connects Claude Code to external tools, databases and services through one common interface. A connected MCP server exposes tools, resources and prompts the agent can use directly, so it can act on those systems instead of you copying data into chat.

### What are the MCP scopes in Claude Code?

Three scopes set with --scope. Local (the default) keeps the server to you in the current project. Project shares it with the team via a committed .mcp.json at the repo root. User makes it available to you across all your projects.

### How do I check if my MCP server is connected?

Run "claude mcp list" from the shell to see all servers and their status, or "claude mcp get <name>" for one server. Inside a Claude Code session, the /mcp panel shows connected servers, their tool counts, and lets you authenticate with OAuth servers.

### Which transport should I use for an MCP server?

Use HTTP for remote, cloud-based servers; it is the recommended and most widely supported transport. Use stdio for local servers that run as a process on your machine. SSE still exists but is deprecated in favour of HTTP.

### Is it safe to connect lots of MCP servers?

Be deliberate. Each server adds its tool definitions to your context window, so it has an ongoing cost, and a server is third-party code with access to your systems, so vet it like a dependency. Often a CLI tool named in your CLAUDE.md does the job with less overhead. Connect few, connect things you trust.
