Skip to main content
Glama

mcp-codexreview

npm version License: MIT

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/codex CLI installed and available on $PATH

  • Codex configured with an API key (via ~/.codex/config.toml or environment)

Related MCP server: codex-code-review

Installation

Claude Code

claude mcp add codexreview -- npx -y mcp-codexreview

Claude 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.js

MCP Tools

review_changes

Run Codex to review git changes. Codex reads the diff and provides a thorough code review.

Parameter

Type

Required

Description

type

"unstaged" | "staged" | "last_commit"

yes

Which changes to review

cwd

string

no

Git repo path (default: server working directory)

model

string

no

Override Codex model (e.g. "o3", "gpt-4.1")

instructions

string

no

Additional review focus or instructions

get_diff

Get raw git diff output without invoking Codex.

Parameter

Type

Required

Description

type

"unstaged" | "staged" | "last_commit"

yes

Which changes to diff

path

string

no

Filter to specific file or directory

cwd

string

no

Git repo path

get_changed_files

List changed files with their status (M/A/D/R).

Parameter

Type

Required

Description

type

"unstaged" | "staged" | "last_commit"

yes

Which changes to list

cwd

string

no

Git repo path

How It Works

The review_changes tool spawns codex exec with:

  • -C <cwd> to target the git repo

  • -s read-only sandbox (Codex can read files and run git, but cannot modify)

  • -a on-failure for non-interactive execution

  • --output-last-message <tmpfile> to capture the review text

  • --color never for 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

Available Tools

3 tools
get_changed_filesA

List files. For git repos lists changed files; for plain directories lists all source files as added.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoPath to the directory or git repository (defaults to server working directory)
typeNoWhich changes to list. Only used for git repos.

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses a key non-obvious behavior: in plain directories, files are listed with an 'added' status. This goes beyond a simple 'list files' statement. Lacks details on side effects or return format, but for a read-only listing tool this is a moderate gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, well-structured sentence with no redundancy. The opening verb is direct, and the conditional clause adds critical differentiation without bloat.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Without an output schema or annotations, the description leaves important operational gaps: what counts as a 'source file', whether the list is recursive, and what the default 'type' is when omitted for git repos. It covers the two main modes but is not sufficiently complete for an agent to invoke the tool confidently in all cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and both parameters have descriptions. The tool description adds contextual nuance (e.g., that 'type' only matters for git repos and that plain directories always list as 'added'), but it does not provide additional syntax or format details beyond the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a clear verb ('List'), resource ('files'), and scope ('changed files' in git, 'all source files as added' in plain directories). This distinguishes it from siblings like get_diff (which likely returns diffs) without needing to name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides context that the tool behaves differently for git repos versus plain directories, implying when it is useful. However, it does not mention alternatives (e.g., get_diff, review_changes) or give explicit when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_diffA

Get diff output. For git repos returns git diff; for plain directories returns file contents in unified diff format.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoPath to the directory or git repository (defaults to server working directory)
pathNoFilter diff to a specific file or directory
typeNoWhich changes to diff. Only used for git repos.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds meaningful context by stating that git repos yield 'git diff' while plain directories return 'file contents in unified diff format'. However, it does not explicitly mention read-only nature, potential error conditions, or any dependencies (e.g., git being installed), leaving some gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a compact two sentences with the primary action front-loaded. It efficiently conveys the tool's dual behavior without unnecessary details, earning every word.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with well-documented parameters and no output schema, the description covers the key contextual nuance of git versus non-git behavior. It is adequate but could be more explicit about the output type (e.g., a text string), so it does not reach full completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage for all three parameters with clear descriptions, including the 'type' enum's git-only usage. The description adds no additional parameter semantics beyond what the schema already specifies, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Get diff output' with a specific resource (diff). It further distinguishes behavior for git repos versus plain directories, differentiating it from sibling tools like review_changes and get_changed_files, which handle review and file listing respectively.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context about usage by explaining what happens in git repos versus plain directories, helping the agent decide when to use it. However, it does not explicitly name alternatives or state when not to use the tool, so it falls short of full usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

review_changesA

Review code using OpenAI Codex. Works with git repos (reviews diff) or plain directories (reviews all source files).

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoPath to the directory or git repository (defaults to server working directory)
typeNoWhich changes to review: unstaged working-tree changes, staged (cached) changes, or the last commit. Only used for git repos.
modelNoOverride the Codex model (e.g. "o3", "gpt-4.1")
instructionsNoAdditional review focus or instructions to append to the review prompt

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears the full burden of disclosing behavioral traits. It reveals that the tool uses an external AI service (OpenAI Codex) but does not mention important traits like non-destructiveness, network/cost implications, privacy considerations, or what the output looks like. The two-mode behavior is useful but insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences that front-load the core purpose and quickly explain the two operational modes. Every sentence adds value, with no unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains the core functionality and two usage modes, and the schema covers all parameters. However, with no output schema and no annotations, the description is incomplete regarding what the tool returns, potential side effects, and external service implications. It is adequate but leaves clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage with clear descriptions for all four parameters, so the baseline is 3. The description reinforces the diff vs. all-files distinction relevant to the 'type' parameter but does not add additional semantic meaning beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool reviews code using OpenAI Codex and distinguishes it from retrieval-only sibling tools by specifying it works on git diffs or all files in plain directories. The verb 'review' plus the two operation modes give a precise, specific purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool (for code review) and explains the two modes (git repos vs. plain directories), but it does not explicitly contrast it with get_diff or get_changed_files, nor does it state when not to use it. This is useful contextual guidance but lacks explicit alternatives or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.3
    • First observedget_changed_files
    • First observedget_diff
    • First observedreview_changes

TDQS

A4.1/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: reviewing code, retrieving the diff, and listing changed files. There is no overlap that would confuse an agent.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: review_changes, get_diff, get_changed_files. The naming is uniform and predictable.

Tool Count5/5

Three tools is well-scoped for a code review server, covering the essential workflow without unnecessary bloat. Each tool earns its place.

Completeness5/5

The tool set provides a complete workflow: identify changed files, retrieve the diff, and review the changes. No critical operations are missing for the stated purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Enables code review operations on GitHub and GitLab, including fetching pull/merge requests, viewing diffs, adding comments, analyzing code quality, and creating merge requests directly from your MCP client.
    15
    11
    4
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides 15 MCP tools for AI-powered Git intelligence, enabling commit messages, branch creation, PR descriptions, code review, diff analysis, and push operations directly from your AI assistant.
    MIT

Latest Blog Posts

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