Codex CLI
Give Codex CLI real-time web search, content extraction, and citation-backed research through the You.com MCP Server.
Quick setup
Add You.com to Codex
Codex reads MCP server config from ~/.codex/config.toml. Add the You.com server — no API key required:
This uses our free tier: 100 web searches per day, no signup. Want higher limits and access to you-contents and you-research? See Higher rate limits below.
Quick demo
Try these prompts inside Codex:
Higher rate limits
For unlimited queries, page-content extraction (you-contents), and deep research (you-research), add an API key. Get one at you.com/platform, then update your config:
Codex TOML gotcha: HTTP headers in Codex’s config.toml go in a separate [mcp_servers.<name>.http_headers] table, not inline. This is different from the JSON headers object used by Claude Code, Cursor, and VS Code.
Local install (no network on startup)
If you’d rather run the MCP server locally via stdio:
Omit the YDC_API_KEY env var to run on the free tier.
Troubleshooting
Codex doesn't see the tools
Run codex --version to confirm you’re on a version with MCP support (0.20+), then restart Codex after editing config.toml.
spawn npx ENOENT
For local installs, install Node.js 18+ and ensure npx is on your PATH, or switch to the remote hosted URL above.
401 or invalid key
Regenerate at you.com/platform. Confirm there are no extra spaces around Bearer.
TOML parse errors on headers
Headers must be under [mcp_servers.you-com.http_headers], not inline as a JSON-style headers = { ... } object.