Adding MCP servers
Use theclaude mcp add CLI subcommand to register a server. The server name, command (or URL), and scope are required.
Stdio servers (local process)
Stdio servers run as a local subprocess. Claude Code spawns the process and communicates over stdin/stdout.HTTP servers (remote)
HTTP servers are reachable over the network. Pass--transport http and a URL.
SSE servers
Server-Sent Events (SSE) transport is also supported for streaming servers:Server scope
Every server is registered at a specific scope that determines which settings file stores it and who can use it.Stored in
.claude/settings.local.json in the current project directory. Applies only to this machine and this project. Gitignored. This is the default.--scope user
Stored in
~/.claude/settings.json. Available in all projects on this machine.--scope project
Stored in
.claude/settings.json in the current project directory. Committed to version control — all teammates who check out the project get this server.Managing servers
- /mcp command
- CLI subcommands
- Reconnect
Inside a Claude Code session, run
/mcp to open the interactive MCP server manager. From there you can view connection status, enable/disable servers, and reconnect.OAuth authentication
HTTP and SSE servers that require OAuth can be configured with a client ID and secret:--client-secret flag prompts for the secret interactively (or reads from the MCP_CLIENT_SECRET environment variable). Secrets are stored in the system keychain, not in settings files.
Use --callback-port if the authorization server requires a pre-registered redirect URI:
Using MCP tools in conversations
Once connected, MCP tools appear automatically alongside built-in tools. Reference them naturally in your conversation:“Use the database tool to look up orders placed in the last 7 days.”Claude selects the appropriate MCP tool and asks for permission (subject to your permissions configuration) before calling it.
Enterprise MCP controls
Organizations can restrict which MCP servers users may configure:Allowlist of servers that may be used. Each entry matches by
serverName, serverCommand, or serverUrl. If undefined, all servers are allowed. An empty array blocks all servers.Denylist of servers that are explicitly blocked. Takes precedence over
allowedMcpServers.When
true (set in managed settings), the allowedMcpServers allowlist is only read from managed settings. Users can still add their own servers, but only the admin-defined allowlist governs which are permitted.Example MCP servers
Sentry
Connect to Sentry to query issues, releases, and performance data directly from your workflow.
GitHub
Interact with GitHub repositories, pull requests, and issues using the official MCP server.
PostgreSQL
Give Claude read access to a PostgreSQL database for querying and schema inspection.
Filesystem
Extend the directories Claude can read beyond the project root.