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.
Part of: How to Use Claude Code: Complete Beginner Guide (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.
# 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-serverChoosing 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.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "./data"]
},
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"]
}
}
}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.
# 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)
/mcpCommon 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.
Step by step
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).
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.
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.
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.
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.
