Best MCP Servers for Codex (2026): Ranked
The best MCP servers for Codex turn OpenAI's coding agent into one wired directly into your repos, your database, your browser, and your component library. The strongest picks in 2026 are GitHub, Context7, Playwright, Supabase, and Filesystem — plus DesignRevision MCP for installing real shadcn/ui components. This guide ranks the best MCP servers for Codex, and unlike every other list, it gives you the exact config.toml block for each one — remote or local, auth and all — in the TOML format Codex actually expects, so you can copy, paste, and go.
Last updated: July 2026. MCP servers move fast — remote endpoints, package names, and auth flows change; every config here was verified in July 2026, but confirm each against its source before adding.
New to MCP in Codex? Start with our guide on how to add an MCP server to Codex for both setup methods and the TOML gotchas. Otherwise, straight to the rankings.
The Best MCP Servers for Codex at a Glance
| # | Server | Category | Transport | Best for |
|---|---|---|---|---|
| 1 | GitHub | Integration | Remote | Repos, issues, and PRs in the agent |
| 2 | Context7 | Documentation | Remote | Up-to-date, version-specific library docs |
| 3 | Playwright | Browser & testing | Local | Driving a real browser for E2E tests |
| 4 | Supabase | Database | Remote | Querying and managing a Postgres backend |
| 5 | Filesystem | Files | Local | Sandboxed access outside the project |
| 6 | DesignRevision MCP | UI components | Remote | Installing real shadcn/ui components |
| 7 | Figma | Design | Local | Turning selected frames into code |
| 8 | Sentry | Monitoring | Remote | Pulling real errors and traces into context |
| 9 | Linear | Project management | Remote | Turning a task into a real ticket |
| 10 | Sequential Thinking | Reasoning | Local | Structured, step-by-step planning |
How We Picked
This is an opinionated, hands-on ranking rather than a benchmark. We weighed four Codex-specific signals: real utility in Codex's agent (a server the agent never calls is clutter), provenance (official vendor servers over anonymous forks), setup friction in config.toml (a clean remote url beats a fragile local toolchain), and breadth (integration, docs, browser, data, design, and UI — not ten variations on one job). Every config was verified against its source in July 2026, and each entry carries a plain verdict plus who should skip it.
A quick note on Codex's config. Unlike Cursor and Claude Code, Codex uses TOML, not JSON — pasting a JSON mcpServers block will silently fail. Each server is its own [mcp_servers.<name>] table in ~/.codex/config.toml (note the underscore — it's mcp_servers, not mcp.servers). A url key means a remote server; a command key means a local one. Every entry below is ready to drop into that file.
The Best MCP Servers for Codex
1. GitHub
Category: Integration · Transport: Remote (HTTP) · Best for: repos, issues, and PRs without leaving the agent · Docs: github/github-mcp-server
[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp/"
bearer_token_env_var = "GITHUB_MCP_PAT"
Verdict: Install. The single most useful server for Codex — it gives the agent first-class access to repositories, issues, pull requests, and code search, so it acts where your work already lives. Codex reads the token from the env var you name in bearer_token_env_var (export GITHUB_MCP_PAT="ghp_…") and sends it as an Authorization: Bearer header for you — no token in the file. If you searched for the codex github mcp setup, the hosted remote endpoint above — not a local Docker image — is the one you want. Skip if your team is on GitLab or Bitbucket — add their server instead.
2. Context7
Category: Documentation · Transport: Remote (HTTP) · Best for: stopping Codex from calling old library APIs · Docs: upstash/context7
[mcp_servers.context7]
url = "https://mcp.context7.com/mcp"
http_headers = { CONTEXT7_API_KEY = "YOUR_API_KEY" }
Verdict: Install. "The model used a deprecated API" is a daily pain point, and Context7 fixes it by pulling version-specific, up-to-date documentation for thousands of packages into context on demand. Note the Codex detail — the reason context7 mcp codex trips people up: Context7 uses a custom header, not a bearer token, so it goes in http_headers (or env_http_headers to read from the environment) rather than bearer_token_env_var. It works without a key; a key raises your rate limits. Skip if you work almost entirely in a frozen internal stack.
3. Playwright
Category: Browser & testing · Transport: Local (stdio) · Best for: letting the agent drive a real browser · Docs: microsoft/playwright-mcp
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]
Verdict: Install. Microsoft's official Playwright server lets Codex navigate, click, fill forms, and assert against a real browser using the accessibility tree — ideal for end-to-end tests and verifying a UI it just built. The codex playwright mcp setup is entirely local: it runs as a stdio subprocess over npx, no account needed. If a cold npx install is slow to boot, raise startup_timeout_sec in the table so Codex doesn't drop it. Skip if you never touch web interfaces.
4. Supabase
Category: Database · Transport: Remote (HTTP) · Best for: querying and managing a Postgres backend · Docs: Supabase MCP
[mcp_servers.supabase]
url = "https://mcp.supabase.com/mcp?project_ref=YOUR_PROJECT_REF&read_only=true"
Verdict: Install (if you use Supabase). The official Supabase server lets Codex inspect your schema, run SQL, and read config — turning "what's in the users table?" into a real query. The supabase mcp codex setup is browser OAuth (no token to paste), and adding ?read_only=true and ?project_ref=… scopes what the agent can touch. Skip if you're not on Supabase — reach for the Postgres server instead.
5. Filesystem
Category: Files · Transport: Local (stdio) · Best for: sandboxed access to folders outside the project · Docs: modelcontextprotocol/servers
[mcp_servers.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "~/code"]
Verdict: Install. The reference filesystem server gives the agent sandboxed read, write, and search across directories you explicitly allow on the command line — useful for a shared assets folder or a sibling project Codex's workspace doesn't reach. Skip if everything you need is already inside the current project directory. Add secrets, if any, via an env table on the same server.
6. DesignRevision MCP
Category: UI components · Transport: Remote (HTTP) · Best for: installing real shadcn/ui components · Docs: DesignRevision MCP
[mcp_servers.design-revision]
url = "https://mcp.designrevision.com/mcp"
bearer_token_env_var = "DESIGNREVISION_API_KEY"
Verdict: Install (for frontend work). The category every other Codex list misses: a server for building UI. DesignRevision MCP lets Codex discover, inspect, and install real, production-grade shadcn/ui components straight from the registry — with the install command and dependencies already resolved — instead of hand-writing markup from memory. Set the token with export DESIGNREVISION_API_KEY="…" and Codex sends it as a bearer header. It's freemium, so you can wire it up and pull components on the free plan. Skip if you never build frontends.
7. Figma
Category: Design · Transport: Local (desktop) · Best for: turning selected frames into code · Docs: Figma Dev Mode MCP
[mcp_servers.figma]
url = "http://127.0.0.1:3845/mcp"
Verdict: Situational. Figma's Dev Mode server — the figma mcp codex setup people ask about most for design-to-code — exposes selected frames as structured design context, so Codex can translate a specific component into code that respects real spacing and tokens. It runs inside the Figma desktop app on a local port — you must enable Dev Mode + the MCP server there first, and it needs a paid Dev/Full seat. (It's a url, but a local one — no auth, since it's your own machine.) Skip if your team doesn't design in Figma or you're implementing from an existing component library.
8. Sentry
Category: Monitoring · Transport: Remote (HTTP) · Best for: debugging from real production errors · Docs: Sentry MCP
[mcp_servers.sentry]
url = "https://mcp.sentry.dev/mcp"
Verdict: Situational. Sentry's official server pulls real issues, stack traces, and performance data into Codex, so the agent debugs from what actually broke in production rather than a pasted snippet. Auth is OAuth in the browser on first connect. High value if you already run Sentry, dead weight if you don't. Skip if you have no Sentry project.
9. Linear
Category: Project management · Transport: Remote (HTTP) · Best for: turning a coding task into a real ticket · Docs: Linear MCP
[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"
Verdict: Situational. The linear mcp codex pairing lets Codex read and create issues through Linear's official remote server, so "file a bug for this" becomes a real ticket with the context attached — handy when Codex is running a long autonomous task and you want a paper trail. OAuth on first use. Skip if your team doesn't track work in Linear (Atlassian and other trackers have their own servers).
10. Sequential Thinking
Category: Reasoning · Transport: Local (stdio) · Best for: forcing structured planning on hard tasks · Docs: modelcontextprotocol/servers
[mcp_servers.sequential-thinking]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-sequential-thinking"]
Verdict: Situational. This reference server gives the agent a "think step by step" tool to break a gnarly problem into ordered, revisable steps before acting. On big multi-stage tasks it improves planning discipline; on everyday work it mostly adds ceremony. Free and local. Skip if your tasks are routine.
Also worth adding — comms & trackers. Codex users increasingly wire in Slack (post updates and read threads), Atlassian (Jira/Confluence), and a Chrome DevTools server (inspect a live page) — each has an official or well-maintained MCP server and its own "for Codex" following. Add them as url entries with OAuth where needed, but only when you'll actually use them.
Codex config.toml: The Full Picture
Every one of these Codex MCP servers lives in the same file — ~/.codex/config.toml. Because it's TOML, each server is its own table, and you stack as many as you like:
[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp/"
bearer_token_env_var = "GITHUB_MCP_PAT"
[mcp_servers.design-revision]
url = "https://mcp.designrevision.com/mcp"
bearer_token_env_var = "DESIGNREVISION_API_KEY"
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]
After editing, confirm Codex picked them up with codex mcp list, or use the /mcp slash command inside the TUI to see connected servers and the exact tools each exposes. Three TOML rules keep you out of trouble: it's mcp_servers with an underscore, remote auth goes through bearer_token_env_var (never a hard-coded token), and you do not need the old mcp-remote bridge — native HTTP is built in. For the full walkthrough — the codex mcp add command, env blocks, and fixing a server that won't load — see how to add an MCP server to Codex.
Best Free MCP Servers for Codex
Not every one of these Codex MCP servers is free, but most are. GitHub (free with any account), Playwright, Filesystem, Context7, and Sequential Thinking are all free and open source. Supabase, Sentry, and Linear are free with an account. DesignRevision MCP is freemium — the free plan covers browsing and installing components. Only Figma needs a paid seat. You can build a strong Codex setup — integration, docs, browser, files, and UI — without spending anything.
Conclusion
The best MCP servers for Codex in 2026 are the ones that close a real gap in the agent's reach: GitHub for integration, Context7 and Playwright for accuracy and testing, Supabase and Filesystem for data, and DesignRevision MCP for real shadcn/ui components. Drop the two or three that match your biggest pain point into ~/.codex/config.toml as [mcp_servers.<name>] tables, run codex mcp list to confirm, and remember it's TOML, not JSON — a focused set the agent actually uses beats a crowded one it doesn't.
Related Resources
Frequently Asked Questions
-
The most useful MCP servers for the OpenAI Codex CLI are GitHub (repos and PRs), Context7 (up-to-date library docs), Playwright (browser testing), Supabase (database), and Filesystem — plus DesignRevision MCP for installing real shadcn/ui components. Add the two or three that fit your stack rather than enabling everything, and keep each as its own [mcp_servers.
] table in config.toml. -
Codex reads ~/.codex/config.toml in your home directory. It is TOML, not JSON, and Codex does not create it at install — you make it yourself (or let codex mcp add create it). The same file is shared across the Codex CLI, the IDE extension, and the desktop app, so a server you add once works everywhere.
-
TOML. This is the single most common mistake, because Claude Code and Cursor use JSON. Pasting a JSON mcpServers block into config.toml will not work — each server needs a TOML table like [mcp_servers.github], and the key is mcp_servers with an underscore, not mcp.servers.
-
Add a [mcp_servers.
] table to ~/.codex/config.toml, or run codex mcp add --url for a remote server (or codex mcp add -- for a local one). See our full guide on how to add an MCP server to Codex for both methods, bearer-token auth, and troubleshooting. -
Yes — most are free and open source. GitHub, Playwright, Filesystem, Context7, and Sequential Thinking cost nothing to run; Supabase, Sentry, and Linear are free with an account. DesignRevision MCP is freemium, so you can wire it up and install components on the free plan. You can build a strong Codex setup without spending anything.
-
Yes, natively. Give the [mcp_servers.
] table a url and (if it needs auth) a bearer_token_env_var, and Codex connects over streamable HTTP and sends the Authorization: Bearer header for you. You do not need the old mcp-remote bridge — native HTTP has been built in since late 2025. -
Yes. DesignRevision MCP lets Codex discover, inspect, and install real shadcn/ui components from the designrevision.com registry. Add it to config.toml with its remote url and a bearer_token_env_var — see its entry below.
Join 50k+ subscribers
Web dev, SaaS, growth & marketing. Weekly.
Keep Learning
More articles you might find interesting.