openai-codex-mcp
About
An MCP server to communicated with, use, and wrap the API for the OpenAI Codex CLI tool.
Details
- Author
- agency-ai-solutions
- GitHub stars
- 51
- Downloads
- 839
- Categories
- AI
Jump to
- Specialized methods: write_code, explain_code, debug_code
- Supports multiple OpenAI models (O‑series and GPT)
- Simplified parameter naming for easy integration
- Runs as a lightweight, standalone Python server
- No authentication required for the MCP server itself
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
openai-codex-mcpCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install with uv pip install . after creating a venv, then run codex_server (or uvicorn codex_server:app). Register it in Claude Code via claude mcp add /path/to/openai_codex_mcp.json or manually with base URL http://localhost:8000/ and protocol JSON-RPC 2.0. No authentication needed.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"openai-codex-mcp": {
"openai-codex-mcp": {
"command": "uv",
"args": [
"venv",
"#",
"creates",
"a",
".venv/",
"directory"
]
}
}
}
}
McpServers
{
"openai-codex-mcp": {
"command": "uv",
"args": [
"venv",
"#",
"creates",
"a",
".venv/",
"directory"
]
}
}
openai-codex-mcp
An MCP server to wrap the OpenAI Codex CLI tool for use with Claude Code.
Overview
This project provides a simple JSON-RPC server that allows Claude Code to interact with the OpenAI Codex CLI tool. This enables Claude Code to use OpenAI's models for code generation, explanation, and problem-solving when needed.
Video Demo
https://www.loom.com/share/5d9532a79ae24b309af08c1727156f9c?sid=d9277b91-bf8c-43ec-a3c6-dc69fc52e1d2Recent Improvements
The MCP server has been enhanced to provide a more intuitive and robust interface:
1. Specialized Methods: Added dedicated methods for common coding tasks:
- write_code: Generate code for a specific task in a specified language
- explain_code: Get detailed explanations of how code works
- debug_code: Find and fix bugs in problematic code
2. Model Selection: Clearly defined model options with defaults:
- o4-mini
- o4-preview
- o4-pro
- o4-latest
3. Simplified Syntax: More intuitive parameter naming and structure for easier integration
These improvements make it easier for Claude Code to use OpenAI's models for specific programming tasks without requiring complex prompt engineering.
Prerequisites
- Python 3.12+
- OpenAI Codex CLI tool (npm install -g @openai/codex)
- Valid OpenAI API key (for the Codex CLI, not for this server)
Installation and Setup
This project uses a PEP‑621 pyproject.toml. Follow these steps:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
