MCP
Control which MCP servers Claude Code connects to and which an organization allows. See Connect to external tools with MCP and Managed MCP configuration.
allowAllClaudeAiMcps
Load the claude.ai connectors Claude Code fetches itself alongside a deployed managed-mcp.json. Without this key, managed-mcp.json takes exclusive control of MCP servers and suppresses those connectors.
- Scope:
Managed. Users can't re-enable connectors that exclusive control suppressed. - Type: Boolean
true: Claude Code loads the claude.ai connectors alongside a deployedmanaged-mcp.jsonfalse: a deployedmanaged-mcp.jsontakes exclusive control of MCP servers and suppresses the claude.ai connectors Claude Code fetches itself
- Default:
false, so a deployedmanaged-mcp.jsonsuppresses the claude.ai connectors Claude Code fetches itself
{
"allowAllClaudeAiMcps": true
}allowedMcpServers and deniedMcpServers still apply to the connectors this key loads. Connectors delivered to a cloud session whose host carries a managed-mcp.json, such as a self-hosted runner, stay suppressed. See Allow claude.ai connectors alongside the managed set.
allowedMcpServers
Allowlist the MCP servers people can add. Claude Code blocks any server that doesn't match an entry wherever it's defined, including plugin servers, servers passed with --mcp-config, and servers from claude.ai.
Built-in servers such as Claude in Chrome, the ide server Claude Code connects to in a running VS Code or JetBrains IDE, and servers the CLI itself configures are exempt from the allowlist, and the denylist still applies to them. In-process type: "sdk" servers are exempt from both lists; the app that started the session registers them.
Servers your organization delivers are also exempt from the allowlist, and the denylist still applies to them. The exemption covers every managedMcpServers entry, and any managed-mcp.json entry whose values use no $\{VAR\} expansion. See How a server is evaluated for the full check order. Before v2.1.259, servers from managed-mcp.json had to match too.
- Scope:
Any file. Entries from every file merge into one allowlist unlessallowManagedMcpServersOnlyis set. Deploy it in managed settings to enforce it. - Type: array of objects, each with exactly one key:
serverName, a string limited to letters, numbers, hyphens, and underscores;serverCommand, an array of the command and its arguments matched exactly; orserverUrl, a URL pattern with*wildcards - Default: unset, so every server is allowed; an empty array blocks every server users add
This example allows only the stdio server that the listed npx command starts:
{
"allowedMcpServers": [
{ "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem"] }
]
}A deniedMcpServers entry takes precedence, so a server on both lists is blocked. Once the list contains any serverCommand entry, a stdio server must match a serverCommand entry, and once it contains any serverUrl entry, a remote server must match a serverUrl entry: a serverName match no longer admits that kind of server. See Policy-based control with allowlists and denylists.
allowManagedMcpServersOnly
Make the managed allowlist the only one that applies. Claude Code then reads allowedMcpServers from managed settings alone and ignores allowlists in user, project, and local settings; deniedMcpServers still merges from every settings scope, so users can still block servers for themselves. Administrators set it so a user's own settings can't broaden what the managed allowlist permits.
- Scope:
Managed - Type: Boolean
true: Claude Code readsallowedMcpServersfrom managed settings alone and ignores allowlists in user, project, and local settingsfalse: allowlists from every settings scope merge
- Default:
false, so allowlists from every settings scope merge
This example locks the allowlist to managed settings and allows only the server named github:
{
"allowManagedMcpServersOnly": true,
"allowedMcpServers": [
{ "serverName": "github" }
]
}Users can still add MCP servers of their own; only servers that match the managed allowlist load. See Restrict the allowlist to managed settings only.
deniedMcpServers
Block specific MCP servers. Claude Code refuses to load a matching server wherever it's defined, including plugin servers, servers passed with --mcp-config, servers from managed-mcp.json, servers from managedMcpServers, and the claude.ai connectors it fetches itself. In-process type: "sdk" servers are exempt; the app that started the session registers them.
- Scope:
Any file. Entries from every file merge into one denylist, andallowManagedMcpServersOnlydoesn't change that. Deploy it in managed settings to enforce it. - Type: array of objects, each with exactly one key:
serverName, any non-empty string, so a claude.ai connector's display name such as"claude.ai Slack"works;serverCommand, an array of the command and its arguments matched exactly; orserverUrl, a URL pattern with*wildcards - Default: unset, so no server is blocked; an empty array also blocks nothing
{
"deniedMcpServers": [
{ "serverName": "filesystem" }
]
}The denylist takes precedence over allowedMcpServers, so a server on both lists is blocked. See Policy-based control with allowlists and denylists.
disableClaudeAiConnectors
Turn off the claude.ai MCP connectors Claude Code fetches itself, so it neither fetches nor connects them. A true in any settings file applies: a checked-in project .claude/settings.json can opt a repository out of those connectors, but a project-level false can't override a user- or managed-level true. Requires Claude Code v2.1.182 or later.
- Scope:
Any file - Type: Boolean
true: Claude Code neither fetches nor connects those connectorsfalse: the same as unset; Claude Code fetches your connectors unless another settings file orENABLE_CLAUDEAI_MCP_SERVERSturns them off
- Default:
false, so Claude Code fetches your connectors - Per-session overrides:
ENABLE_CLAUDEAI_MCP_SERVERSset tofalseturns connectors off for one session; whichever of the two turns them off, the other can't turn them back on
{
"disableClaudeAiConnectors": true
}Servers you pass explicitly with --mcp-config are unaffected. To block individual connectors instead of all of them, use deniedMcpServers. See Disable claude.ai connectors. Requires Claude Code v2.1.182 or later.
disabledMcpjsonServers
Reject specific servers defined in a project's .mcp.json file so Claude Code never connects them or asks you to approve them. A rejection in any settings file applies, including a project .claude/settings.json checked into the repository.
- Scope:
Any file - Type: array of strings, the server names as they appear in
.mcp.json - Default: unset
{
"disabledMcpjsonServers": ["filesystem"]
}Claude Code writes this key to .claude/settings.local.json when you reject a server in the approval dialog. claude mcp get <name> shows a rejected server as ✘ Rejected (see disabledMcpjsonServers in settings). Rejection takes precedence over enabledMcpjsonServers and enableAllProjectMcpServers.
enableAllProjectMcpServers
Approve every MCP server defined in project .mcp.json files without a prompt. Claude Code writes this key to .claude/settings.local.json when you choose to approve all servers in the approval dialog.
- Scope:
Any file. In a folder whose trust dialog you haven't accepted, Claude Code honors it from user settings, managed settings, and--settingsand ignores it in the shared project file, both in the session and forclaude mcp listandclaude mcp get; Project server approvals and workspace trust says when an untracked.claude/settings.local.jsoncounts too. - Type: Boolean
true: Claude Code approves every MCP server defined in project.mcp.jsonfiles without a promptfalse: Claude Code asks you to approve each server. In a trusted folder, afalsein a higher-precedence file overrides atruein a lower one; in a folder you haven't trusted, atruein any honored file is enough
- Default: unset, so Claude Code asks you to approve each server
{
"enableAllProjectMcpServers": true
}A disabledMcpjsonServers entry still rejects a server.
enabledMcpjsonServers
Approve specific servers defined in project .mcp.json files so Claude Code connects them without asking. Claude Code writes this key to .claude/settings.local.json when you approve a server in the approval dialog.
- Scope:
Any file. In a folder whose trust dialog you haven't accepted, Claude Code honors it from user settings, managed settings, and--settingsand ignores it in the shared project file, both in the session and forclaude mcp listandclaude mcp get; Project server approvals and workspace trust says when an untracked.claude/settings.local.jsoncounts too. - Type: array of strings, the server names as they appear in
.mcp.json - Default: unset
This example approves the memory and github servers from the project's .mcp.json:
{
"enabledMcpjsonServers": ["memory", "github"]
}A disabledMcpjsonServers entry still rejects a server.
managedMcpServers
Provide remote MCP servers to every user from managed settings. Users keep the servers they add themselves and can't edit or remove the ones you provide. Requires Claude Code v2.1.259 or later.
- Scope:
Managed. Claude Code drops the key with a warning in user, project, and local settings, and doesn't read it in the Claude Desktop app's Code tab on a third-party deployment or in the app's Cowork sessions, where Claude Desktop supplies and locks those sessions' MCP servers itself. - Type: object keyed by server name. Each entry has the
.mcp.jsonshape for anhttporsseserver: a requiredhttps://url, and optionallyheaders,oauth, and the other HTTP and SSE options. Claude Code drops entries that fail validation, and What an entry can contain lists the conditions - Default: unset, so managed settings provide no servers
This example provides one HTTP server named search:
{
"managedMcpServers": {
"search": {
"type": "http",
"url": "https://search.example.com/mcp"
}
}
}For precedence, how provided servers combine with managed-mcp.json and the allow and deny lists, and what users see, see Provide servers through managed settings.