MCP servers for Codex CLI
LocalCodex CLI, OpenAI's open-source coding agent, declares MCP servers in ~/.codex/config.toml. Each runs over stdio and its tools are available in every session.
How to add an MCP server to Codex CLI
- Open or create ~/.codex/config.toml.
- Add a [mcp_servers.<name>] table with command and args, plus an optional env table for secrets.
- Start a new codex session and run /mcp to see the loaded servers and their tools.
[mcp_servers.filesystem] command = "npx" args = ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"] [mcp_servers.filesystem.env] EXAMPLE_TOKEN = "..."
The example uses the reference filesystem server. Every listing on mcp.site shows its own command, args and environment variables, usually with a ready-made snippet for Codex CLI.
Hosted servers. For a hosted server, use a stdio bridge: set command = "npx" and args = ["-y", "mcp-remote", "https://example.com/mcp"].
Config formats change between releases. If a step looks different in your version, the OpenAI documentation ↗ is the source of truth.
Servers to try in Codex CLI
All 20,566 →Official GitHub MCP server for repository search, issues, pull requests, and CI/CD workflows in MCP-compatible AI clients.
Browser automation, page inspection, screenshots, and web interaction from Claude, Cursor, and other AI agents.
Up-to-date, version-specific library documentation and code examples inside AI coding prompts.
Powerful web scraping and search capabilities for LLM clients like Cursor and Claude.
Manage Supabase projects, databases, auth, storage, and SQL workflows from AI agents.
Deploy, configure & interrogate resources on the Cloudflare developer platform (Workers, KV, R2, D1).
Search engine made for AIs by Exa.
Connect AI agents to Notion pages, databases, and workspaces.
Query orders, customers, and products from your WooCommerce store.
Create, edit, and schedule Ghost blog posts and newsletters.
FHIR-native healthcare data platform tools for AI agents.
Persistent long-term memory graph shared across MCP clients.