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
Add a server with `codex mcp add`
Fastest path: `codex mcp add <name> -- <command>` writes the `[mcp_servers.<name>]` entry for you. Example: `codex mcp add context7 -- npx -y @upstash/context7-mcp`. Pass env vars with `--env KEY=VALUE` before the `--` separator.
- 2
Or edit config.toml 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. For a remote server set `url` instead of `command`.
- 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. For HTTP servers, use `bearer_token_env_var` or `http_headers` instead.
- 4
Restart Codex and verify
Exit and relaunch the Codex CLI so it re-reads the config. Run `/mcp` inside the Codex TUI to list active servers and confirm their tool counts are non-zero.
- User config
~/.codex/config.tomlRead on startup, applies to every repo. Edit it directly or add servers with `codex mcp add`. - Project config
.codex/config.tomlPer-repo MCP set in the project root. Read for trusted projects only.
# ~/.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
135 servers verified to work with Codex CLI, ranked by popularity.
Read and write local files with configurable access controls.
Current time and IANA timezone conversion — the first-party MCP that tells an agent what time it actually is.
Persistent memory layer for AI agents — auto-summarised, cross-session recall.
Retrieve web pages and convert them to clean markdown.
Local Git operations: commit, diff, log, branch, and more.
Structured step-by-step reasoning for complex problem solving.
Persistent knowledge graph memory across AI conversations.
Full GitHub API access: repos, PRs, issues, and code search.
Official Microsoft browser automation across Chromium, Firefox, and WebKit.
Run pre-built browser-automation Actors on managed infrastructure.
Google-published MCP server for databases — one Go binary speaks Postgres, MySQL, BigQuery, Spanner, AlloyDB, Snowflake, ClickHouse, MongoDB, Redis, and more.
Query dashboards, Prometheus/Loki datasources, alerts, and incidents from an AI agent — official.
AI-optimized web search with cleaned, citation-ready results.
Scrape, crawl, extract structured data, and search the web from an AI agent.
Search, scrape, and unblock any public web page from an AI agent — official Web Unlocker MCP.
Neural web search and page fetch for AI agents — official remote MCP at mcp.exa.ai/mcp.
Look up Terraform Registry providers and modules, and manage HCP Terraform workspaces from an AI agent.
Query and inspect MongoDB collections from Claude, Cursor, and VS Code.
Manage Azure resources across 40+ services from an AI agent — Microsoft's official MCP.
Build and validate n8n workflows with an agent that knows all 2,000+ n8n nodes — most-installed n8n MCP.
Up-to-date library docs pulled directly into your AI context.
Search, ask, research, and reason via the official Perplexity MCP.
Inspect keys, run commands, and debug Redis from an AI agent.
Vision-first browser automation built for AI agents.
Drive Azure DevOps repos, pull requests, work items, and pipelines from an AI agent — Microsoft official.
Manage payments, customers, and subscriptions through Stripe.
Read, write, and search across Notion pages, databases, and blocks.
Read channel messages, post replies, and trigger meetings from MS Teams.
Manage Workers, R2 buckets, DNS, and edge policies on Cloudflare.
Drive a live Blender session from an agent — create objects, set materials, run Python, render.
Ask natural-language questions across Microsoft 365 Copilot data.
Query ClickHouse and ClickHouse Cloud columnar warehouses from an AI agent.
Manage Bitbucket Cloud repos, pipelines, and pull requests from an AI agent.
Read, write, and manage GCS buckets and objects from an AI agent — official Google MCP, local or remote.
Query Google Ads campaigns, metrics, and account performance with GAQL — Google's official MCP.
Full Supabase access: database, auth, storage, and edge functions.
Inspect Figma designs, components, and variables from an agent — the widely adopted community server.
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.
Send transactional and broadcast emails via the official Resend MCP.
Search indices, inspect mappings, and run queries against Elasticsearch from an AI agent.
Production-grade Postgres MCP with index advice, EXPLAIN, and health checks.
Open-source vector search with payload filtering, self-hostable or managed.
AWS's own managed MCP server — run AWS APIs, execute sandboxed scripts, and search AWS documentation under IAM.
Official Mapbox MCP — geocoding, directions, isochrones, search, and tiles across the Mapbox API surface.
Official Salesforce MCP — SOQL queries, metadata deploy/retrieve, Apex tests, and org management from AI clients.
Scrape any URL, render JavaScript, and reach geo-restricted data — official Oxylabs Web Scraper MCP.
Full GitLab API access: repos, MRs, issues, pipelines, and registries.
Triage errors, inspect traces, and query events from Sentry.
Manage Jira, Confluence, and Compass via the official Atlassian Rovo MCP.
Live SERP, keyword, backlink, and on-page SEO data for an AI agent.
Query GA4 reports, funnels, and realtime data from an AI agent.
Inspect and manage Kubernetes clusters through kubectl-equivalent tools, with a non-destructive mode.
Read and write notes in your local Obsidian vault.
Local-first agent memory as plain Markdown — a semantic knowledge graph you and the agent can both read.
2,800+ apps and managed OAuth via Pipedream's hosted MCP at mcp.pipedream.com.
In-process analytical SQL over files and Parquet from an AI agent.
Manage Droplets, App Platform, Kubernetes, and Spaces from an AI agent.
Score npm, PyPI, Go, and Maven dependencies for supply-chain and vulnerability risk before an agent installs them.
Managed vector database for semantic search and retrieval in AI agents.
Manage Heroku apps, dynos, add-ons, and Postgres from an AI agent.
Ad-free, high-quality web search and page-to-markdown extraction from an AI agent.
Send messages and read channel history from a Telegram bot in an agent.
Real-time web search with privacy-focused results.
Run read-only MySQL queries and inspect schemas from an AI agent.
Official Plaid MCP — developer sandbox tooling and dashboard diagnostics, not a live bank-data connector.
Open-source agentic browser automation that handles login walls and CAPTCHAs.
Outlook mail and calendar, Teams, OneDrive and Excel through one Graph API server.
Read dynamic and static secrets from HashiCorp Vault inside agent workflows.
Geocoding, place search, directions, and travel times from Google Maps.
Read, create, and manage events across Google Calendar — via Google's official remote MCP or a self-hosted community server.
AI-driven task management and decomposition for long-running agent projects.
Run QuickBooks Online accounting from an agent — invoices, bills, payments, and financial reports.
Manage Mailgun messaging, domains, webhooks, and analytics from an AI agent.
Inject secrets from Doppler into agent workflows without exposing values in chat.
Send transactional email from an AI agent — verified deliverability, audit-friendly.
Query webpages with structured natural language — selectors written for you.
Read and send Slack messages, manage channels and threads — the token-based community server, no admin approval needed.
Read and post to Discord channels — community management for AI agents.
Query Search Console clicks, impressions, and queries from an AI agent.
Open-source SAST scanning against custom rules from an AI agent.
Embedded and hosted vector database for AI agents — open source, zero-ops.
Manage subscriptions, transactions, products, prices, and financial reports on Paddle — official MCP.
Official Xero MCP — invoices, contacts, bank transactions, and accounting from an agent.
Process payments and manage orders, catalog, inventory, and bookings on Square — official MCP.
Read and create events in Apple Calendar via CalDAV from any MCP client.
Capture context and decisions across sessions — durable agent memory in markdown.
Turn Make.com on-demand scenarios into agent-callable tools — official MCP.
Hosted Chromium with proxies and anti-bot evasion for AI agents.
Send email and inspect deliverability via SendGrid from an AI agent.
Local SQLite database access with full read/write support.
Send SMS, WhatsApp, and voice calls from an AI agent via Twilio.
Anthropic's reference Postgres MCP — archived July 2025 and superseded by Postgres MCP Pro or the Supabase MCP.
Trigger Make scenarios and inspect runs from an AI agent.
Route one prompt across 300+ LLMs with a single API key.
Inspect deployments, logs, and project state on Vercel from an AI agent.
Read products, orders, and inventory from your Shopify store.
Create invoices, capture orders, issue refunds, and track disputes on PayPal — official MCP.
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.
Fire IFTTT applets via webhooks from an AI agent. Community MCP wrapper archived; IFTTT itself is unaffected.
Turn a vague goal into a dependency-tracked task graph an agent can execute step by step.
Expose 8,000+ Zapier integrations as tools your AI agent can call.
Register and manage Name.com domains via the official MCP, auto-generated from their OpenAPI.
Browse, search, and Q&A across Box content from an AI agent — official remote MCP.
Inject 1Password secrets into an AI agent's tool calls without exposing them in chat.
Official Foursquare Places MCP — POI search, GeoTagging, and rich place metadata across 100M+ places.
Official Attio MCP — natural-language CRM control across records, lists, and notes via OAuth.
Create records, update deals, and run Zoho CRM actions from an AI agent — official Zoho MCP.
Manage leads, contacts, opportunities, and tasks in Close from an AI agent — official scoped MCP.
Pull keyword, backlink, traffic, and competitor data into an AI agent — official Semrush MCP.
Search conversations, contacts, companies, and help articles in Intercom from an AI agent — official MCP.
Full browser automation: navigate, click, screenshot, and scrape.
Search, inspect, and run Hugging Face models and datasets from an agent.
Run any open-source model on Replicate from inside an AI agent.
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.
Self-hosted Git server — manage repos, issues, and PRs from an AI agent.
Secure cloud sandboxes for executing AI-generated code — npm MCP package archived; vendor recommends the hosted E2B platform.
Official HubSpot MCP server — CRM contacts, deals, and meeting scheduling from Claude or Cursor.
Spin up Railway projects, services, and deploys via remote MCP with OAuth.
Send, read, search, and label Gmail from an AI agent — community MCP with auto-OAuth.
Cross-repo code search, navigation, and Deep Search via the official Sourcegraph MCP.
Enterprise iPaaS — trigger Workato recipes from an AI agent.
Official Fireflies remote MCP — query meeting transcripts, AI summaries, and action items via OAuth or API key.
Official Fathom remote MCP — access meeting recordings, transcripts, summaries, and webhooks from any MCP client.
Manage Linear issues, projects, and cycles from AI context.
Vector database with first-class hybrid (vector + keyword) and modular embeddings (MCP server archived — package no longer published).
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.
Anthropic-verified Fellow Connector — query meeting notes, transcripts, action items, and calendar events from Claude.
Inspect schemas and run SQL against a Snowflake account from an AI agent.
Self-hosted Slack alternative — read and post from an AI agent.
Real-time and forecast weather data via the OpenWeatherMap API.
FAQ: MCP in Codex CLI
Where does Codex CLI store its MCP config?
In `config.toml`, with MCP servers under `[mcp_servers.<name>]` subtables. By default that is `~/.codex/config.toml` (user-level, every repo). Codex also reads a project-scoped `.codex/config.toml` in the project root, but only for trusted projects — so you can keep a per-repo MCP set without applying it to untrusted checkouts.
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?
Yes — commit a project-scoped `.codex/config.toml` with the `[mcp_servers.*]` blocks at the repo root. Teammates who trust the project get the same servers automatically. Keep secrets out of it: use `${VAR_NAME}` interpolation in `env`, or `bearer_token_env_var` for HTTP servers, so the committed file holds placeholders only.
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







