Codex is OpenAI's coding agent, available as a terminal CLI and as IDE extensions. It treats MCP servers as tool sources configured in its own TOML file: a [mcp_servers] block per server, each launching a local stdio command. That makes Codex a good fit for the same local toolbelt other agents use — filesystem access, databases, browsers, documentation search — configured once and available in every session.
Because Codex's documented configuration is stdio-based, this list only includes servers that run as local commands (npx, uvx or docker). The selection bar is the same as every page on this site — 10+ GitHub stars, 100+ monthly downloads, or a verified official tier — ranked by stars, maintenance recency and downloads, with no paid placement.
A data-ranked shortlist of the 12 strongest MCP servers for Codex — every entry links to its full page with copy-paste configs. List compiled 2026-10-28; rankings refresh as the underlying data updates.
How entries are picked: An entry is eligible only if it meets at least one of: 10+ GitHub stars, 100+ monthly npm/PyPI downloads, or a verified official/reference tier on its brand page; entries meeting none of the three are excluded, as are archived repositories. Eligible entries are ranked by a score built from: GitHub stars — multiplied by 10 when the entry has a verified official/reference tier, so official status counts as ten times the community traction rather than a flat bonus; maintenance recency (last push); and npm/PyPI downloads where available. Two tie-break rules keep the list honest: when the same repository is shared by several listings, its star count does not contribute to ranking (the shared figure would otherwise swamp independent projects), and when several implementations share a product name, only the highest-scoring one is listed — the others stay in the directory. Data comes from the public MCP Registry (description, install method), GitHub repository stats and package download counts — no editorial scoring, no paid inclusion, and sponsorship never affects these lists.
Connecting MCP servers to Codex
Codex reads MCP configuration from ~/.codex/config.toml (TOML, not JSON). Per server: [mcp_servers.name] with command = "npx" and args = ["-y", "package-name"] for npm servers, "uvx" for Python ones, "docker" for containers; environment keys go in an env table. The JSON blocks on each entry's full page translate directly — command and args carry over one-to-one, and env keys become the env table. Restart the Codex session after editing so the server is picked up. Remote MCP endpoints: Codex's remote support has been changing release to release, so verify against OpenAI's current documentation rather than relying on a tutorial; everything on this page works regardless because it is all stdio.
Through stdio commands declared in ~/.codex/config.toml under [mcp_servers.<name>]: a command, its args and optional env. Codex launches the process and speaks MCP over standard input/output — the same mechanism Claude Desktop and Cursor use for local servers.
Can Codex connect to remote MCP servers?
Codex's remote-endpoint support has been evolving across releases, so check OpenAI's current documentation for your version before relying on it. This page deliberately lists only stdio servers, which work on any Codex version that supports MCP at all.
Where is Codex's MCP config file?
~/.codex/config.toml in your home directory. It is TOML rather than JSON: each server gets a [mcp_servers.<name>] table with command, args and env. JSON configs from other clients translate field-for-field (command → command, args → args, env → env).
Why won't my mcpServers JSON work in Codex?
Codex does not read JSON config files — it reads TOML. Copy the command and args values out of the JSON block and put them in a [mcp_servers.<name>] table in config.toml. A server that still fails is usually missing an environment variable, which goes in the same table under env.