Omniscio

OmniscioGuidesManaged MCP

Claude Code managed MCP: which servers a machine is allowed to load

By default, anyone running Claude Code can connect any MCP server they choose. This page is for the administrator who has to change that: which servers a fleet loads, which ones a developer may add, and what each restriction looks like from the developer's side.

Two nearest neighbours in this section are not this page. Adding an MCP server is the developer's side: the claude mcp add commands, scopes and removal. Managed settings is the delivery mechanism for every policy key, of which MCP is one. This page is the MCP policy itself, and it assumes you have a way to put a managed settings file on a machine.

Sources read November 23, 2026. By the Omniscio team. Updated .

Pick a control level first

Anthropic describes the available controls as a range rather than one switch, and the choice you make decides which file you deploy. Read down the table until you reach the level your organization needs, then jump to the section that builds it.

PatternWhat it doesConfigure
Disable MCPNo server loads except the few that load under exclusive controlmanaged-mcp.json with an empty server map
Fixed deploymentEvery developer gets the servers you list, and servers they configure do not loadmanaged-mcp.json with the servers you want
Provided serversEvery developer gets the remote servers you list and keeps their ownmanagedMcpServers in managed settings
Approved catalogYou publish a list of approved servers; developers add the ones they want and anything else is blockedallowedMcpServers plus allowManagedMcpServersOnly: true
Plugin servers onlyDevelopers cannot add servers through ~/.claude.json or .mcp.json; servers from plugins still loadstrictPluginOnlyCustomization with mcp in the list
Soft allowlistYou enforce an allowlist that developers can broaden in their own settingsallowedMcpServers without allowManagedMcpServersOnly
Denylist onlyYou block known-bad servers and allow everything elsedeniedMcpServers
No restrictionsDevelopers add anythingDeploy no managed MCP configuration

One consequence of the approved-catalog pattern is worth planning for: Claude Code has no built-in MCP server registry that a developer can browse and install from. Anthropic's advice is to publish the approved list and its claude mcp add commands somewhere developers will find them, such as an internal wiki, or to distribute the servers as plugins through a managed plugin marketplace so they can be installed from /plugin.

The fixed list: managed-mcp.json

Deploy this file and Claude Code loads only a short list of things: the servers the file defines, servers you provide through managedMcpServers, in-process servers that the app starting the session registers (the VS Code extension's own server, for example), the server a plugin creates when it registers tools, and the built-in Claude in Chrome server if you allow it.

Everything else is refused. That includes plugin-provided servers and servers passed with the --mcp-config flag. The file also suppresses the claude.ai connectors Claude Code fetches itself, unless you turn them back on, as the next section describes.

Where the file goes

It is a standalone file at a system path, so it cannot be delivered through server-managed settings. Any process that can write there with administrator privileges can deploy it, which across a fleet is usually device management tooling: Jamf or a configuration profile on macOS, Group Policy or Intune on Windows, or your fleet management of choice on Linux.

PlatformPath
macOS/Library/Application Support/ClaudeCode/managed-mcp.json
Linux and WSL/etc/claude-code/managed-mcp.json
WindowsC:\Program Files\ClaudeCode\managed-mcp.json

The format is a project .mcp.json

The file uses the same format as a project .mcp.json, so an existing project config can be lifted into it almost unchanged:

{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/"
    },
    "company-internal": {
      "type": "stdio",
      "command": "/usr/local/bin/company-mcp-server",
      "args": ["--config", "/etc/company/mcp-config.json"],
      "env": { "COMPANY_API_URL": "https://internal.example.com" }
    }
  }
}

Do not put credentials in it

Any user on the machine can read this file, so an API key in an env block is a key given to everyone. Anthropic names three replacements: ${VAR} expansion so the value comes from each user's environment, OAuth or per-user headers so each person authenticates as themselves, or a headersHelper that generates the credential at connection time.

What happens to --mcp-config

On a workstation, a session that receives servers through --mcp-config while this file is deployed exits at startup with You cannot dynamically configure MCP servers when an enterprise MCP config is present. In a cloud session on a host that has the file, such as a self-hosted runner, the session starts with the managed servers only and skips everything the cloud host passed in. Nothing in the session's own output says which servers were left out; the only account is a warning on stderr naming them, which a self-hosted runner records at the debug log level.

The --strict-mcp-config flag asks to replace the managed set, and a developer who passes it while the file is deployed gets an exit at startup on a workstation and in a cloud session alike.

Confirm the file is in force

Two checks settle it on a managed machine. claude mcp list should show only the servers in the file, plus any provided through managedMcpServers. If a developer's own servers still appear, Claude Code is not reading the file, so check its path and the permissions on its parent directories. If the file's servers do not appear and the MCP config diagnostics section lists errors for the enterprise config, fix those and restart.

Then run claude mcp add --transport http test https://example.com/mcp and expect the enterprise-policy refusal. The URL does not have to be a real server; the policy check rejects the command before anything is contacted.

Turning MCP off entirely

An empty server map is the whole configuration:

{ "mcpServers": {} }

Every server a developer had configured stops loading by their next session. Two things still load if you left them on: servers you provide through managedMcpServers, and the connectors the next section covers, so leave those keys unset if the intent is a complete block.

Letting claude.ai connectors and Chrome survive the file

Two features are suppressed by default when managed-mcp.json is deployed, and both have their own escape hatch. Neither is an MCP allowlist change, so they are easy to miss when a rollout is planned.

The claude.ai connectors Claude Code fetches itself, including ones an administrator configured in the claude.ai admin console, come back with "allowAllClaudeAiMcps": true in a managed settings source. Allowlists and denylists still apply to them, so individual connectors can still be blocked. The setting affects only the connectors Claude Code fetches; plugin-provided servers stay suppressed.

Claude in Chrome is blocked in terminal sessions by default, with no install prompt and no warning in a session that had Chrome turned on by default. A developer who runs claude --chrome exits at startup with an error that names allowClaudeInChromeWithManagedMcp. Setting that to true lets the built-in server run alongside the managed set; it needs Claude Code v2.1.282 or later and is read only from the device's own managed settings, even when server-managed settings deliver the rest of your policy.

There is a plain off switch too. Anthropic's page points at disableClaudeAiConnectors for turning off all the claude.ai connectors Claude Code fetches itself, which is the setting to reach for when the answer is none of them rather than some of them.

Both settings are read from admin-controlled tiers only. allowAllClaudeAiMcps in a user or project settings file has no effect, so a developer cannot re-enable connectors that exclusive control suppressed.

Providing servers without taking control

When you want every developer to have a set of remote servers but you do not want to stop them adding their own, the key is managedMcpServers in a managed settings source: server-managed settings, a Claude apps gateway policy, an MDM profile or registry policy, or managed-settings.json. It needs Claude Code v2.1.259 or later, and earlier clients ignore the key.

{
  "managedMcpServers": {
    "search": { "type": "http", "url": "https://search.example.com/mcp" },
    "records": {
      "type": "http",
      "url": "https://records.example.com/mcp",
      "headers": { "X-Records-Key": "key-issued-for-all-claude-code-users" }
    }
  }
}

Anyone who can read the managed settings on a machine, the developer included, can read a header value set here. Use a credential issued for that whole audience, or leave headers out and let each person sign in with OAuth.

What an entry is allowed to contain

Claude Code loads an entry only when it passes every check below. One that fails is dropped, a notice is recorded for /status, and the other entries still load.

  • type is http or sse. As in .mcp.json, streamable-http is accepted as an alias for http.
  • url is an https:// URL. A plain http:// URL is refused, including one pointing at localhost.
  • There is no command, args, env or headersHelper member.
  • No value contains a ${VAR} reference, because these entries are not expanded. Write literal values.
  • The server name uses only letters, numbers, hyphens and underscores, and nothing contains control or invisible formatting characters.

Claude Desktop has a managed setting of the same name whose value is an array of a different entry shape. Do not copy one into the other: Claude Code refuses the array form and records a notice instead of loading it.

Who wins when names collide

A provided server beats a server of the same name in local, project or user scope, and beats a plugin server or claude.ai connector pointing at the same URL. If you also deploy managed-mcp.json, the file's entry wins over the provided one for the same name. Provided servers keep loading even when strictPluginOnlyCustomization locks the mcp surface.

What a developer can still do

They cannot edit or remove a provided server: claude mcp remove reports that it is provided by the organization, and an entry they add under the same name is saved but not used. They can turn one off for themselves in /mcp, where provided servers are listed under Managed MCPs. claude mcp get and /mcp show a provided server's URL as its host only, and claude mcp get alone shows its header names without their values.

When they connect

Through server-managed settings, a machine with cached settings withholds the cached copy of this key until the server confirms the session's settings, and waits for that confirmation before loading MCP servers. If the confirmation fails, the session continues without the provided servers and /status says they are withheld. On a machine's first launch an interactive session connects them as soon as the settings arrive, and an already-started claude -p run can finish without them.

Interactive sessions that are already running apply your edits without a restart: an added server connects when the settings arrive, a changed entry reconnects with the new definition, and a removed server disconnects once the session reads the change. A non-interactive -p run keeps it until it ends.

Allowlists and denylists

These two lists filter which configured servers may load. They are not a registry: a server still has to be added by a developer, a plugin or your organization before either list applies to it. Both also filter servers passed with --mcp-config, and --strict-mcp-config does not bypass them.

Making the allowlist authoritative

Without allowManagedMcpServersOnly, allowlists from every settings scope merge, including a developer's own ~/.claude/settings.json, so anyone can broaden what your list permits. Set allowedMcpServers and allowManagedMcpServersOnly: true together in a managed settings source and only the managed allowlist applies. Denylists merge from every scope either way, so a developer can always block a server for themselves.

Two similarly named flags do different jobs. allowManagedPermissionRulesOnly locks permission rules and does not enforce the MCP allowlist; the MCP lock needs Claude Code v2.1.273 or later when the lock and the list come from different managed sources.

Matching a server by URL, command or name

Each list entry is an object with a single key. serverUrl matches a remote server URL exactly or with * wildcards. serverCommand holds a stdio server's command and arguments as one array. serverName matches the developer's label, exactly, with no wildcards.

Unset is not the same as empty. Leaving allowedMcpServers out allows every server; setting it to [] allows none. Leaving deniedMcpServers out blocks nothing, and an empty deniedMcpServers blocks nothing either.

A serverName entry is not a security control, and Anthropic's own warning is blunt about it: the name is the label a user assigns, not the underlying server, so a user can call any server github. Use serverCommand or serverUrl entries for anything you intend to enforce.

Two rules that decide most surprises

A serverCommand entry matches the command and every argument, in order. ["npx","-y","server"] does not match ["npx","server"] or ["npx","-y","server","--flag"]. The env block is not compared at all, so ["node","server.js"] matches that command with any environment. If you need the environment fixed, define the server in managed-mcp.json instead.

A serverUrl entry whose hostname is spelled out in full matches the scheme's default port only, 443 for https. A wildcard in the hostname, or one in the port position, matches every port. So https://staging.example.com/* does not block a server at https://staging.example.com:8443/api, while https://*.example.com/* and https://staging.example.com:*/* both do. Hostname matching ignores case and a trailing dot; paths stay case-sensitive.

The order of the checks

Claude Code runs three checks before loading any server, including one from managed-mcp.json, and runs them again when a developer reconnects a server or turns a disabled one back on. First the lists merge across scopes. Then the denylist is checked, and nothing overrides a denylist match. Then the allowlist is checked, and what a server must match depends on its type: a remote server needs a serverUrl entry and a stdio server needs a serverCommand entry, with a serverName match counting only when the list holds no entries of the stricter kind for that transport.

Three groups skip the allowlist check: your own servers (every managedMcpServers entry, and a managed-mcp.json entry that uses no ${VAR} expansion outside env), built-in servers such as Claude in Chrome and the IDE server, and a Claude Tag session's Slack tools. In-process type: "sdk" servers skip all three checks.

One version gap is worth knowing before you upgrade, because what the allowlist covers depends on the client you run: v2.1.305 and later checks a managed server only when it uses ${VAR} outside env; v2.1.259 to v2.1.304 also checks one that uses ${VAR} in env alone; before v2.1.259 it checked every managed server whenever an allowlist was set. If you relied on an allowlist to keep some of your managed-mcp.json servers from loading, add their deniedMcpServers entries or deploy a separate file per group before the upgrade, because those servers otherwise start loading on each developer's first launch of the newer version with no prompt or notice.

What developers see when a restriction fires

Hand this table to the people who will hit it, or write it into the announcement. The most common support question in a managed rollout is not a failure; it is a server that quietly stops appearing.

SituationWhat the developer sees
managed-mcp.json is present and they run claude mcp addCannot add MCP server: enterprise MCP configuration is active and has exclusive control over MCP servers
The file is present and they run claude --chromeAn exit at startup naming allowClaudeInChromeWithManagedMcp
The server is deniedCannot add MCP server "<name>": server is explicitly blocked by enterprise policy
The server is not on the allowlistCannot add MCP server "<name>": not allowed by enterprise policy
They remove a provided serverMCP server "<name>" is provided by your organization (managed settings) and cannot be removed locally.
The file takes effect during an open sessionA notice beginning Your organization now manages MCP servers on this computer
A server they configured is now blockedIt disappears from /mcp and claude mcp list, with no other signal

That last row is the one to plan for. When a server silently disappears, the developer gets no signal that policy is the reason, so name the servers you are blocking when you roll out a new restriction.

Finding out which servers are actually used

With OpenTelemetry export configured, Claude Code can record which MCP servers and tools developers invoke. OTEL_LOG_TOOL_DETAILS=1 adds MCP server and tool names to tool events and to the cost and token counters, and you aggregate them in your collector. That is how you find out whether anyone uses the servers you spent a quarter approving.

OpenTelemetry is its own configuration and its own guide in this section: Claude Code OpenTelemetry covers the exporter and the event schema.

Common questions

Can an administrator stop Claude Code from loading MCP servers?

Yes, with a managed-mcp.json holding an empty server map. Claude Code then loads no MCP server except the ones that load under exclusive control.

Where does managed-mcp.json go?

macOS reads /Library/Application Support/ClaudeCode/managed-mcp.json, Linux and WSL read /etc/claude-code/managed-mcp.json, and Windows reads C:\Program Files\ClaudeCode\managed-mcp.json.

managed-mcp.json or managedMcpServers?

The file takes exclusive control and stops developers adding anything else. The settings key provides remote servers while they keep their own. The file is a separate system-path file and cannot be delivered through server-managed settings; the key is a settings value.

Is a serverName entry in an allowlist a security control?

No. The name is a label the developer assigns, so anyone can call any server github. Enforce with serverUrl or serverCommand entries.

Why does a server in my allowlist still not load?

Check the denylist first, since nothing overrides it. Then check that a remote server has a serverUrl entry and a stdio server has a serverCommand entry matching its command and every argument in order.

How do I confirm the policy is in force?

claude mcp list should show only the managed servers, and claude mcp add should fail with the enterprise-policy message.

Every session, one window

Omniscio runs several agent sessions side by side in one window, each with its own context and its own diff view. Any model, any harness — Claude Code, Codex, OpenCode, Devin, Pi, and Hermes all supported.