Skip to main content
Glama

Codex Validator MCP

Validate your implementation plans before writing a single line of code.

An MCP server that lets Claude Code delegate plan validation to OpenAI Codex, catching architectural issues, missing dependencies, and best practice violations before implementation begins.

Why?

You've spent time crafting a detailed implementation plan. Before Claude Code executes it:

  • Catch blockers early — Missing dependencies, incompatible versions, architectural conflicts

  • Get a second opinion — Codex analyzes feasibility from a fresh perspective

  • Validate against best practices — Context7 checks your approach against official documentation

  • Estimate complexity — Know what you're getting into before committing

All without leaving your Claude Code workflow.

Related MCP server: claude-code-codex-agents

Quick Start

# Clone and build
git clone https://github.com/synergy2test/codex-validator-mcp.git
cd codex-validator-mcp
npm install && npm run build

# Authenticate Codex CLI (one-time, opens browser)
npm install -g @openai/codex
codex login

Add to Claude Code settings (~/.claude/settings.json):

{
  "mcpServers": {
    "codex-validator": {
      "command": "node",
      "args": ["/path/to/codex-validator-mcp/dist/index.js"]
    }
  }
}

That's it. Now in Claude Code:

Validate my PLAN.md before we implement it

What You Get

{
  "validation_status": "warn",
  "feasibility": {
    "score": 72,
    "blockers": [],
    "risks": ["React 18 concurrent features may conflict with existing state management"],
    "dependencies_missing": ["@tanstack/react-query"]
  },
  "code_review": {
    "suggestions": ["Consider error boundaries for async components"],
    "best_practice_violations": ["Direct DOM manipulation in useEffect"]
  },
  "implementation_analysis": {
    "completeness": 85,
    "gaps": ["No rollback strategy defined"],
    "estimated_complexity": "medium"
  }
}

Plus a human-readable validation-report.md saved to your project.

How It Works

┌─────────────┐     ┌──────────────────┐     ┌─────────────┐
│ Claude Code │────▶│ Codex Validator  │────▶│ Codex CLI   │
│             │     │    MCP Server    │     │ (your quota)│
└─────────────┘     └────────┬─────────┘     └─────────────┘
                             │
                             ▼
                    ┌─────────────────┐
                    │    Context7     │
                    │ (best practices)│
                    └─────────────────┘
  1. Claude Code sends your plan to the MCP server

  2. Server passes it to Codex CLI for analysis (uses your OpenAI Pro quota)

  3. Context7 validates against framework/library best practices

  4. You get structured feedback before implementation

Automatic Fallback

When your Codex Pro quota runs out mid-month, the server automatically falls back to direct OpenAI API calls. Just set:

export OPENAI_API_KEY="sk-..."

You'll be notified when fallback activates (API costs may apply).

Tool Parameters

Parameter

Type

Default

Description

plan_path

string

—

Path to your plan file

plan_content

string

—

Or pass plan content directly

project_path

string

cwd

Project root for context

apply_changes

boolean

false

Apply suggestions (with confirmation)

Apply Mode

Want Codex to fix issues it finds?

Validate PLAN.md with apply_changes: true

You'll be prompted to confirm each change before it's applied.

Optional: Context7 API Key

For higher rate limits on best practices lookups:

export CONTEXT7_API_KEY="your-key"  # Free at context7.com/dashboard

Works fine without it—just with lower rate limits.

Requirements

  • Node.js 18+

  • OpenAI Codex CLI (npm install -g @openai/codex)

  • OpenAI account with Pro plan (or API key for fallback)

License

MIT

Available Tools

1 tool
validate_planA

Validate an implementation plan using OpenAI Codex CLI with Context7 best practices integration.

This tool analyzes implementation plans for:

  • Technical feasibility (blockers, dependencies, architectural issues)

  • Code review suggestions (patterns, improvements, anti-patterns)

  • Implementation completeness (gaps, complexity estimation)

  • Best practices compliance (via Context7)

Primary execution uses Codex CLI (authenticated via browser OAuth). Falls back to OpenAI API when Pro quota is exhausted.

Parameters:

  • plan_path: Path to plan file (e.g., ./PLAN.md)

  • plan_content: Direct plan content as a string

  • project_path: Root directory for context (defaults to cwd)

  • apply_changes: If true, apply suggested changes (default: false)

  • require_confirmation: If apply_changes=true, require user confirmation (default: true)

At least one of plan_path or plan_content must be provided.

Inputs: plan_path, plan_content, project_path, apply_changes, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 1 tool

    Disambiguation4/5

    With only one tool, there is no cross-tool selection ambiguity for an agent to resolve. The tool does bundle several internal modes (analyze, apply changes, confirmation flow) into a single entry point, but that is a parameter-design issue rather than a disambiguation one.

    Naming Consistency4/5

    validate_plan follows a clear snake_case verb_noun convention and is self-describing. With a single name there is no pattern to be inconsistent with, so it cannot reach a demonstrated 5.

    Tool Count3/5

    The stated purpose is narrow (validate an implementation plan), so one tool is defensible, but it is thin: a single tool carrying four analysis dimensions plus an apply-changes mode suggests the surface could reasonably expose a report/status or config operation.

    Completeness3/5

    The core action (submit a plan, receive validation, optionally apply suggestions) is covered, including the path/content input alternatives and API fallback. However, there is no way to retrieve or query prior validation results, list/re-validate plans, or check Codex/Context7 availability, leaving agents at a dead end after the single call.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers