codex-mcp-tool
v2.7.0MCP server bridging AI assistants to OpenAI Codex CLI for code analysis and review
Values you need
| Variable | What it is | |
|---|---|---|
CODEX_MCP_CWD | optional | Override working directory for all tool calls |
CODEX_SESSION_TTL_MS | optional | Session time-to-live in milliseconds (default: 86400000 = 24h) |
CODEX_MAX_SESSIONS | optional | Maximum concurrent sessions (default: 50) |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add codex-mcp-tool -- npx -y --package=@trishchuk/codex-mcp-tool@2.7.0 codex-mcpAdd to
claude_desktop_config.json{
"mcpServers": {
"codex-mcp-tool": {
"args": [
"-y",
"--package=@trishchuk/codex-mcp-tool@2.7.0",
"codex-mcp"
],
"command": "npx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"codex-mcp-tool": {
"args": [
"-y",
"--package=@trishchuk/codex-mcp-tool@2.7.0",
"codex-mcp"
],
"command": "npx"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"codex-mcp-tool": {
"args": [
"-y",
"--package=@trishchuk/codex-mcp-tool@2.7.0",
"codex-mcp"
],
"command": "npx",
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.codex-mcp-tool]
command = "npx"
args = ["-y", "--package=@trishchuk/codex-mcp-tool@2.7.0", "codex-mcp"]For AI agents
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: ask-codex, batch-codex, review-changes, ping, help, version, brainstorm, fetch-chunk, ….
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json