🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@ask-llm/codex-mcp

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ask-llm/codex-mcp

MCP server for OpenAI Codex CLI integration - for Claude IDE and other IDEs

latest
Source
npmnpm
Version
0.7.3
Version published
Maintainers
1
Created
Source

Ask Codex MCP

npm version npm downloads License: MIT

MCP server that connects any AI client to OpenAI Codex CLI

An MCP server for AI-to-AI collaboration via the Codex CLI. Works with Claude Code, Claude Desktop, Cursor, Warp, Copilot, and 40+ other MCP clients. Access GPT-5.5 for code generation, analysis, and review with automatic fallback to GPT-5.4-mini on quota limits.

Part of the Ask LLM monorepo.

Quick Start

Claude Code

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

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "codex": {
      "command": "npx",
      "args": ["-y", "@ask-llm/codex-mcp"]
    }
  }
}

Any MCP Client

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

Prerequisites

  • Node.js v20.0.0 or higher
  • Codex CLI installed and authenticated

Tools

ToolPurpose
ask-codexSend prompts to Codex CLI. Defaults to GPT-5.6 Sol at medium effort with automatic Terra fallback; optional reasoningEffort override
pingConnection test — verify MCP setup without using tokens

Codex calls are ephemeral when sessionId is omitted. Pass sessionId: "" on the first call to persist a resumable thread, then pass its returned Thread ID on follow-up calls.

Models

ModelUse Case
gpt-5.6-solDefault — flagship capability
gpt-5.6-terraAutomatic balanced fallback on quota errors

Environment variables

VariableDefaultPurpose
ASK_CODEX_MODELgpt-5.6-solOverride the default model
ASK_CODEX_PREFERRED_MODELgpt-5.6-solLegacy review-tier escape hatch; only attempted separately when it differs from the default
ASK_CODEX_FALLBACK_MODELgpt-5.6-terraOverride the quota-fallback model
ASK_CODEX_REASONING_EFFORTmediumDefault reasoning effort (low, medium, high, xhigh, or max); per-call reasoningEffort wins
ASK_CODEX_LOAD_USER_CONFIG(unset)Set to 1 to opt back into loading ~/.codex/config.toml (hooks, MCP servers, preferences) and execpolicy .rules files. By default the wrapper passes --ignore-user-config --ignore-rules so behavior stays deterministic across host machines. Auth credentials in CODEX_HOME always load regardless. See ADR-071.
ASK_CODEX_TIMEOUT_MS800000Per-call timeout for the spawned codex process (13.3 min — reasoning models routinely take 5–10 min on substantive prompts; raised in ADR-074)
GMCPT_TIMEOUT_MS(unset)Cross-provider timeout override; lower precedence than ASK_CODEX_TIMEOUT_MS
GMCPT_LOG_LEVELwarndebug, info, warn, or error

Documentation

Full docs at lykhoyda.github.io/ask-llm

License

MIT

Keywords

mcp

FAQs

Package last updated on 03 Aug 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts