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.
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 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:
{
"allowManagedMcpServersOnly": true,
"allowedMcpServers": [
{ "serverUrl": "https://api.githubcopilot.com/*" },
{ "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "."] }
],
"deniedMcpServers": [
{ "serverUrl": "https://*.untrusted.example.com/*" }
]
}
serverUrlmatches a remote server's URL, with*wildcards.serverCommandmatches a local server's command and arguments exactly, in order.serverNamematches the label a user typed. Anthropic's docs warn that it "is not a security control," because a user can call any servergithub.
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
#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 Cloud requirements outrank that file, and a macOS device-management profile outranks both. The MCP section is an approved list:
[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
#How Cursor restricts MCP servers
Cursor's list lives in the team dashboard, under MCP Configuration, and needs an Enterprise plan.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
#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
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 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
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 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 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 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.
Every served call then takes the same path, whichever agent made it.
The path of one served tool call
- BeltThe tool is on the agent's toolbelt, so the model was shown it.
- Off switchesNo switch on the tool, server, connection, or operator stops it.
- RulesThe workspace's policies allow the call, deny it, or hold it for a person.
- ApprovalA person approves, and the agent calls the tool again.
- CredentialOxagen adds the server's credential, which the agent does not receive.
- 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 |
#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:
@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.
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 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.
The Equipment page shows the full inventory. For what each agent's calls leave behind once they run, read Tamper-evident audit logs for AI agents. The broader rollout across three agents is in Managing Claude Code, Codex, and Cursor in one place.
#References
-
Anthropic (2026). Control MCP server access for your organization. Claude Code documentation. https://code.claude.com/docs/en/managed-mcp ↩
-
Anthropic (2026). Configure permissions. Claude Code documentation. https://code.claude.com/docs/en/permissions ↩
-
OpenAI (2026). Managed configuration. Codex documentation. https://developers.openai.com/codex/enterprise/managed-configuration ↩
-
OpenAI (2026). Configuration reference. Codex documentation. https://developers.openai.com/codex/config-reference ↩
-
Cursor (2026). Model and integration management. Cursor documentation. https://cursor.com/docs/enterprise/model-and-integration-management ↩
-
Cursor (2026). permissions.json reference. Cursor documentation. https://cursor.com/docs/reference/permissions ↩
-
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 ↩
-
Model Context Protocol (2025). Tools. MCP specification, version 2025-06-18. https://modelcontextprotocol.io/specification/2025-06-18/server/tools ↩
-
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 ↩
-
Oxagen (2026). External MCP servers. Oxagen documentation. https://docs.oxagen.sh/docs/mcp/external-servers ↩
-
Oxagen (2026). Connecting to the MCP server: enrolled machines. Oxagen documentation. https://docs.oxagen.sh/docs/mcp/connecting ↩

