mcp-codexreview
mcp-codexreview
MCP server that runs OpenAI Codex CLI (codex exec) to review git changes. Any MCP client (Claude Code, etc.) can request a Codex-powered code review of unstaged, staged, or last-commit changes.
Prerequisites
Node.js 18+
@openai/codexCLI installed and available on$PATHCodex configured with an API key (via
~/.codex/config.tomlor environment)
Installation
Claude Code
claude mcp add codexreview -- npx -y mcp-codexreviewClaude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"codexreview": {
"command": "npx",
"args": ["-y", "mcp-codexreview"]
}
}
}Install from Source
git clone https://github.com/signal-slot/mcp-codexreview.git
cd mcp-codexreview
npm install
npm run build
claude mcp add codexreview -- node /path/to/mcp-codexreview/build/index.jsMCP Tools
review_changes
Run Codex to review git changes. Codex reads the diff and provides a thorough code review.
Parameter | Type | Required | Description |
|
| yes | Which changes to review |
|
| no | Git repo path (default: server working directory) |
|
| no | Override Codex model (e.g. |
|
| no | Additional review focus or instructions |
get_diff
Get raw git diff output without invoking Codex.
Parameter | Type | Required | Description |
|
| yes | Which changes to diff |
|
| no | Filter to specific file or directory |
|
| no | Git repo path |
get_changed_files
List changed files with their status (M/A/D/R).
Parameter | Type | Required | Description |
|
| yes | Which changes to list |
|
| no | Git repo path |
How It Works
The review_changes tool spawns codex exec with:
-C <cwd>to target the git repo-s read-onlysandbox (Codex can read files and run git, but cannot modify)-a on-failurefor non-interactive execution--output-last-message <tmpfile>to capture the review text--color neverfor clean output
The review prompt instructs Codex to run the appropriate git diff command and provide a code review covering correctness, style, performance, security, and improvement suggestions.
License
MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/signal-slot/mcp-codexreview'
If you have feedback or need assistance with the MCP directory API, please join our Discord server