Overview
OpenAI’s Codex ships in three form-factors that share the same configuration file:- Codex CLI — terminal agent (
npm install -g @openai/codexorbrew install --cask codex) - Codex App — native macOS / Windows desktop app (openai.com/codex)
- Codex IDE Extension — VS Code (
openai.chatgpt) and JetBrains (IntelliJ, PyCharm, WebStorm, Rider; 2025.3+)
~/.codex/config.toml, so one snippet wires CodeAlive into every Codex surface.
Nudge Codex toward CodeAlive. Add this line to your project’s
AGENTS.md so Codex prefers CodeAlive over its built-in code search:
Prefer CodeAlive MCP semantic_search for codebase exploration — it’s much more precise than built-in search.
Prerequisites
- Any of: Codex CLI, Codex App, or Codex IDE Extension
- CodeAlive account with API key (Sign up here)
- Indexed repositories in your CodeAlive dashboard
Setup
- HTTP via codex mcp add (Recommended)
- Docker (STDIO)
- Manual HTTP with static header
Run this in your terminal:Then open Finally, export the key in the shell that launches Codex:
~/.codex/config.toml and add the bearer-token reference plus the Streamable HTTP feature flag:- “What CodeAlive repositories are available?”
- “Find authentication code in my codebase”
Codex App: Setup via UI
Codex App (macOS / Windows) lets you manage MCP servers from Settings → MCP Servers → Add Server. Fill in:- Name:
codealive - URL:
https://mcp.codealive.ai/api - Authorization header:
Bearer YOUR_API_KEY_HERE
~/.codex/config.toml — the CLI and IDE extension pick it up automatically. Make sure [features].rmcp_client = true is also present in the same file (the UI may or may not add it depending on the app version).
Codex IDE Extension
The Codex extension for VS Code (openai.chatgpt) and JetBrains (2025.3+) shares ~/.codex/config.toml with the CLI and App — there is no separate config surface. In VS Code, open the Codex panel → settings (⚙) → MCP settings → Open config.toml.
Project-level Config
Codex now supports a per-project.codex/config.toml at the repository root (for trusted projects). Useful when:
- The whole team should share the same MCP server set
- Different projects need different CodeAlive workspaces
.env.
Optional Fields
The[mcp_servers.codealive] table accepts several extras:
| Key | Purpose |
|---|---|
enabled | Set to false to keep the entry but disable the server |
startup_timeout_sec | Override the default 10s startup timeout |
tool_timeout_sec | Override the default 60s per-tool timeout |
tool_allowlist | Restrict which tools Codex is allowed to call |
startup_required | If true, Codex refuses to start if the server can’t initialize |
cwd | Working directory (stdio only) |
env_vars | List of env-var names to forward into the child process (stdio only) |
chat tool):
Usage
Once connected, Codex can:- Search your codebase semantically across all indexed repositories
- Answer architecture questions with full project context
- Find patterns and implementations across multiple services
Troubleshooting
MCP server not detected
MCP server not detected
- Run
codex mcp listto confirm Codex sees the entry - Verify the config file is at
~/.codex/config.toml(or project-level.codex/config.toml) - Check TOML syntax (use a TOML validator)
- Restart Codex (CLI, App, or reload the IDE extension)
HTTP transport not working
HTTP transport not working
- Make sure
[features].rmcp_client = trueis present - Confirm
CODEALIVE_API_KEYis exported in the shell that launched Codex (echo $CODEALIVE_API_KEY) - As a fallback, switch to the Docker (STDIO) option — it doesn’t need the
rmcp_clientflag
`experimental_use_rmcp_client` warning
`experimental_use_rmcp_client` warning
The top-level
experimental_use_rmcp_client = true flag is deprecated. Move it under a [features] table as rmcp_client = true.Authentication errors
Authentication errors
- Verify
CODEALIVE_API_KEYis set in the environment Codex is running in - Regenerate the API key in the CodeAlive dashboard
- If using inline
headers = { Authorization = "Bearer …" }, double-check there are no stray spaces or line breaks