Data coding-agents/
Claude Code MCP config: file location, transports and auth
One row of the MCP client config reference, checked 2026-12-06.
- Client
- Claude Code
- Vendor
- Anthropic
- Config file
- ~/.claude.json (local and user scopes); .mcp.json at the project root (project scope); managed-mcp.json at /Library/Application Support/ClaudeCode/ (macOS), /etc/claude-code/ (Linux, WSL) or C:\Program Files\ClaudeCode\ (Windows)
- Format
- JSON, mcpServers object; claude mcp add or claude mcp add-json
- Scopes
- Local (default; this project, private), project (shared through .mcp.json), user (all projects); plus plugin servers, claude.ai connectors and managed servers
- Transports
- stdio; HTTP (Streamable HTTP, recommended for remote; streamable-http accepted as an alias); SSE (deprecated); WebSocket (ws) in JSON config only
- Remote OAuth
- Yes. Sign in from /mcp or claude mcp login <name>; DCR and CIMD discovered automatically; pre-registered client with --client-id, --client-secret (kept in the macOS keychain or a credentials file) and --callback-port (redirect http://localhost:PORT/callback); oauth.scopes pins scopes; headersHelper for custom auth
- Admin controls
- managed-mcp.json takes exclusive control (an empty map disables MCP); managed settings keys managedMcpServers, allowedMcpServers and deniedMcpServers (match serverUrl, serverCommand or serverName) and allowManagedMcpServersOnly, delivered by server-managed settings, MDM, registry or managed-settings.json
- Docs
- https://code.claude.com/docs/en/mcp
- Source
- https://code.claude.com/docs/en/managed-mcp
From the MCP client config reference, checked Dec 6, 2026. Licence CC BY 4.0.
Claude Code stores local-scope and user-scope servers in ~/.claude.json and project-scope servers in .mcp.json at the project root, per Anthropic’s MCP docs. When one name is defined in several scopes, local beats project and project beats user. Claude Code uses the whole entry from the winning scope and doesn’t merge fields across scopes.
SSE is deprecated, so add remote servers with --transport http. If a server doesn’t support Dynamic Client Registration, pass --client-id, --client-secret and --callback-port, and register http://localhost:PORT/callback as the redirect URI.
Admins get two separate mechanisms, per the managed MCP page. managed-mcp.json takes exclusive control of which servers load. managedMcpServers adds servers alongside each user’s own. Anthropic warns that a serverName allowlist entry is not a security control, so match on serverUrl or serverCommand instead. More in Claude Code MCP config.
Sources
Cite this page
Agents for Devs. "Claude Code MCP config: file location, transports and auth." Published Dec 6, 2026. https://agentsfordevs.com/mcp-clients/claude-code - Page: https://agentsfordevs.com/mcp-clients/claude-code
- Markdown version: https://agentsfordevs.com/mcp-clients/claude-code.md
- Reuse: quote or summarize with a link to this page. Reuse terms