openai-codex-mcp
10
The openai-codex-mcp project serves as an MCP server that integrates the OpenAI Codex CLI tool with Claude Code. It offers a JSON-RPC interface to enable tasks like code generation, explanation, and debugging using OpenAI's models, facilitating seamless interaction for coding tasks.
openai-codex-mcp
An MCP server to wrap the OpenAI Codex CLI tool for use with Claude Code.
Overview
- Provides a JSON-RPC server for interaction between Claude Code and OpenAI Codex CLI tool.
- Enhancements include specialized methods for common coding tasks:
- Write, explain, and debug code.
- Model selection options.
- Simplified syntax.
Recent Improvements
- Added dedicated methods for tasks like code generation, explanation, and debugging.
- Defined model options with defaults for ease of use.
Prerequisites
- Python 3.12+
- OpenAI Codex CLI tool
- Valid OpenAI API key
Installation and Setup
- Uses PEP‑621
pyproject.toml
for setup. - After installation,
codex_server
entrypoint is available.
Running the Server
- Setup with
setup_and_run.sh
script or manual start.
Integrating with Claude Code
- Register with Claude CLI or manually via UI.
- Once registered, can be used for tasks like code generation and explanation.
API Usage
- Provides multiple methods like
codex_completion
,write_code
,explain_code
, anddebug_code
.
Models
- Offers reasoning models (O-series) and GPT models for use.