# MCP allowlist for Claude Code, Codex, and Cursor · Oxagen Research

Source: https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor

[Research](https://oxagen.sh/blog) · [Coding agents](https://oxagen.sh/blog/pillars/coding-agents)

# MCP allowlist for Claude Code, Codex, and Cursor

An MCP allowlist for Claude Code, Codex, and Cursor is three files in three formats. All three side by side, and one list of servers and rules behind them.

Oxagen Research · November 30, 2026 · 7 min read

*   [Coding agents](https://oxagen.sh/blog/pillars/coding-agents)
*   [AI agents](https://oxagen.sh/blog/pillars/ai-agents)

The security team sends a short request on Monday: one list of approved Model Context Protocol (MCP) servers for every coding agent in the company. By Wednesday the platform engineer holds three files. Claude Code reads JSON from a system folder. Codex reads TOML from `/etc/codex`. Cursor keeps its list in a team dashboard. None of them reads the others.

An MCP allowlist for Claude Code, Codex, and Cursor is three lists today, one per agent, each with its own syntax and matching rules. Each list decides which servers load for that agent alone. MCP is how an agent calls tools on outside servers such as GitHub, Linear, or your own APIs, and each list matches those servers in its own way.

## How Claude Code restricts MCP servers

Claude Code offers two levels of control.[1](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fn-1) The strict one is `managed-mcp.json`, a file an administrator deploys to `/Library/Application Support/ClaudeCode/` on macOS or `/etc/claude-code/` on Linux. When the file exists, Claude Code loads the servers it lists and a few built-in ones, and `claude mcp add` fails. An empty server map leaves only the built-in ones.

The looser level is an allowlist in managed settings. It matches servers three ways:

```json
{
  "allowManagedMcpServersOnly": true,
  "allowedMcpServers": [
    { "serverUrl": "https://api.githubcopilot.com/*" },
    { "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "."] }
  ],
  "deniedMcpServers": [
    { "serverUrl": "https://*.untrusted.example.com/*" }
  ]
}
```

*   `serverUrl` matches a remote server's URL, with `*` wildcards.
*   `serverCommand` matches a local server's command and arguments exactly, in order.
*   `serverName` matches the label a user typed. Anthropic's docs warn that it "is not a security control," because a user can call any server `github`.

A denylist match always wins. An empty `allowedMcpServers` blocks every server a user adds, and leaving it unset allows every server. Without `allowManagedMcpServersOnly`, a user's own settings can widen the list. The similar `allowManagedPermissionRulesOnly` setting locks permission rules only, and it does not enforce the MCP allowlist. To limit single tools, Claude Code takes permission rules such as `mcp__github__merge_pull_request` in a deny list.[2](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fn-2)

## How Codex restricts MCP servers

Codex keeps its limits in `requirements.toml`, at `/etc/codex/requirements.toml` on macOS and Linux, or in policies an admin sets under Agent security in the ChatGPT admin console.[3](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fn-3) Cloud requirements outrank that file, and a macOS device-management profile outranks both. The MCP section is an approved list:

```toml
[mcp_servers.docs]
identity = { command = "codex-mcp" }

[mcp_servers.remote]
identity = { url = "https://example.com/mcp" }
```

Codex enables a server only when both its name and its identity match an approved entry. Otherwise it turns the server off. An empty `mcp_servers` table turns off every server. A local server matches on `command`, and a remote one on `url`. The plain string form of `command` checks only the command itself, not its arguments, so a structured form matches each argument with `exact`, `prefix`, or `regex` rules.

Tool-level limits live elsewhere. Each server entry in a user's `config.toml` takes `enabled_tools` and `disabled_tools` lists.[4](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fn-4)

## How Cursor restricts MCP servers

Cursor's list lives in the team dashboard, under MCP Configuration, and needs an Enterprise plan.[5](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fn-5) Each entry is a command or a URL, and every entry takes `*` wildcards. "When an allowlist is active, only servers matching an allowlist entry can run." A Tools field on each server limits which of its tools can run. The list has two halves: a Local list for the app and the CLI, and a Cloud list for cloud agents. A group can add its own MCP list, but a group's lists only narrow the team policy for its members.

Two details catch teams out. Adding a server to the list does not install it on anyone's machine. And `~/.cursor/permissions.json` carries an `mcpAllowlist`, but that list names the tools that "can run without approval." Cursor's docs rank the team dashboard list above it.[6](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fn-6)

## MCP server permissions across three coding agents

|  | Claude Code | Codex | Cursor |
| --- | --- | --- | --- |
| Where the list lives | `managed-mcp.json`, or managed settings | `requirements.toml`, or admin console | Team dashboard |
| Remote server match | URL, with wildcards | URL, exact, prefix, or regex | URL, with wildcards |
| Local server match | Exact command and arguments | Command, optionally each argument | Full command string, with wildcards |
| An unlisted server | Blocked when the list is set | Turned off | Blocked when the list is active |
| An empty list | Blocks every server | Turns off every server | Not stated in the docs |
| Single tools | Permission rules per tool | `enabled_tools` in user config | Tools field per server |

Each cell comes from that vendor's own docs. A team that runs all three keeps three lists in three formats, delivered three ways. A server approved in one list stays blocked in the others until someone edits them too.

## What a per-agent allowlist leaves open

An allowlist answers one question: may this server load? Three more questions remain.

The first is which tools a given agent sees. A server with 24 tools shows all 24 to every agent that loads it. Long tool lists can hurt the model's choice. In the RAG-MCP study, a Qwen model picked the right MCP server 13.62 percent of the time when its prompt held every server's description. Given only the best match, it picked right 43.13 percent of the time.[7](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fn-7)

The second is what a call may do. The MCP spec says there "SHOULD always be a human in the loop with the ability to deny tool invocations," and that applications should log tool usage for audit.[8](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fn-8) An allowlist admits a server. It does not hold a merge to `main` for a person.

The third is whether the server itself is sound. The first large study of open-source MCP servers checked 1,899 of them. It found code smells in 66 percent, known bug patterns in 14.4 percent, general vulnerabilities in 7.2 percent, and MCP tool poisoning in 5.5 percent.[9](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fn-9)

What one study found in 1,899 open-source MCP servers

|  | Value |
| --- | --- |
| Code smells | 66% |
| Known bug patterns | 14.4% |
| General vulnerabilities | 7.2% |
| MCP tool poisoning | 5.5% |

Source: Hasan et al. (2025), a scan of 1,899 open-source MCP servers.

Tool poisoning means a server's tool descriptions carry instructions aimed at the model. A server can pass an allowlist and still carry such instructions.

## One MCP server list across agents with Oxagen

Oxagen keeps one list of MCP servers for a workspace, and checks each call to a served tool against rules your team wrote. These controls cover calls routed through Oxagen's MCP endpoint.

Each server is a folder under `tools/servers/<server>/` in the workspace's steering repository, a git repository the workspace owns. A pull request adds or changes a server, and nothing reaches an agent until that pull request merges.[10](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fn-10) Enrollment writes one `oxagen` entry into each agent's own config: `~/.claude.json` for Claude Code, `~/.codex/config.toml` for Codex, `~/.cursor/mcp.json` for Cursor, and Stella's `mcp.toml`. That entry holds no Oxagen key. It reaches Oxagen through the recorder on the machine.[11](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fn-11) Each served tool arrives named `<server>__<tool>`, such as `github__merge_pull_request`.

A toolbelt decides which tools an agent's model sees. Oxagen serves the tools on the agent's toolbelt and hides the rest, and it denies a call to a tool off the belt. A belt for platform work might hold 38 tools from five servers and leave 60 off. One belt can be assigned to agents in Claude Code, Codex, Cursor, and Stella alike. [Tools and skills for each agent](https://oxagen.sh/product/mandates/tools-and-skills) shows how a belt is assigned.

The Platform engineering toolbelt with illustrative data: 38 tools on the belt from GitHub, Linear, Sentry, Datadog, and Terraform Cloud, 60 left off, and the 14 agents it is assigned to across Claude Code, Codex, Cursor, and Stella.

A toolbelt with the tools each server puts on it

Every served call then takes the same path, whichever agent made it.

The path of one served tool call

1.  BeltThe tool is on the agent's toolbelt, so the model was shown it.
2.  Off switchesNo switch on the tool, server, connection, or operator stops it.
3.  RulesThe workspace's policies allow the call, deny it, or hold it for a person.
4.  ApprovalA person approves, and the agent calls the tool again.
5.  CredentialOxagen adds the server's credential, which the agent does not receive.
6.  RecordOxagen records the call, the rule that answered, and the approver.

| Stage | github\_\_merge\_pull\_request after the stage |
| --- | --- |
| Belt | shown |
| Off switches | clear |
| Rules | held |
| Approval | approved |
| Credential | sent |
| Record | recorded |

Each step reads the same toolbelt and rules for Claude Code, Codex, Cursor, and Stella.

## Approval workflow for agent tool calls

The rules are Cedar policies. Cedar answers allow or deny, and in Oxagen a `forbid` rule marked `@decision("require_approval")` holds the call for a person. A rule names served tools by the same `<server>__<tool>` names:

```cedar
@decision("require_approval")
forbid (
  principal,
  action == Action::"github__merge_pull_request",
  resource
)
unless { context.approval.granted };
```

A held call waits for a person, who sees which agent asked, what it wants to do, and the rule that held it. After the approval, Oxagen sends the call when the agent calls the tool again. Auto-approval rules do not cover served tool calls, so a person answers each hold.

A policy page on Guardrails with illustrative data. The Cedar editor holds a rule that makes deploys, merges, and service updates outside the weekday change window wait for two people, with the check passing and one unsaved line.

A Cedar policy that holds production changes for two approvers

The agent's own tools follow the same policies through the recorder's hook, with one difference by agent. Claude Code asks you on your own machine, and Stella asks before the call runs. Codex and Cursor have no prompt the hook can raise, so the hook refuses the call and links to an approval a person answers in Oxagen. The agent then sends the same call again. In observe mode, the hook records what a rule would have decided and lets the call go ahead, so a new rule can run before it blocks anything. [Guardrails](https://oxagen.sh/product/guardrails) lists the policies, auto-approval rules, and off switches in one place.

## Inventory of coding agents and MCP servers

When an agent misbehaves, the first question is what it was carrying. Equipment lists every agent, runtime, MCP server, toolbelt, skill, and steering record in the workspace, newest change first. A server's page lists each tool with what it changes, its risk, and its calls, along with the toolbelts that carry it.

The GitHub MCP server's page with illustrative data: 24 tools and 48,212 calls in 30 days from 61 agents, each tool's side effect, risk, and calls, the server's health, and the six toolbelts that carry its tools.

An MCP server with each tool's risk and calls

Where the vendor lists still matter

The vendor files decide what loads on a machine. A server someone adds straight to their own agent's config skips the toolbelt. On a machine with the hook installed, the recorder's hook still checks each of its calls against the workspace's policies, but the call never reaches Oxagen's credential or its server list. Teams that want one list can pair the two: a vendor allowlist that admits the `oxagen` entry, and toolbelts behind it.

The [Equipment page](https://oxagen.sh/product/equipment) shows the full inventory. For what each agent's calls leave behind once they run, read [Tamper-evident audit logs for AI agents](https://oxagen.sh/blog/tamper-evident-audit-log-for-ai-agents). The broader rollout across three agents is in [Managing Claude Code, Codex, and Cursor in one place](https://oxagen.sh/blog/manage-claude-code-codex-and-cursor-in-one-place).

## References

1.  Anthropic (2026). _Control MCP server access for your organization_. Claude Code documentation. [https://code.claude.com/docs/en/managed-mcp](https://code.claude.com/docs/en/managed-mcp) [↩](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fnref-1)
    
2.  Anthropic (2026). _Configure permissions_. Claude Code documentation. [https://code.claude.com/docs/en/permissions](https://code.claude.com/docs/en/permissions) [↩](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fnref-2)
    
3.  OpenAI (2026). _Managed configuration_. Codex documentation. [https://developers.openai.com/codex/enterprise/managed-configuration](https://developers.openai.com/codex/enterprise/managed-configuration) [↩](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fnref-3)
    
4.  OpenAI (2026). _Configuration reference_. Codex documentation. [https://developers.openai.com/codex/config-reference](https://developers.openai.com/codex/config-reference) [↩](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fnref-4)
    
5.  Cursor (2026). _Model and integration management_. Cursor documentation. [https://cursor.com/docs/enterprise/model-and-integration-management](https://cursor.com/docs/enterprise/model-and-integration-management) [↩](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fnref-5)
    
6.  Cursor (2026). _permissions.json reference_. Cursor documentation. [https://cursor.com/docs/reference/permissions](https://cursor.com/docs/reference/permissions) [↩](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fnref-6)
    
7.  Gan, T., & Sun, Q. (2025). _RAG-MCP: Mitigating Prompt Bloat in LLM Tool Selection via Retrieval-Augmented Generation_. arXiv. [https://arxiv.org/abs/2505.03275](https://arxiv.org/abs/2505.03275) [↩](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fnref-7)
    
8.  Model Context Protocol (2025). _Tools_. MCP specification, version 2025-06-18. [https://modelcontextprotocol.io/specification/2025-06-18/server/tools](https://modelcontextprotocol.io/specification/2025-06-18/server/tools) [↩](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fnref-8)
    
9.  Hasan, M. M., Li, H., Fallahzadeh, E., Rajbahadur, G. K., Adams, B., & Hassan, A. E. (2025). _Model Context Protocol (MCP) at First Glance: Studying the Security and Maintainability of MCP Servers_. arXiv. [https://arxiv.org/abs/2506.13538](https://arxiv.org/abs/2506.13538) [↩](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fnref-9)
    
10.  Oxagen (2026). _External MCP servers_. Oxagen documentation. [https://docs.oxagen.sh/docs/mcp/external-servers](https://docs.oxagen.sh/docs/mcp/external-servers) [↩](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fnref-10)
     
11.  Oxagen (2026). _Connecting to the MCP server: enrolled machines_. Oxagen documentation. [https://docs.oxagen.sh/docs/mcp/connecting](https://docs.oxagen.sh/docs/mcp/connecting) [↩](https://oxagen.sh/blog/mcp-allowlist-for-claude-code-codex-and-cursor#user-content-fnref-11)
