The `mcp-codex-worker` package provides a stdio MCP server that acts as a bridge between MCP clients and the Codex app-server runtime. It offers a set of five specialized task tools (`spawn-task`, `wait-task`, `respond-task`, `message-task`, `cancel-task`) designed for orchestrating fully autonomous AI agents. A key differentiator is its automatic approval mechanism for all Codex commands, file changes, elicitation requests, and permission requests, enabling unassisted task execution. The worker delegates all direct OpenAI API interactions to the `codex app-server` and exclusively supports `gpt-5.4` models, allowing users to specify reasoning levels like `medium` or `xhigh`. It provides comprehensive observability through file-backed reporting (including `meta.json`, `summary.log`, `verbose.log`, `events.jsonl`) and MCP resource subscriptions. The current stable version is `1.0.34`.
npm install mcp-codex-workerNo compatibility data collected yet for this library.
Demonstrates how to install the `mcp-codex-worker` using `npx` and integrate it as an MCP server within a Claude Code environment, including how an agent would hypothetically invoke its task tools.
Upgrade your Node.js environment to version 22.0.0 or later using a tool like nvm (Node Version Manager) or by updating your system's Node.js installation.
Understand the security implications and only use this worker in secure, isolated environments where full autonomy and auto-approval are desired. Be aware that only `user_input` and `dynamic_tool` requests will pause the task.
Ensure `CODEX_LB_API_KEY` or `OPENAI_API_KEY` is correctly configured in the environment variables passed to the worker process (e.g., in the `env` block of your `mcpServers` configuration for Claude Code).
Ensure your agent explicitly requests `gpt-5.4` and one of the specified `reasoning` parameters (e.g., `gpt-5.4(medium)`) when invoking `spawn-task`.
Upgrade your Node.js environment to version 22 or later. For example, using nvm: `nvm install 22 && nvm use 22`.
Set one of the required API keys. For Claude Code configuration, ensure it's defined in the `env` block: `"env": { "CODEX_LB_API_KEY": "${CODEX_LB_API_KEY}" }`.This specific error should not occur with `mcp-codex-worker` if configured correctly. If it does, check the worker's verbose logs (`~/.mcp-codex-worker/tasks/<task-id>/verbose.log`) for unexpected behavior or conflicts, or verify the worker is correctly configured and running within its expected environment.
Modify your agent's task spawning logic to explicitly request `gpt-5.4` and one of its supported `reasoning` values (e.g., `gpt-5.4(medium)` or `gpt-5.4(high)`).