codex-worker-runtime
Enables Codex to delegate bounded work to external LLMs through role-based MCP tools, with worker health checks and audit logging.
README
Codex Worker Runtime
Role-based external LLM delegation for Codex.
Codex stays the orchestrator and delegates bounded work through four MCP tools:
delegate_worklist_workersworker_healthget_worker_run
Current routes
| Role | Worker | Adapter |
|---|---|---|
code_review |
qwen |
OpenAI-compatible API |
x_research |
grok |
guarded Grok CLI |
planning |
kimi |
opencodex Responses API |
research |
kimi |
opencodex Responses API |
Kimi is reached only through the worker runtime. The main Codex provider, history, CLI shim, account pool, and native subagent catalog do not need to be changed.
Guarantees
- External workers cannot edit local files or execute Codex commands.
secretandcredentialrequests are rejected before dispatch.- Worker results are normalized into a stable transport and semantic contract.
completed + rejectedis preserved and is never overwritten by another provider.- Unavailable or timed-out workers return control to Codex according to policy.
- Requests, attempts, and results are stored in a local SQLite audit ledger.
- Prepared requests and raw provider responses stay out of the normal result.
Configuration
The runtime loads the first available policy:
CODEX_WORKER_CONFIG~/.codex/codex-worker-runtime/workers.toml- bundled
config/workers.toml
Relative worker commands are resolved from the policy file. ~/ paths expand
to the current user home directory.
The bundled policy expects:
- an OpenAI-compatible Qwen endpoint at
http://127.0.0.1:8081 - Grok Build installed at
~/.grok/bin/grok - Grok privacy settings that pass
runtime/grok/grok_privacy_guard.py - opencodex listening on
127.0.0.1:10100with thekimiprovider authenticated
Start only the local proxy server used by the Kimi worker, without Codex model injection, history synchronization, a CLI shim, or a background service:
npm run start:kimi-proxy
To keep a custom policy outside the plugin, copy the file, update any relative
worker commands for its new location, and set CODEX_WORKER_CONFIG to its
absolute path.
Development
npm install
npm run check
npm run test:all
Local personal-plugin install
The installer creates named backups, stages the plugin, verifies source/target/cache hashes, and checks plugin activation.
node scripts/install-personal.mjs --dry-run
node scripts/install-personal.mjs
Optional environment variables:
CODEX_WORKER_CODEX_ROOTCODEX_WORKER_CODEX_CLICODEX_WORKER_INSTALL_TARGETCODEX_WORKER_MARKETPLACECODEX_WORKER_AUDIT
Coexistence with opencodex
opencodex and Codex Worker Runtime can coexist because they operate at different layers:
- opencodex proxies the main Codex Responses API transport.
- Codex Worker Runtime delegates selected roles through MCP.
Recommended policy:
- keep the main Codex provider explicit
- avoid routing the same job to both a native routed subagent and an MCP worker
- review
~/.codex/config.tomlafter runningocx initor installing its shim - let only one installer manage the Codex provider configuration and CLI shim
- keep credentials in each provider's own configuration; do not copy them into
workers.toml
The runtime uses stdio MCP and does not bind opencodex's default port 10100.
Its bundled Qwen example uses port 8081.
Adding a worker
- Add the worker and role to
config/workers.toml. - Reuse an existing adapter or add a dedicated adapter.
- Normalize the response into the common result contract.
- Add health, timeout, failure, audit, and redaction tests.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。