---
title: "Claude Code MCP config: file location, transports and auth"
type: dataset-entry
url: https://agentsfordevs.com/mcp-clients/claude-code
markdown: https://agentsfordevs.com/mcp-clients/claude-code.md
publisher: Agents for Devs
author: Agents for Devs desk
published: 2026-12-06
updated: 2026-12-06
license: https://agentsfordevs.com/reuse
citation: 'Agents for Devs. "Claude Code MCP config: file location, transports and auth." Published Dec 6, 2026. https://agentsfordevs.com/mcp-clients/claude-code'
attribution: Credit Agents for Devs and link to https://agentsfordevs.com/mcp-clients/claude-code
---

# Claude Code MCP config: file location, transports and auth

One row of the MCP client config reference, checked 2026-12-06.

| Field | Value |
|---|---|
| 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 (/mcp-clients), checked 2026-12-06. 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](https://code.claude.com/docs/en/mcp). 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](https://code.claude.com/docs/en/managed-mcp). `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](/guides/claude-code-mcp).

## Sources

1. [Connect Claude Code to tools via MCP, Anthropic](https://code.claude.com/docs/en/mcp)
2. [Control MCP server access for your organization, Anthropic](https://code.claude.com/docs/en/managed-mcp)

## 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: https://agentsfordevs.com/mcp-clients/claude-code.md
- Reuse: quote or summarize with a link to the page. Terms: https://agentsfordevs.com/reuse
