An MCP server to communicated with, use, and wrap the API for the OpenAI Codex CLI tool.
MCPpedia last refreshed this data
This server has been archived and is no longer actively maintained.
Openai Codex MCP is an MCP server that an MCP server to communicated with, use, and wrap the API for the OpenAI Codex CLI tool. Its tool list has not been published yet over stdio, requires no API key, and scores 35/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"openai-codex-mcp": {
"args": [
"-y",
"@openai/codex"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
An MCP server to wrap the OpenAI Codex CLI tool for use with Claude Code.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@openai/codex' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
OpenAI Codex CLI enables code execution through malicious MCP (Model Context Protocol) configuration files
A vulnerability was identified in OpenAI Codex CLI v0.23.0 and before that enables code execution through malicious MCP (Model Context Protocol) configuration files. The attack is triggered when a user runs the codex command inside a malicious or compromised repository. Codex automatically loads project-local .env and .codex/config.toml files without requiring user confirmation, allowing attackers to embed arbitrary commands that execute immediately.
>= 0source →Codex has sandbox bypass due to bug in path configuration logic
Due to a bug in the sandbox configuration logic, Codex CLI could treat a model-generated `cwd` as the sandbox’s writable root, including paths outside of the folder where the user started their session. This logic bypassed the intended workspace boundary and enables arbitrary file writes and command execution where the Codex process has permissions - this did not impact the network-disabled sandbox restriction. **Remediation** We released a patch in Codex CLI **0.39.0** that canonicalizes and
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml / developer-tools
MCP client bridge: connects to MCP servers and registers their tools on ctx.tools
An autonomous agent that conducts deep research on any data using any LLM providers
Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors
The official MCP server implementation for the Perplexity API Platform
MCP Security Weekly
Get CVE alerts and security updates for Openai Codex Mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
An MCP server to wrap the OpenAI Codex CLI tool for use with Claude Code.
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.
https://www.loom.com/share/5d9532a79ae24b309af08c1727156f9c?sid=d9277b91-bf8c-43ec-a3c6-dc69fc52e1d2
The MCP server has been enhanced to provide a more intuitive and robust interface:
Specialized Methods: Added dedicated methods for common coding tasks:
write_code: Generate code for a specific task in a specified languageexplain_code: Get detailed explanations of how code worksdebug_code: Find and fix bugs in problematic codeModel Selection: Clearly defined model options with defaults:
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.
npm install -g @openai/codex)This project uses a PEP‑621 pyproject.toml. Follow these steps:
# 1. Create & activate a venv
uv venv # creates a .venv/ directory
source .venv/bin/activate # on Windows: .\.venv\Scripts\activate
# 2. Install package and dependencies into the venv
uv pip install .
After installation, the codex_server entrypoint is available in your PATH.
Use the provided setup script to automatically set up the environment and start the server:
./setup_and_run.sh
This script will:
codex CLI installationIf you prefer to start the server manually:
codex_server
Alternatively, use uvicorn directly: uvicorn codex_server:appOnce your MCP server is running, you can register it with Claude Code using either of these methods:
The repository includes a configuration file that can be installed directly using the Claude CLI:
# Install the MCP tool directly from the JSON config
claude mcp add /path/to/openai_codex_mcp.json
# Verify the tool was installed correctly
claude mcp list
Alternatively, you can register the tool manually:
openai_codexOpenAI Codex CLI integration via MCP serverhttp://localhost:8000/JSON-RPC 2.0Now, Claude Code can use the OpenAI Codex CLI tool for tasks where a different perspective or approach is desired. You can invoke it by asking Claude to use the OpenAI models for a particular task.
The MCP server provides multiple methods to interact with OpenAI's models for different coding tasks.
For flexible, custom prompts to OpenAI:
curl -X POST http://localhost:8000/ \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "codex_completion",
"params": {
"prompt": "Write a JavaScript function to sort an array of objects by a property value",
"model": "o4-mini"
},
... [View full README on GitHub](https://github.com/agency-ai-solutions/openai-codex-mcp#readme)