# Best MCP Servers for Codex (2026): Ranked

> The best MCP servers for Codex in 2026, ranked — with the exact config.toml block for each and the shadcn/ui component server other lists miss.

Source: https://designrevision.com/blog/best-mcp-servers-for-codex

---

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](/blog/add-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](/blog/add-mcp-server-to-cursor) and [Claude Code](/blog/add-mcp-server-to-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](https://github.com/github/github-mcp-server)

```toml
[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](https://github.com/upstash/context7)

```toml
[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](https://github.com/microsoft/playwright-mcp)

```toml
[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](https://supabase.com/docs/guides/getting-started/mcp)

```toml
[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](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem)

```toml
[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)

```toml
[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](/mcp) lets Codex discover, inspect, and install real, production-grade [shadcn/ui components](/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](https://help.figma.com/hc/en-us/articles/32132100833559-Guide-to-the-Dev-Mode-MCP-Server)

```toml
[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](https://docs.sentry.io/product/sentry-mcp/)

```toml
[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](https://linear.app/docs/mcp)

```toml
[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](https://github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking)

```toml
[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:

```toml
[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](/blog/add-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

- [How to Add an MCP Server to Codex CLI (2026 Guide)](/blog/add-mcp-server-to-codex)
- [DesignRevision MCP — the shadcn/ui MCP server](/mcp)
- [MCP Clients Compared: Every AI Coding Agent](/blog/mcp-clients-compared)
- [Best MCP Servers for Claude Code (2026): Tested & Ranked](/blog/best-mcp-servers-for-claude-code)
- [Best MCP Servers for Cursor (2026): Ranked](/blog/best-mcp-servers-for-cursor)
- [Browse the shadcn/ui component registry](/components)
