Menu

AI

Claude Code vs Codex for MCP: Config, Controls and Pricing (2026)

Claude Code vs OpenAI Codex for MCP: how each configures servers, approves tool calls, lets admins restrict servers, and what the plans cost, from official docs.

By: Irina ShvayaOctober 28, 2026

Claude Code vs Codex for MCP: Config, Controls and Pricing (2026)

This comparison is part of our MCP comparisons, within The MCP Guide. Facts are checked against each vendor's own documentation and pricing pages on the date shown.

Both Claude Code and OpenAI's Codex are strong MCP clients for developers, and both support local and remote servers with OAuth. Pick Claude Code if you want team-shared server files, a choice of admin patterns and the option to run the agent itself as an MCP server. Pick Codex if you want per-server approval modes and tool allowlists in one TOML file shared with the ChatGPT desktop app. Most teams should pick the agent they already prefer for coding and treat MCP as a tie.

MCP (Model Context Protocol) is the open standard that lets an AI agent call outside tools and data through "servers." Claude Code is Anthropic's agentic coding tool. Codex is OpenAI's, available as a CLI, IDE extension, web app and inside the ChatGPT desktop app.

Checked against: Claude Code's MCP docs and OpenAI's ChatGPT and Codex MCP docs on 28 October 2026. eSEOspace did not test either product.

Key Takeaways

  • Claude Code stores servers at local, user or project scope; project scope is a .mcp.json file that a team commits to version control.
  • Codex stores servers in ~/.codex/config.toml or a project .codex/config.toml (trusted projects only), shared by the CLI, IDE extension and ChatGPT desktop app.
  • Codex lets you set an approval mode per server or per tool, including a writes mode that prompts only for tools not marked read-only.
  • Both let admins restrict servers: Claude Code with managed-mcp.json and allowlists or denylists, Codex with an approved mcp_servers list in requirements.toml.
  • Claude Code can run as an MCP server with claude mcp serve; OpenAI has removed the codex mcp-server command.

At a glance

ItemClaude CodeCodex
Config file.mcp.json (project), ~/.claude.json (local, user)~/.codex/config.toml, .codex/config.toml (project)
Add a serverclaude mcp addcodex mcp add, or Settings > MCP servers in the desktop app
Local serversstdiostdio
Remote serversHTTP (recommended), SSE (deprecated), WebSocketStreamable HTTP
Remote authOAuth, headers, dynamic header helperBearer token, OAuth (CIMD and DCR), headers, header helper
Tool filteringAdmin allowlists and denylists by serverenabled_tools and disabled_tools per server
Approval per toolPermission prompts; project servers need approvalauto, prompt, writes or approve, per server or tool
Many toolsTool search defers definitionsPer-tool output token limits
Acts as an MCP serverYes, claude mcp serveNo, removed
Admin restrictionmanaged-mcp.json, allowedMcpServers, deniedMcpServersmcp_servers approved list in requirements.toml

Where Claude Code is stronger

Team sharing through the repository

Claude Code's project scope puts servers in .mcp.json at the repository root, "shared with team" through version control. Codex also reads a project .codex/config.toml, for trusted projects only, but its MCP page does not describe sharing servers through version control. Claude Code also blocks a cloned repo from approving its own servers; approvals must come from user or managed settings.

More admin patterns

Anthropic's managed MCP docs list ready-made patterns: "Disable MCP," "Fixed deployment," "Provided servers," "Approved catalog," "Soft allowlist" and "Denylist only." Admins can push remote servers to everyone with managedMcpServers while users keep their own. Codex offers one approved list plus the option to disable all servers.

More transports and newer protocol features

Claude Code accepts HTTP, SSE and WebSocket for remote servers. It also supports the MCP Tasks extension for long-running server jobs, in public beta in the CLI. Tool search loads only tool names at the start, and the docs say there is no fixed per-server tool cap.

Connectors and a server mode

If you sign in with a claude.ai account, connectors your organization adds in claude.ai appear in Claude Code automatically. Claude Code can also act as a server: claude mcp serve exposes it over stdio to another MCP client. OpenAI's removal notice says "the codex mcp-server command and the standalone codex-mcp-server binary have been removed," pointing integrators to an experimental app server that "isn't an MCP server."

Where Codex is stronger

Approval rules per server and per tool

Codex has default_tools_approval_mode with four values: auto, prompt, writes and approve. OpenAI says "the writes mode prompts for tools that aren't marked read-only." You can override it per tool with tools.<tool>.approval_mode. This lets you auto-approve safe reads and still confirm every write. Our tool annotations explainer covers the read-only hint it relies on.

Tool allowlists in config

Each Codex server can take enabled_tools (an allow list) and disabled_tools (a deny list applied after it). Trimming a busy server to the five tools you need keeps the agent focused and reduces risk.

Explicit timeouts and output budgets

Codex documents defaults: startup_timeout_sec of 10 seconds and tool_timeout_sec of 60 seconds. You can mark a server required so startup fails if it cannot connect, and set an output_token_limit per tool.

Modern OAuth client registration

Codex supports OAuth Client ID Metadata Documents (CIMD) and Dynamic Client Registration (DCR), choosing CIMD when the server advertises it. You can set OAuth scopes per server. Our explainer on client ID metadata documents covers how CIMD works.

One config across OpenAI's local clients

OpenAI says the ChatGPT desktop app, Codex CLI and IDE extension "share MCP configuration," so you configure a server once and switch clients.

Pricing

Neither vendor charges extra for MCP. You pay for the plan that includes the agent.

TierClaude Code (claude.com/pricing)Codex (chatgpt.com/pricing)
FreeNot included$0, "Limited Codex access"
Low tierNoneGo $8/month, limited Codex
Individual paidPro $17/month annual, $20 monthlyPlus $20/month
Heavy useMax from $100/monthPro from $100/month, "Longer Codex and ChatGPT Work sessions"
TeamsTeam $20/seat/month annual ($25 monthly); Premium $100 ($125 monthly)Business: price not shown on pages we opened
Enterprise$20/seat/month annual, 20-seat minimum, plus API-rate usageContact sales
API keyNot covered on the pages we checkedCodex CLI, SDK or IDE at API prices, no cloud features, per Codex pricing

Usage limits apply on both. OpenAI publishes estimated messages per five-hour window by model; Anthropic describes Max as 5x or 20x Pro usage.

Security and admin controls

ControlClaude CodeCodex
Default"Anyone running Claude Code can connect any MCP server they choose"Users configure servers unless an admin requirement applies
Block everythingmanaged-mcp.json with an empty server mapEmpty mcp_servers list in requirements.toml
Approved listallowedMcpServers + allowManagedMcpServersOnlymcp_servers identities matched on command or URL
Shared project configRepo can't self-approve serversProject config for trusted projects only
SecretsEnv var expansion in .mcp.json; OAuth tokensbearer_token_env_var, env_http_headers; secrets in config.toml must stay private

OpenAI's managed configuration docs say Codex rules match stdio servers on command and HTTP servers on url, with exact, prefix or regex matching. Anthropic's managed docs add that Claude Code "doesn't have a built-in MCP server registry," so publish your approved list where developers will find it. For the threats these controls address, see our MCP security risks guide.

Which to choose

  • Pick Claude Code if you want approved servers committed to each repository and reviewed like code.
  • Pick Claude Code if your admins want a menu of policies, from denylist only to a fixed deployment.
  • Pick Claude Code if another tool needs to call your coding agent over MCP.
  • Pick Codex if you want reads to run freely and writes to need approval, set per server or per tool.
  • Pick Codex if your team already uses ChatGPT and wants one MCP config across the desktop app, CLI and IDE.
  • Use either if your main need is GitHub, Sentry or a database server. Both support the same remote and local servers.

More developer matchups are in our MCP comparisons, and our best MCP servers for developers list covers what to connect first.

Next step

Choose three servers your developers need, connect them read-only in your preferred agent, and write down the approval rules you want. If you want help rolling out Claude Code with managed MCP settings, see our Claude Code consulting service.

Frequently asked questions

Can Claude Code and Codex use the same MCP servers?

Yes, in most cases. Both connect to local stdio servers and remote HTTP servers with OAuth. The config formats differ: JSON in .mcp.json for Claude Code, TOML in config.toml for Codex.

Can Codex run as an MCP server?

Not anymore. OpenAI says the codex mcp-server command was removed. Codex still connects to external MCP servers through codex mcp.

Is Codex free?

OpenAI's pricing page lists "Limited Codex access" on the Free plan and limited Codex on Go at $8 per month. Plus at $20 per month includes Codex in the CLI, IDE extension and web.

How do admins stop developers adding unapproved MCP servers?

In Claude Code, deploy managed-mcp.json or set allowedMcpServers with allowManagedMcpServersOnly: true. In Codex, add an approved mcp_servers list to requirements.toml; an empty list disables all MCP servers.

You Might Also like to Read

Get a FREE Website Audit

Enter your website and get a 20–30 page SEO, GEO, AEO & CRO audit within 24 hours. Completely free.

Don't have a site yet? Get in touch →

Ready to speak with a marketing expert?
Give us a call! (916) 866-7893

Websites Launched
1407
Websites Launched
Marketing Experts
29
Marketing Experts
Hours of Dedicated Work
204533
Hours of Dedicated Work
Irina S.Benjamin G.Jeanette M.David G.