Code Worker MCP
Enables Codex to offload expensive code reading, editing, and checking to a worker agent via Claude Code, supporting async jobs and long-running tasks.
README
Code Worker MCP
Code Worker MCP for Codex.
The host agent defines task boundaries and reviews results; the worker does the expensive code reading, editing, and checking through Claude Code plus a configured provider.
Repository:
- GitHub: HuangYuan360/code-worker-mcp
- GitLab: pk-skills/lab/code-worker-mcp
Why This Exists
This project is built to solve a specific Codex workflow problem:
- the main thread should not spend most of its budget reading code
- long coding tasks should be able to run quietly in the background
- the host should see compact facts, not large logs by default
- execution should support clear
fast / thinktiers
The goal is to save Codex main-thread tokens, not provider tokens.
What It Does
- runs real code work through Claude Code
- supports async worker jobs
- supports sync tiny patches
- returns compact status, checks, policy, and change summaries
- supports long-running quiet jobs with heartbeat and liveness signals
- supports
execution_tier,task_label, andmodel_label
flowchart LR
A["Codex host"] -->|"task / tier / boundary"| B["Code Worker MCP"]
B -->|"start"| C["Claude Code worker"]
C -->|"read / edit / check"| D["real workspace"]
C -->|"compact status"| B
B -->|"task_label / execution_tier / model_label / files_changed / checks_run"| A
Recommended Deployment
Recommended mode: source deployment.
git clone https://github.com/HuangYuan360/code-worker-mcp.git
cd code-worker-mcp
npm install
npm run mcp:doctor
Add this MCP to ~/.codex/config.toml:
[mcp_servers.code-worker]
command = "node"
args = ["/absolute/path/to/code-worker-mcp/src/code-worker-mcp.mjs"]
[mcp_servers.code-worker.env]
CODE_WORKER_API_KEY_FILE = "/Users/you/.codex/secrets/code_worker_api_key"
CODE_WORKER_BASE_URL = "https://your-provider-compatible-endpoint/v1"
CODE_WORKER_FAST_MODEL = "<provider-fast-model>"
CODE_WORKER_THINK_MODEL = "<provider-think-model>"
CODE_WORKER_PERMISSION_PRESET = "open"
Restart Codex after configuration.
Required Deployment Inputs
Do not guess these values:
- provider key source
CODE_WORKER_FAST_MODELCODE_WORKER_THINK_MODELCODE_WORKER_PERMISSION_PRESET
Provide these when needed:
CODE_WORKER_BASE_URLCLAUDE_BIN
Validation
Recommended checks:
npm run mcp:doctor
npm run mcp:smoke:tools
Usage
Example async task:
{
"name": "code_worker_start_implementation",
"arguments": {
"cwd": "/absolute/project/path",
"task": "Make the requested code change.",
"task_label": "orders-import-fix",
"execution_tier": "fast"
}
}
Execution tiers:
fastthinkautofor host orchestration only
Compact result shape:
{
"task_label": "orders-import-fix",
"execution_tier": "fast",
"model_label": "flash"
}
Long-Running Jobs
- start long tasks with
code_worker_start_implementation - do not use
code_worker_wait_for_jobas the main loop - prefer sparse
code_worker_get_job - trust heartbeat and liveness fields
- do not cancel only because the worker is quiet
Cancellation requires an explicit reason:
user_requestedobsoleteunsafe
Installation Guide For Other AI Tools
Installing only the MCP is not enough.
Also install the companion skill into local Codex at:
~/.codex/skills/code-worker-governance/SKILL.md
See:
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。