How to Add MCP Servers in Claude Code (2026)
Claude Code manages MCP servers from the terminal with the claude mcp command family. Local servers run as child processes; remote servers connect over HTTP (or the deprecated SSE transport) and authenticate with OAuth.
1. Add a local (stdio) server
Use claude mcp add with the server name and its command. The double dash separates Claude Code's own flags from the server command:
claude mcp add airtable -- npx -y airtable-mcp-server
# with environment variables for the server process
claude mcp add --env KEY=value airtable -- npx -y airtable-mcp-server2. Pick a scope (local, project or user)
local (default) — stored in ~/.claude.json, available only in the current project on your machine.
project — written to .mcp.json in the project root and shared through version control; add with -s project.
user — available in all your projects on this machine; add with -s user.
Precedence when names collide: local > project > user.
3. Manage and inspect
claude mcp list shows configured servers; claude mcp get <name> shows details; claude mcp remove <name> removes one. The /mcp command inside a session shows connection status and OAuth actions.
Two handy importers: claude mcp add-json <name> '<json>' adds a raw JSON entry, and claude mcp add-from-claude-desktop copies everything already configured in Claude Desktop.
Adding a remote MCP server
Remote servers use the http transport (recommended) or the older sse transport, which newer versions only use as a fallback:
claude mcp add --transport http github https://api.githubcopilot.com/mcp/
# static token instead of OAuth
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer YOUR_TOKEN"Skip the JSON
The MCPNav config generator builds a ready-to-paste config for Claude Code from any servers you pick — including optional version pinning. Or start from our curated shortlists: Best MCP servers (all clients).