ask-codex-mcp
v0.3.9
Published
MCP server for OpenAI Codex CLI integration - for Claude IDE and other IDEs
Maintainers
Readme
Ask Codex MCP
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.5-mini on quota limits.
Part of the Ask LLM monorepo.
Quick Start
Claude Code
claude mcp add codex -- npx -y ask-codex-mcpClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"codex": {
"command": "npx",
"args": ["-y", "ask-codex-mcp"]
}
}
}Any MCP Client
{
"command": "npx",
"args": ["-y", "ask-codex-mcp"]
}Prerequisites
Tools
| Tool | Purpose |
|------|---------|
| ask-codex | Send prompts to Codex CLI. Defaults to GPT-5.5 with automatic mini fallback |
| ping | Connection test — verify MCP setup without using tokens |
Models
| Model | Use Case |
|-------|----------|
| gpt-5.5 | Default — highest capability |
| gpt-5.5-mini | Automatic fallback on quota errors |
Environment variables
| Variable | Default | Purpose |
|----------|---------|---------|
| ASK_CODEX_MODEL | gpt-5.5 | Override the default model |
| ASK_CODEX_FALLBACK_MODEL | gpt-5.5-mini | Override the quota-fallback model |
| 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. |
| GMCPT_TIMEOUT_MS | 210000 | Per-call timeout for the spawned codex process |
| GMCPT_LOG_LEVEL | warn | debug, info, warn, or error |
Documentation
Full docs at lykhoyda.github.io/ask-llm
License
MIT
