codex-mcp
Wraps the OpenAI Codex CLI, exposing it as tools for running prompts, answering read-only code questions and analysis, performing code reviews against branches/commits/uncommitted changes, running OWASP-based security audits, exploring design alternatives from multiple perspectives, and resuming previous Codex sessions. Supports Codex profiles and config overrides (e.g. Azure OpenAI profiles, custom model providers).
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
codex-mcp
MCP server that exposes the OpenAI Codex CLI as tools for Claude Code.
Tools
Tool | Description |
| Run Codex with any prompt |
| Read-only questions and code analysis |
| Code review against a branch, commit, or uncommitted changes |
| OWASP-based security audit |
| Multi-perspective design exploration |
| Continue any previous Codex session |
Related MCP server: codex-mcp-agent
Prerequisites
Python 3.11+
Codex CLI installed and on your PATH
Install
git clone https://github.com/panuhen/codex-mcp.git
cd codex-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e .Configure in Claude Code
Add to your Claude Code MCP settings (~/.mcp.json or project-level .mcp.json):
{
"mcpServers": {
"codex": {
"command": "/absolute/path/to/codex-mcp/.venv/bin/codex-mcp"
}
}
}Replace /absolute/path/to/codex-mcp with the actual path where you cloned the repo.
Using a Codex profile (e.g. Azure OpenAI)
If you have a profile configured in ~/.codex/config.toml (e.g. an azure profile with a custom model provider), pass --profile via args and supply the required API key via env:
{
"mcpServers": {
"codex": {
"command": "/absolute/path/to/codex-mcp/.venv/bin/codex-mcp",
"args": ["--profile", "azure"],
"env": {
"AZURE_OPENAI_API_KEY": "your-api-key-here"
}
}
}
}If the API key is already exported in your shell profile (e.g. export AZURE_OPENAI_API_KEY=... in ~/.bashrc), you can skip the env block entirely:
{
"mcpServers": {
"codex": {
"command": "/absolute/path/to/codex-mcp/.venv/bin/codex-mcp",
"args": ["--profile", "azure"]
}
}
}You can also set the profile via the CODEX_PROFILE environment variable instead of args.
Additional codex config overrides can be passed with -c:
{
"mcpServers": {
"codex": {
"command": "/absolute/path/to/codex-mcp/.venv/bin/codex-mcp",
"args": ["--profile", "azure", "-c", "model=\"o3\""]
}
}
}Restart Claude Code and the Codex tools will be available.
Usage examples
Once configured, Claude Code can use the tools directly:
"Review my uncommitted changes" — triggers
codex_review"Run a security audit on src/" — triggers
codex_security_audit"Brainstorm approaches for caching" — triggers
codex_brainstorm"Ask Codex how the auth module works" — triggers
codex_ask
Sessions can be continued with codex_resume using the session_id returned by any tool.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Live SEO workflow tools for Claude Code, Codex, and AI agents.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Connect Codex, Claude Code and Gemini CLI to Plainer files. Approve access in your browser.
Related MCP Servers
- AlicenseCqualityDmaintenanceConnects AI assistants like Claude to the Codex CLI for code analysis, editing, and execution. Supports file references with @ syntax, sandboxed code execution with approval workflows, and structured code changes for automated refactoring and documentation.8131 npm176MIT
- AlicenseBqualityDmaintenanceEnables Claude Code, Cursor, and other AI tools to call OpenAI Codex for task execution, with safe and writable modes.3100 PyPIMIT
- AlicenseNot gradedqualityDmaintenanceIntegrates OpenAI Codex CLI with Claude Code via MCP, enabling code execution, analysis, fixing, and web search within Claude Code.1Apache 2.0
- AlicenseAqualityDmaintenanceEnables Claude Code to delegate tasks to OpenAI's Codex CLI (GPT-5.4) with structured execution traces, parallel execution, session persistence, and adversarial code review.15MIT