Basic information
About Codex As Mcp Server
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.
Codex As Mcp is a MCP server in the Developer Tools category listed in the AddMCP.net directory, published by kky42. It exposes 2 tools, including codex_execute, codex_review. Supported transport: stdio. Runtime: Python. License: MIT License. The repository has 177 GitHub stars. Source code is hosted on github.com. Related topics: claude, claude-code, codex, gpt-5, openai.
Setup
{
"mcpServers": {
"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": []
}
}
}
{
"servers": {
"codex": {
"type": "stdio",
"command": "uvx",
"args": [
"codex-as-mcp@latest",
"--yolo"
],
"env": []
}
}
}
Codex As Mcp config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"codex": {
"type": "stdio",
"command": "uvx",
"args": [
"codex-as-mcp@latest",
"--yolo"
],
"env": []
}
}
}
Codex As Mcp tools
-
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
prompt:string*, work_dir:string* -
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")
prompt:string, review_type:string*, target:string, work_dir:string*
Overview
What is Codex As Mcp?
Codex As Mcp is an MCP server that enables AI tools such as Claude Code and Cursor to call OpenAI Codex for task execution. It is designed for Plus, Pro, and Team subscribers who want to maximize GPT‑5 usage without incurring additional costs.
How to use Codex As Mcp?
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.
Key features of Codex As Mcp
- Exposes two tools:
codex_executeandcodex_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
Use cases of Codex As Mcp
- Run general‑purpose code tasks via an AI assistant
- Perform specialized code reviews with targeted prompts
- Integrate Codex’s capabilities into agentic workflows
Frequently asked questions
1 Which AI tools can use this server?
Claude Code, Cursor, and any other tool that supports the Model Context Protocol (MCP) can connect to Codex As Mcp.
2 What is the difference between Safe Mode and Writable Mode?
Safe Mode (default) restricts operations to read‑only for safety. Writable Mode (activated with --yolo) allows full Codex capabilities, including file modifications.
3 Do I need a Codex subscription?
Yes, this server is intended for Codex Plus, Pro, or Team subscribers. Using it can help maximize GPT‑5 usage without additional costs.
4 What runtime dependencies are required?
You must have Node.js installed to run npm install -g @openai/codex. The server itself is launched via uvx, which requires a compatible Python environment.
5 Can I create custom use cases beyond the provided tools?
The README invites users to open an issue if they have other use‑case requirements, implying the two built‑in tools can be extended upon request.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In