Skip to main content

MCP Settings and Policy

These settings decide which MCP servers may run and which ones a project may use. Administrators use them for allow lists and deny lists. For example, { "enableAllProjectMcpServers": true } approves every server in a project .mcp.json file.

Most keys also work in your own settings. They live in settings files, ~/.claude.json, .mcp.json, and managed-mcp.json. The switches are disabledMcpjsonServers, enableAllProjectMcpServers, deniedMcpServers, --strict-mcp-config, and disableClaudeAiConnectors.

Settings Keys​

Source: Connect Claude Code to Tools via MCP, Control MCP Server Access for Your Organization, Settings Reference, and Channels Reference.

These keys sit in the settings files. Each key has one row, with its type, what it does, and where to set it, on MCP and Channels Settings.

State Keys in ~/.claude.json​

These keys sit under projects["<path>"].

KeyStatusWhat It DoesHow It Works
disabledMcpServers
Documented: An official docs page names this item.
A per-project opt-out list.Covers user, plugin, managed, connector, and default-on built-in servers. A connector uses its display name, such as claude.ai Slack.
enabledMcpServers
Documented: An official docs page names this item.
A per-project opt-in list.Only for built-in servers that default to off, such as computer-use. Claude Code ignores other entries.
hasTrustDialogAccepted
Documented: An official docs page names this item.
The workspace trust flag.true lets a headersHelper of a project or local server run without the dialog.

Files and Flags​

ItemStatusWhat It DoesHow It Works
.mcp.json
Documented: An official docs page names this item.
Holds project servers.At the project root. Interactive sessions ask for approval. claude -p, the SDK, and cloud sessions load it without a prompt.
~/.claude.json
Documented: An official docs page names this item.
Holds local and user servers.claude mcp add writes it.
managed-mcp.json
Documented: An official docs page names this item.
A fixed server set from the organization.Gives the organization exclusive control. Claude Code ignores other sources. In the probe, Claude Code dropped user and project servers with no warning, which matches the official page (see Managed Folder Probe). Claude in Chrome and connectors stay blocked unless you set the two allow keys above.
--mcp-config <configs...>
Documented: An official docs page names this item.
Loads servers from files or strings.Space-separated. Scope dynamic. headersHelper runs in the primary working folder.
--strict-mcp-config
Documented: An official docs page names this item.
Uses only the --mcp-config servers.Skips the approval prompt for project servers it does not load (2.1.246 and later).
--plugin-dir-no-mcp <path>
Undocumented: Only the program shows this item. It can change without notice.
Loads an inline plugin without its MCP servers.Hidden flag. The SDK form is skipMcpDiscovery.
--channels <servers...>
Documented: An official docs page names this item.
Registers channel notifications of the listed servers.Hidden flag. Space-separated names. See MCP Runtime.
--dangerously-load-development-channels <servers...>
Documented: An official docs page names this item.
Caution: It deletes data, skips a safety check, or sends data off your machine.
Loads channel servers that are not on the allowlist.Hidden flag for local channel development. Shows a confirmation dialog.
--setting-sources
Documented: An official docs page names this item.
Excludes project settings.Keeps a project .mcp.json out.

Approval Rules​

  • claude mcp list and claude mcp get read approvals only from files outside the repository until you trust the folder.
  • In an untrusted folder, these sources apply: ~/.claude/settings.json, managed settings, and --settings.
  • An untracked .claude/settings.local.json applies only in a trusted folder. Before 2.1.207 it always applied.
  • In bypassPermissions mode, Claude Code skips the project prompt when you set skipDangerousModePermissionPrompt in user or managed settings.

Example​

Managed settings: lock down MCP
{
"allowManagedMcpServersOnly": true,
"allowedMcpServers": [
{ "serverName": "github" },
{ "serverUrl": "https://*.example.com/*" }
],
"deniedMcpServers": [{ "serverCommand": ["bunx", "untrusted-server"] }],
"disableClaudeAiConnectors": true
}

How It Works​