Read and write local files with configurable access controls.
- Home
- MCP Servers for Codex CLI
MCP Servers for Codex CLI
Codex CLI is OpenAI's terminal coding agent. It supports MCP through an `mcp_servers` section in its TOML config, letting you extend Codex with the same servers that power Claude Code, Cursor, and the rest of the ecosystem.
Set up MCP in Codex CLI
Four steps to connect your first MCP server.
- 1
Open ~/.codex/config.toml
First-run Codex creates the file at `~/.codex/config.toml` if it does not exist. Open it in your editor (or run `codex config edit`).
- 2
Add servers under [mcp_servers.*]
Each MCP gets its own subtable: `[mcp_servers.<name>]`. Inside, set `command` and `args` — the same shape used by every MCP install snippet on top-mcps.com, just in TOML.
- 3
Use env for secrets
Reference shell variables with `${VAR_NAME}` inside the `env = { ... }` table. Tokens stay in your shell environment, not in the committed config.
- 4
Restart Codex
Exit and relaunch the Codex CLI so it re-reads the config. Run `codex mcp list` to confirm the servers are connected and their tool counts are non-zero.
- User config
~/.codex/config.tomlCodex reads this on startup. Edit it directly or via `codex config`.
# ~/.codex/config.toml
[mcp_servers.filesystem]
command = "npx"
args = [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/you/code",
]
[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp"]
[mcp_servers.github]
command = "npx"
args = ["-y", "@github/github-mcp-server"]
env = { GITHUB_PERSONAL_ACCESS_TOKEN = "${GITHUB_TOKEN}" }Top MCPs for Codex CLI
The curated starting stack — install these first.
Full GitHub API access: repos, PRs, issues, and code search.
Up-to-date library docs pulled directly into your AI context.
Anthropic's reference Postgres MCP — archived July 2025 and superseded by Postgres MCP Pro or the Supabase MCP.
Full browser automation: navigate, click, screenshot, and scrape.
Persistent knowledge graph memory across AI conversations.
All MCPs compatible with Codex CLI
101 servers verified to work with Codex CLI, ranked by popularity.
Read and write local files with configurable access controls.
AI-optimized web search with cleaned, citation-ready results.
Query and inspect MongoDB collections from Claude, Cursor, and VS Code.
Inspect keys, run commands, and debug Redis from an AI agent.
Run pre-built browser-automation Actors on managed infrastructure.
Embedded and hosted vector database for AI agents — open source, zero-ops.
Persistent memory layer for AI agents — auto-summarised, cross-session recall.
Inspect deployments, logs, and project state on Vercel from an AI agent.
Local SQLite database access with full read/write support.
Retrieve web pages and convert them to clean markdown.
Local Git operations: commit, diff, log, branch, and more.
Full GitHub API access: repos, PRs, issues, and code search.
Anthropic's reference Postgres MCP — archived July 2025 and superseded by Postgres MCP Pro or the Supabase MCP.
Structured step-by-step reasoning for complex problem solving.
Persistent knowledge graph memory across AI conversations.
Manage payments, customers, and subscriptions through Stripe.
Official Microsoft browser automation across Chromium, Firefox, and WebKit.
Hosted, isolated Chromium runtime for AI agents that need a fresh browser per task.
AI-native browser automation: act, observe, and extract in plain English.
Managed vector database for semantic search and retrieval in AI agents.
Manage Heroku apps, dynos, add-ons, and Postgres from an AI agent.
Manage Droplets, App Platform, Kubernetes, and Spaces from an AI agent.
Register and manage Name.com domains via the official MCP, auto-generated from their OpenAPI.
Send transactional and broadcast emails via the official Resend MCP.
Manage Mailgun messaging, domains, webhooks, and analytics from an AI agent.
Neural web search and page fetch for AI agents — official remote MCP at mcp.exa.ai/mcp.
Search, ask, research, and reason via the official Perplexity MCP.
Ad-free, high-quality web search and page-to-markdown extraction from an AI agent.
Scrape, crawl, extract structured data, and search the web from an AI agent.
Query ClickHouse and ClickHouse Cloud columnar warehouses from an AI agent.
Search indices, inspect mappings, and run queries against Elasticsearch from an AI agent.
Inject 1Password secrets into an AI agent's tool calls without exposing them in chat.
Open-source SAST scanning against custom rules from an AI agent.
Inject secrets from Doppler into agent workflows without exposing values in chat.
Send SMS, WhatsApp, and voice calls from an AI agent via Twilio.
Hosted Chromium with proxies and anti-bot evasion for AI agents.
Manage Bitbucket Cloud repos, pipelines, and pull requests from an AI agent.
Read channel messages, post replies, and trigger meetings from MS Teams.
Inspect AWS resources, read CloudWatch logs, and audit IAM from an AI agent.
Read, write, and search across Notion pages, databases, and blocks.
Triage errors, inspect traces, and query events from Sentry.
Manage Workers, R2 buckets, DNS, and edge policies on Cloudflare.
Read products, orders, and inventory from your Shopify store.
Open-source vector search with payload filtering, self-hostable or managed.
Browse, search, and Q&A across Box content from an AI agent — official remote MCP.
Turn Make.com on-demand scenarios into agent-callable tools — official MCP.
Manage Jira, Confluence, and Compass via the official Atlassian Rovo MCP.
In-process analytical SQL over files and Parquet from an AI agent.
Full GitLab API access: repos, MRs, issues, pipelines, and registries.
Production-grade Postgres MCP with index advice, EXPLAIN, and health checks.
Search and read Google Drive files from an AI agent (archived reference implementation).
Built-in MCP for Inngest functions, events, runs, and docs — zero auth, zero config.
Run read-only MySQL queries and inspect schemas from an AI agent.
Fire IFTTT applets via webhooks from an AI agent. Community MCP wrapper archived; IFTTT itself is unaffected.
Send transactional email from an AI agent — verified deliverability, audit-friendly.
Capture context and decisions across sessions — durable agent memory in markdown.
Expose 8,000+ Zapier integrations as tools your AI agent can call.
Real-time web search with privacy-focused results.
Full browser automation: navigate, click, screenshot, and scrape.
Up-to-date library docs pulled directly into your AI context.
Read and post to Discord channels — community management for AI agents.
Search, inspect, and run Hugging Face models and datasets from an agent.
Geocoding, place search, directions, and travel times from Google Maps.
Real-time and forecast weather data via the OpenWeatherMap API.
Read and write notes in your local Obsidian vault.
Inspect Figma designs, components, and variables from an agent.
Query webpages with structured natural language — selectors written for you.
Run any open-source model on Replicate from inside an AI agent.
Route one prompt across 300+ LLMs with a single API key.
Personal task management with due dates — capture, schedule, and complete from chat. Community MCP package archived; Todoist itself is unaffected.
AI-driven task management and decomposition for long-running agent projects.
Query Google BigQuery datasets from Claude, Cursor, and VS Code.
Scan code and dependencies for vulnerabilities from an AI coding assistant. Standalone MCP package archived; Snyk itself remains current via its IDE integrations.
Trigger and manage n8n workflows from an AI agent. Community MCP wrapper archived; n8n itself is unaffected.
Trigger Make scenarios and inspect runs from an AI agent.
Open-source workflow automation — trigger and manage from an AI agent. Community MCP wrapper archived; Activepieces itself is unaffected.
Send messages and read channel history from a Telegram bot in an agent.
Self-hosted Slack alternative — read and post from an AI agent.
Vision-first browser automation built for AI agents.
Self-hosted Git server — manage repos, issues, and PRs from an AI agent.
Send email and inspect deliverability via SendGrid from an AI agent.
Secure cloud sandboxes for executing AI-generated code — npm MCP package archived; vendor recommends the hosted E2B platform.
Spin up Railway projects, services, and deploys via remote MCP with OAuth.
2,800+ apps and managed OAuth via Pipedream's hosted MCP at mcp.pipedream.com.
Cross-repo code search, navigation, and Deep Search via the official Sourcegraph MCP.
Inspect schemas and run SQL against a Snowflake account from an AI agent.
Read dynamic and static secrets from HashiCorp Vault inside agent workflows.
Enterprise iPaaS — trigger Workato recipes from an AI agent.
Full Supabase access: database, auth, storage, and edge functions.
Read and send Slack messages, manage channels and threads.
Manage Linear issues, projects, and cycles from AI context.
Read, create, and manage events across Google Calendar.
Vector database with first-class hybrid (vector + keyword) and modular embeddings (MCP server archived — package no longer published).
Open-source scheduling — booking pages, availability, and event types for AI agents. MCP wrapper is archived; the Cal.com platform itself remains current.
Booking-link scheduling — share availability without exposing the raw calendar.
Read and create events in Apple Calendar via CalDAV from any MCP client.
Multi-model orchestration — let Claude consult Gemini, GPT, and o-series as sub-agents. Upstream community repository archived; no further maintenance.
Deploy and manage Render web services, static sites, cron jobs, and Postgres from an AI agent. Official MCP server is archived; Render platform is unaffected.
Manage Porkbun domains, DNS, DNSSEC, and SSL — read-only by default. Community MCP repository archived; Porkbun itself is unaffected.
Send, read, search, and label Gmail from an AI agent — community MCP with auto-OAuth.
Open-source agentic browser automation that handles login walls and CAPTCHAs.
FAQ: MCP in Codex CLI
Where does Codex CLI store its MCP config?
At `~/.codex/config.toml`. The entire config is a single TOML file, with MCP servers living under `[mcp_servers.<name>]` subtables. There is no per-project config today — Codex uses the same config across every repo.
How is the config different from Claude Desktop or Cursor?
Shape-wise it is the same — `command`, `args`, optional `env` — but the format is TOML instead of JSON, and keys use `[mcp_servers.<name>]` subtables instead of the `{"mcpServers": {...}}` nesting you see in JSON clients.
Can I share MCP config across my team in Codex?
Only indirectly today. Codex uses a single user-level config, so team sharing is typically done by committing a template `config.toml` to your repo and asking teammates to copy the `[mcp_servers.*]` blocks they want into their own Codex config.
Does Codex CLI support env var interpolation?
Yes. Inside the `env = { ... }` inline table you can reference `${VAR_NAME}` and Codex resolves it from the shell at launch. That lets you keep tokens out of the committed config while still passing them to the MCP process.
Why does Codex call them "mcp_servers" (plural) and not "mcpServers"?
TOML convention. Codex's config is snake_case throughout, and `mcp_servers` matches the style of its other subtables (`model`, `tools`, `projects`). The underlying MCP protocol is unchanged — only the config-file shape differs.
Browse every MCP server → top-mcps.com







