Code Worker MCP

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.

Category
Visit Server

README

Code Worker MCP

Languages: English | 简体中文

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:

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 / think tiers

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, and model_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_MODEL
  • CODE_WORKER_THINK_MODEL
  • CODE_WORKER_PERMISSION_PRESET

Provide these when needed:

  • CODE_WORKER_BASE_URL
  • CLAUDE_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:

  • fast
  • think
  • auto for 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_job as 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_requested
  • obsolete
  • unsafe

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:

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured