codex-mcp-agent
Enables calling OpenAI's Codex agent for general-purpose task execution and specialized code review.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@codex-mcp-agent create a JavaScript function that reverses a string"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
codex-mcp-agent
Note: This project is a fork of the current Git remote:
Enable Claude Code, Cursor and other AI tools to call Codex for task execution. Plus/Pro/Team subscribers can maximize GPT-5 usage without additional costs.
Setup
1. Install Codex CLI
npm install -g @openai/codex
codex login2. Configure MCP
Add to your .mcp.json:
Safe Mode (Default):
{
"mcpServers": {
"codex": {
"type": "stdio",
"command": "uvx",
"args": ["codex-mcp-agent@latest"]
}
}
}Writable Mode:
{
"mcpServers": {
"codex": {
"type": "stdio",
"command": "uvx",
"args": ["codex-mcp-agent@latest", "--yolo"]
}
}
}Or use Claude Code commands:
# Safe mode (default)
claude mcp add codex-mcp-agent -- uvx codex-mcp-agent@latest
# Writable mode
claude mcp add codex-mcp-agent -- uvx codex-mcp-agent@latest --yoloRelated MCP server: Codex MCP Server
Tools
The MCP server exposes two tools:
codex_execute(prompt, work_dir)- General purpose codex executioncodex_review(review_type, work_dir, target?, prompt?)- Specialized code review
If you have any other use case requirements, feel free to open issue.
HTTP/SSE Mode (Optional)
For local personal use, you can run the server over HTTP with Server-Sent Events (SSE) and connect via type: "sse".
Start the server in SSE mode:
uvx codex-mcp-agent@latest --sse # safe mode, localhost:8822
uvx codex-mcp-agent@latest --sse --yolo # writable mode
# Options
# --host (default: 127.0.0.1)
# --port (default: 8822)Configure your client .mcp.json:
{
"mcpServers": {
"codex": {
"type": "sse",
"url": "http://127.0.0.1:8822"
}
}
}Notes:
SSE mode keeps the same Safe/Writable behavior controlled by
--yolo.SSE server binds to
127.0.0.1by default and has no auth/CORS for simplicity.Stdio mode remains the default; use
--sseonly if you prefer HTTP.
Optional: Streamable HTTP transport (if your client supports it):
uvx codex-mcp-agent@latest --http # safe mode streamable-http transportSafety
Safe Mode: Default read-only operations protect your environment
Writable Mode: Use
--yoloflag when you need full codex capabilitiesSequential Execution: Prevents conflicts from parallel agent operations
Available Tools
3 toolscodex_executeD
Execute prompt using codex for general purpose.
Inputs: prompt (required), work_dir (required), ctx (required). Returns: result
codex_researchA
Produce an analysis report around a topic using the repository code.
Args:
system_prompt: High-level system guidance for the research process.
work_dir: Repository/workspace directory to analyze.
topic: Investigation topic or question to answer.
Inputs: system_prompt (required), work_dir (required), topic (required), ctx. Returns: result
codex_reviewC
Execute code review using codex with pre-defined review prompts.
Inputs: review_type (required), work_dir (required), target, prompt, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a distinct activity: general execution, repository research, and code review. No overlap in purpose.
All tools follow a consistent 'codex_verb' pattern (execute, research, review), making them predictable and easy to distinguish.
Three tools is well-scoped for a focused Codex-based agent, covering key functionalities without bloat.
The tools cover general execution, research, and code review, but could benefit from additional tools like code generation or explanation to fully round out the domain.
Maintenance
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Safe folder access for ChatGPT and Claude: read, write and search files, risky tools opt-in.
Live SEO workflow tools for Claude Code, Codex, and AI agents.
No-data MCP handoff for local Claude Code to Codex harness moves. $49 lifetime.
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
- 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
- AlicenseNot gradedqualityDmaintenanceEnables Talon agents to delegate autonomous coding tasks to OpenAI Codex, supporting multi-step code operations with configurable sandboxing and approval policies.MIT