Skip to main content

Overview

OpenAI’s Codex ships in three form-factors that share the same configuration file:
  • Codex CLI — terminal agent (npm install -g @openai/codex or brew 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+)
All three read ~/.codex/config.toml, so one snippet wires CodeAlive into every Codex surface.
Quick install: Run npx @codealive/installer to automatically configure CodeAlive for Codex. See the Installation Guide for details.
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

Setup

Verify the entry was registered:
codex mcp list
Then restart Codex (CLI, App, or reload the IDE extension) and try in chat:
  • “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
The UI writes the entry into ~/.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
# .codex/config.toml (committed to the repo)
[features]
rmcp_client = true

[mcp_servers.codealive]
url = "https://mcp.codealive.ai/api"
bearer_token_env_var = "CODEALIVE_API_KEY"
Don’t commit the API key itself — keep it in each teammate’s shell env or a local .env.

Optional Fields

The [mcp_servers.codealive] table accepts several extras:
KeyPurpose
enabledSet to false to keep the entry but disable the server
startup_timeout_secOverride the default 10s startup timeout
tool_timeout_secOverride the default 60s per-tool timeout
tool_allowlistRestrict which tools Codex is allowed to call
startup_requiredIf true, Codex refuses to start if the server can’t initialize
cwdWorking directory (stdio only)
env_varsList of env-var names to forward into the child process (stdio only)
Example with a larger tool timeout (useful when relying on the slower chat tool):
[mcp_servers.codealive]
url = "https://mcp.codealive.ai/api"
bearer_token_env_var = "CODEALIVE_API_KEY"
tool_timeout_sec = 120

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
"Find all error handling patterns in the payment service"
"Explain how the user registration flow works"
"Search for database migration code"

Troubleshooting

  1. Run codex mcp list to confirm Codex sees the entry
  2. Verify the config file is at ~/.codex/config.toml (or project-level .codex/config.toml)
  3. Check TOML syntax (use a TOML validator)
  4. Restart Codex (CLI, App, or reload the IDE extension)
  1. Make sure [features].rmcp_client = true is present
  2. Confirm CODEALIVE_API_KEY is exported in the shell that launched Codex (echo $CODEALIVE_API_KEY)
  3. As a fallback, switch to the Docker (STDIO) option — it doesn’t need the rmcp_client flag
The top-level experimental_use_rmcp_client = true flag is deprecated. Move it under a [features] table as rmcp_client = true.
  1. Verify CODEALIVE_API_KEY is set in the environment Codex is running in
  2. Regenerate the API key in the CodeAlive dashboard
  3. If using inline headers = { Authorization = "Bearer …" }, double-check there are no stray spaces or line breaks
For more solutions, see the Troubleshooting Guide.