← Back to directory
A

Ask Codex MCP Server

Community
Bridge Claude to the OpenAI Codex CLI for code review and a second opinion from another model.
Category
Dev Tools #227 of 438
Stars
★ 18 Very popular
Transport
stdio (local process)
Runtime
Node.js 20+
Credentials
API key / credential required
License
MIT
Last commit
Tools
1
52FMRS · D

A narrowly scoped MCP server exposing one tool, ask-codex, over stdio that connects a host AI assistant to the OpenAI Codex CLI for code review, plan debate, and second opinions, defaulting to gpt-6-astra with a gpt-5.6-terra quota fallback. Installation is a single npx command and sessions can be resumed. Note that it is unofficial, reviewed code leaves your machine to reach Codex, and usage stats are in-memory only; for offline or very large-context work, choose the sibling Ollama, Gemini, or Antigravity servers instead.

Strongest · Documentation 12/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
11/20
Maintenance
10/20
Documentation
12/20
Setup experience
11/20
Why each score
Reliability 8/20
Static review covers only packages/codex-mcp/server.json plus the README passages it references. The manifest is structurally valid (schema reference, npm registryType, stdio transport, version 0.2.0) and declares two optional environment variables with defaults (GMCPT_TIMEOUT_MS=300000, GMCPT_LOG_LEVEL=warn), which is a genuine positive signal for controllable timeouts and logging. However, the supplied material contains no committed tests, no verifiable CI artifacts, and no reproducible startup or init/tools-list handshake evidence for this specific server; stars and badges are not evidence. The manifest also does not declare the tool list, error codes, or dependency version constraints, so tool-vs-behavior consistency cannot be checked. The Codex CLI is an external dependency requiring separate install and authentication. Per the static calibration ceiling (reliability <=12 without real CI plus committed tests covering key paths), 8 is scored: the happy path is plausible but testing and failure diagnosis are entirely invisible, and the README's claimed Codex quota fallback cannot be verified.
Security and permissions 11/20
No red line is triggered: no malware, no credential theft, no covert exfiltration, no irreversible delete/pay/deploy/remote-command defaults without confirmation, and no real tokens in install examples. The manifest exposes only two non-sensitive variables (timeout, log level), both isSecret=false and internally consistent. On data boundaries, the README states that this server sends prompts to the OpenAI Codex CLI (external network and third-party model processing) and that Ollama is the local path; however, for ask-codex specifically the supplied evidence provides no data-flow disclosure, no workspace read/write scope, no confirmation mechanism, and no least-privilege statement. The 5-minute default timeout and log level are security-neutral. Because scope, file-write capability, and session persistence location are unverifiable, and external-model transfer lacks auditable explicit confirmation, points are deducted; no red line was found, so the score stays above 4.
Maintenance 10/20
The repository is not archived, is MIT licensed, and the README links to issues and CONTRIBUTING.md while showing release/CI badges and an npm org migration to @ask-llm/*, indicating ongoing work and a versioned evolution (manifest at 0.2.0). What cannot be verified from the supplied material: commit cadence, issue responsiveness (18 stars / 11 open issues are discovery signals only and add nothing), dependency update policy, security-response channel, and whether the release process is reproducible. Scored at the 'active but governance/versioning gaps' anchor of 10: license and update path are visible, while ownership, security response, and release verifiability are missing evidence.
Documentation 12/20
The README has good breadth: installation across Claude Code, Cursor, Codex CLI, Claude Desktop, and generic stdio; per-provider prerequisites and default/fallback models; a tool table; doctor/repl CLI usage; a package migration table; a docs site and llms.txt; plus disclosed limitations (Grok/Ollama never auto-fallback, Gemini CLI enterprise gating, Antigravity experimental and one-shot). But documentation specific to the scored artifact, ask-codex, is thin: tool parameters and response shape (outputSchema, first-call sessionId "" for resumable threads) are only summarized in generic sections, with no itemized parameter table, error semantics, cost/quota detail, or server-specific troubleshooting, and no tool schemas appear in the manifest. This fits 'usable but with hidden assumptions and troubleshooting gaps', hence 12.
Setup experience 11/20
The install path is clear: npx -y @ask-llm/codex-mcp or the unified package, with config examples for mainstream clients (.cursor/mcp.json, ~/.codex/config.toml, claude_desktop_config.json, claude mcp add), a doctor self-check command, and stated prerequisites of Node 20+ on Linux or macOS. Deductions: an additional external Codex CLI install and login is required and the README only says 'Install and sign in' without step-by-step guidance; platform coverage omits Windows; the two environment variables are optional and not strictly needed; and there is no end-to-end connectivity evidence for the scored server (no committed tests or CI evidence), so under the static ceiling of 15 this is scored 11.

Static review · not runReviewed 2026-09-25

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesRuns commands or codeUses the network

Best for

  • Developers already using the OpenAI Codex CLI who want to reuse its quota
  • Teams that want cross-model second opinions inside Claude Code, Cursor, or similar assistants
  • Reasoning-heavy code reviews and architecture critique on specific files

Not for

  • Users without an OpenAI/Codex account or unable to install the Codex CLI
  • Anyone needing fully offline, zero-cost review (use the Ollama provider instead)
  • Users who need 1M+ token whole-codebase reads (use the Gemini or Antigravity provider)
  • Users expecting persisted per-session or cross-session usage accounting (usage stats are in-memory only)

Required permissions

  • Execute the Codex CLI locally and use network access to reach Codex services
  • Read the files being reviewed and send their contents to the Codex CLI as prompts
  • Write MCP server configuration into client config files/directories
  • Optionally read the GMCPT_TIMEOUT_MS and GMCPT_LOG_LEVEL environment variables

Risks and side effects

  • Reviewed code is sent to the remote service behind the Codex CLI, which may conflict with data-egress policies
  • Codex CLI model and quota behavior is controlled upstream; documented defaults (gpt-6-astra → gpt-5.6-terra) can change
  • Omitting sessionId: "" on the first call yields a non-resumable one-shot session, which can be confusing
  • Unofficial third-party tool with no affiliation with or endorsement by Anthropic, OpenAI, or other vendors
  • Long reviews can exceed the default 5-minute timeout and be cut off

Setup

Before you start

Runtime:Node.js 20+

Other optional settings (2)
GMCPT_TIMEOUT_MS optional Timeout for Codex CLI execution in milliseconds; default is 300000 (5 minutes).
GMCPT_LOG_LEVEL optional Log verbosity: debug, info, warn, or error; default is warn.
  1. Ensure Node.js 20+ is installed on Linux or macOS.
  2. Install and sign in to the OpenAI Codex CLI.
  3. Register the server with an MCP client. For Claude Code: claude mcp add --scope user codex -- npx -y @ask-llm/codex-mcp.
  4. For any other MCP client (STDIO), use: {"command": "npx", "args": ["-y", "@ask-llm/codex-mcp"]}.
  5. Optional environment variables: GMCPT_TIMEOUT_MS (Codex CLI execution timeout, default 300000 ms) and GMCPT_LOG_LEVEL (debug/info/warn/error, default warn).
  6. Try it in the client: ask codex to review my last commit.
.mcp.json
{
  "mcpServers": {
    "codex": {
      "command": "npx",
      "args": ["-y", "@ask-llm/codex-mcp"]
    }
  }
}

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "codex": {
      "command": "npx",
      "args": [
        "-y",
        "@ask-llm/codex-mcp"
      ]
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add codex -- npx -y @ask-llm/codex-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

The ask-codex tool should appear in your MCP client's tool list; sending "ask codex to review my last commit" and getting a Codex review back confirms the connection works.

Troubleshooting

  1. Run npx @ask-llm/mcp doctor to check Node version, PATH resolution, and provider CLI presence and versions
  2. Confirm the Codex CLI is installed and authenticated; a missing login makes every call fail
  3. If reviews run long, raise GMCPT_TIMEOUT_MS (default 300000 ms)
  4. For multi-turn work, pass sessionId: "" on the first call and reuse the returned sessionId afterwards
  5. Set GMCPT_LOG_LEVEL to debug for more detailed diagnostics
  6. If you still use the old package name ask-codex-mcp, switch to @ask-llm/codex-mcp (executable names are unchanged)

Things to try

Once connected, you can ask your AI assistant things like:

  • Ask codex to review src/auth.ts for security issues
  • Get a second opinion from codex on this architecture
  • Have codex review my last commit
  • Ask codex to catch the bug the first model missed in this diff

Tools 1

ask-codex read-only
Run a prompt through the OpenAI Codex CLI for code review, plan debate, or a second opinion. Uses gpt-6-astra by default with a gpt-5.6-terra fallback; omit sessionId for one-shot use or pass sessionId: "" first to persist and resume a session.

Use cases

Have another model review a diff and surface issues the primary AI missed
Get critique, alternatives, and trade-off analysis on an architecture proposal before committing
Targeted security review of sensitive code such as authentication logic by Codex
Compare responses across providers side by side (with the unified server and multi-llm)

Supported clients

Claude Code
Cursor
Codex
Claude Desktop

Listed from the project's documentation, not tested by this site.

Overview

Ask Codex is the Codex-only MCP server from the Ask LLM project (npm package @ask-llm/codex-mcp, version 0.2.0). It exposes a single tool, ask-codex, over stdio and bridges host AI assistants (Claude Code, Cursor, Claude Desktop, Codex CLI, and other of the 40+ MCP clients) to the OpenAI Codex CLI for AI-to-AI collaboration: reviewing diffs, critiquing plans, and getting an independent second opinion before committing. The default model is gpt-6-astra with a gpt-5.6-terra fallback when quota runs out. The tool optionally accepts a sessionId and returns a structured AskResponse (provider, response, model, sessionId, usage); Codex requires sessionId: "" on the first call to start a resumable thread, and omitting sessionId gives one-shot behavior. It is community-maintained and not officially affiliated with Anthropic, OpenAI, or any other vendor.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 62.4k · Tools 2 Compare with this →

Data synced 2026-09-25 Read the FMRS scoring method