Codex As Mcp
About
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.
Details
- Author
- kky42
- Downloads
- 409
- Categories
- Developer Tools
Jump to
- Exposes two tools: codex_execute and codex_review
- Safe Mode (read‑only) and Writable Mode (--yolo)
- Sequential execution prevents agent conflicts
- Works with Claude Code, Cursor, and other AI tools
- No extra costs for eligible Codex subscribers
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
Codex As 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
First install the Codex CLI globally via npm and log in. Then add the server to your MCP configuration (.mcp.json) using uvx codex-as-mcp@latest. For writable (full‑capability) mode include the --yolo flag. Alternatively, use claude mcp add commands from the terminal.
codex_execute
Execute prompt using codex for general purpose. Args: prompt (str): The prompt for codex work_dir (str): The working directory, e.g. /Users/kevin/Projects/demo_project ctx (Context): MCP context for logging
codex_review
Execute code review using codex with pre-defined review prompts for different scenarios. This tool provides specialized code review capabilities for various development scenarios, combining pre-defined review templates with custom instructions. Args: review_type (str): Type of code review to perform. Must be one of: - "files": Review specific files for code quality, bugs, and best practices Target: comma-separated file paths (e.g., "src/main.py,src/utils.py") Example: review_type="files", target="src/auth.py,src/db.py" - "staged": Review staged changes (git diff --cached) ready for commit Target: not needed (automatically detects staged changes) Example: review_type="staged" - "unstaged": Review unstaged changes (git diff) in working directory Target: not needed (automatically detects unstaged changes) Example: review_type="unstaged" - "changes": Review specific commit range or git changes Target: git commit range (e.g., "HEAD~3..HEAD", "main..feature-branch") Example: review_type="changes", target="HEAD~2..HEAD" - "pr": Review pull request changes comprehensively Target: pull request number or identifier Example: review_type="pr", target="123" - "general": General codebase review for architecture and quality Target: optional, can specify scope or leave empty for full codebase Example: review_type="general", target="src/" work_dir (str): The working directory path (e.g., "/Users/kevin/Projects/demo_project") target (str, optional): Target specification based on review_type: - For "files": comma-separated file paths - For "staged"/"unstaged": not needed (leave empty) - For "changes": git commit range (commit1..commit2) - For "pr": pull request number/identifier - For "general": optional scope (directory path or leave empty) prompt (str, optional): Additional custom instructions to append to the review prompt. Use this to specify particular aspects to focus on or additional context. Example: "Focus on security vulnerabilities and performance" ctx (Context, optional): MCP context for logging Returns: str: Detailed code review results from codex Examples: # Review specific files with security focus codex_review("files", "/path/to/project", "src/auth.py,src/api.py", "Focus on security vulnerabilities") # Review staged changes before commit codex_review("staged", "/path/to/project") # Review unstaged work-in-progress changes codex_review("unstaged", "/path/to/project", "", "Check for incomplete implementations") # Review recent commits codex_review("changes", "/path/to/project", "HEAD~3..HEAD", "Look for performance regressions") # Review pull request codex_review("pr", "/path/to/project", "456", "Focus on test coverage") # General codebase review codex_review("general", "/path/to/project", "src/", "Identify technical debt")
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"codex as mcp": {
"codex": {
"type": "stdio",
"command": "uvx",
"args": [
"codex-as-mcp@latest",
"--yolo"
],
"env": []
}
}
}
}
McpServers
{
"codex": {
"type": "stdio",
"command": "uvx",
"args": [
"codex-as-mcp@latest",
"--yolo"
],
"env": []
}
}
codex-as-mcp
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 login
2. Configure MCP
Add to your .mcp.json:
Safe Mode (Default):
{
"mcpServers": {
"codex": {
"type": "stdio",
"command": "uvx",
"args": ["codex-as-mcp@latest"]
}
}
}
Writable Mode:
{
"mcpServers": {
"codex": {
"type": "stdio",
"command": "uvx",
"args": ["codex-as-mcp@latest", "--yolo"]
}
}
}
Or use Claude Code commands:
```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.





