agent-worker-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agent-worker-mcp Have a Codex worker review src/ for bugs and tell me what it finds."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agent-worker-mcp
An MCP server that lets one main agent, such as Claude Code, give work to the agent CLIs signed in on the same machine: Codex CLI, Claude Code, and the Antigravity CLI (agy).
The main agent opens a worker session, sends it a task, and gets the finished job back. With Claude Code, the job comes back by itself as a task notification. The server runs on your machine, next to the CLIs and their sign-ins. It never runs in Docker.
What it does
Same tools for every CLI. It gives the main agent one set of tools for all three CLIs:
catalog,create,send,steer,queue,interrupt,status,wait,result,list,fork,archive,unarchive,delete, andprune;with Claude Code as the client, also
assignandwatch, which return a finished job as an MCP task.
Model and effort per session.
A session opens with a model and an effort level, checked against the list the CLI itself reports, and keeps them until it ends.
A family name such as
sonnet,opus,sol, orneonopens the newest model of that family.
Routing table.
routing.yamlholds a routing table for coding, office, research, writing, teaching, business, law, marketing, and other work. Each route has a primary and a fallback runtime, model, and effort. The main agent reads it throughcatalogand moves to the fallback itself.Sessions belong to their main session. Each worker session belongs to the main session that opened it, so two main sessions in one repository do not steer each other's workers.
Sub-agents. A job waits for the sub-agents its worker starts.
subagents: falseinworkers.yamlstops a worker from starting them.Idle processes. An idle CLI process closes after
RUNTIME_IDLEseconds, and its session resumes on the next job.
Related MCP server: claude-session-manager
Quick start
You install the server once per machine, then set up each repository where a main agent should use it. These are the short steps. The setup guide explains each one and adds a checksum check and a load check.
Install the server from a release into
~/.local/share/agent-worker-mcp:mkdir -p ~/.local/share/agent-worker-mcp && cd ~/.local/share/agent-worker-mcp gh release download v0.1.0 -R phamviet86/agent-worker-mcp -p 'agent-worker-mcp-0.1.0.tar.gz' tar -xzf agent-worker-mcp-0.1.0.tar.gz --strip-components=1 && rm agent-worker-mcp-0.1.0.tar.gz python3.12 -m venv .venv PIP_CACHE_DIR=$(mktemp -d) .venv/bin/pip install -e .In the root of a repository, give it its own copy of
workers.yaml:mkdir -p .claude && cp ~/.local/share/agent-worker-mcp/workers.yaml .claude/workers.yamlIn the same folder, register the server for that repository only:
claude mcp add --scope local workers -e 'PYTHONPATH=${HOME}/.local/share/agent-worker-mcp' -e "WORKERS_FILE=$PWD/.claude/workers.yaml" -e 'WORKER_OWNER=${CLAUDE_CODE_HOST_SESSION_ID:-}' -e WORKERS_DISABLED=claude -- '${HOME}/.local/share/agent-worker-mcp/.venv/bin/python' -m gateway.serverRun
claude mcp get workersin the repository. It showsStatus: ✔ Connected.
Then start a new Claude Code session in the repository and ask it to give a task to a worker, as the usage guide shows.
Example
You write to the main agent in plain words, for example:
Ask a codex worker to review the changes in src/ for bugs, and tell me what it finds.The main agent calls catalog, picks the route for code review, gives the task to a worker with assign, and reports the worker's answer when the job ends.
Documentation
Setup guide: install, update, and remove the server, set up a repository, and every setting.
Usage guide: give work to workers, manage sessions, let a worker edit files, and fix common problems.
AGENTS.md: the layout of the code and how to add a runtime for another CLI.
Requirements
macOS or Linux with Python 3.12.
At least one of these CLIs, installed and signed in: Codex CLI (
codex), Claude Code (claude), or the Antigravity CLI (agy).The GitHub CLI (
gh), to download a release.
Tested on macOS with Python 3.12, Codex CLI 0.174.0, Claude Code 2.1.337, and agy 1.5.25.
Security
Your sign-ins. The workers run under your own CLI sign-ins and quotas.
Writing workers. Give a worker
workspace-writeandapprovals: allowonly for a repository you trust it to change.Local only. The HTTP transport binds to
127.0.0.1and has no authentication of its own. Do not expose it to a network.No vendor files. The server never reads or writes the CLIs' own session files. It drives each CLI through its documented interface: the Codex App Server, the Claude Agent SDK, or ACP.
Development
Set up:
python3.12 -m venv .venv, then.venv/bin/pip install -e '.[test]'.Lint:
.venv/bin/ruff check .Tests with stub and fake CLIs:
.venv/bin/pytest --basetemp=.pytest-tmpLive test of one CLI:
LIVE_RUNTIME=codex .venv/bin/pytest --basetemp=.pytest-tmp -m live tests/test_codex.py. The same works forclaudeandantigravity. It uses the lowest effort and deletes the sessions it made.Claude Code calling the server end to end:
bash tests/agent.sh.
License
MIT. See LICENSE.
Available Tools
17 toolsarchiveArchiveB
Hide a session from list. It can be unarchived.
Inputs: session (required). Returns: object
assignAssignA
Give a task to a worker and return the finished job (done, uncertain, or failed).
Without session it opens a new worker session, with model and effort when you give them (see catalog);
the session keeps them for its life. With the id of one of your sessions on that worker, the job
runs there after the jobs before it, with what the session already knows. In Claude Code it runs as a task:
go on with other work, and the job comes back to this session when it ends.
Inputs: text (required), worker (required), model, paths, +2 more. Returns: object
catalogCatalogB
The workers you may use, each with its default model and effort, the models and effort levels a new session
may choose, the full id that each family name opens (latest), and whether it may start sub-agents; the
routing table of the kinds of work; and warnings for a default or a route that names an earlier, retiring,
or missing model.
Inputs: no named parameters. Returns: object
createCreateB
Open a session on a worker. With text, also start its first job. Returns the session and the job id.
model and effort stay for the life of the session; leave them out for the worker's defaults (catalog).
Inputs: worker (required), text, model, paths, +1 more. Returns: object
deleteDeleteA
Delete a session at the vendor and in the store, and remove its worktree. It cannot be undone.
Inputs: session (required). Returns: object
forkForkB
Copy a session's conversation into a new session on the same worker.
Inputs: session (required). Returns: object
interruptInterruptA
Stop the running job of a session. Queued jobs stay queued.
Inputs: session (required). Returns: object
listListB
Your worker sessions, with the running job and the number of queued jobs of each. all adds the sessions of
other main sessions, which you may read but not control.
Inputs: all, worker, archived. Returns: result
prunePruneA
Delete your worker sessions, and the shared ones, that ran no job for older_than hours, such as the
sessions of a main session that ended. A session with a running or queued job stays. It cannot be undone.
Inputs: worker, older_than. Returns: object
queueQueueB
Add a job that runs after the jobs before it. It starts now when the session is idle.
Inputs: text (required), session (required), paths. Returns: object
resultResultC
The final answer of a finished job.
Inputs: job (required). Returns: result
sendSendA
Start a job in a session and return its id at once. Refused with busy while another job runs.
Inputs: text (required), session (required), paths. Returns: object
statusStatusC
The state of a job, or of a session and its jobs.
Inputs: job, session. Returns: object
steerSteerB
Add an instruction to the running job. When the runtime cannot steer, or no job runs, the text is queued.
Inputs: text (required), session (required). Returns: object
unarchiveUnarchiveC
Bring an archived session back.
Inputs: session (required). Returns: object
waitWaitB
Wait until a job ends, at most timeout seconds. Returns the job; call again while it is not final.
Inputs: job (required), timeout. Returns: object
watchWatchA
Watch a job in the background and return it when it ends (done, uncertain, or failed).
Call it right after create, send, or queue, then go on with other work: the client delivers the job
when it ends. It needs the right to wait. A client without MCP tasks waits for the answer instead.
Inputs: job (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Most tools target a distinct resource+action (create session, fork session, interrupt job, result of job), and the descriptions do real work separating near-pairs like `send` (start now, refuse when busy) vs `queue` (run after prior jobs) vs `assign` (blocking convenience wrapper). The remaining soft spots are `wait` vs `watch` (both return a job when it ends, differing only in blocking vs background delivery) and the trio of job-starting verbs, which an agent could plausibly misselect at first glance.
Every name is a single lowercase word with no case mixing, giving a predictable, readable surface. There is a mild verb/noun split — actions (`send`, `steer`, `fork`, `prune`) alongside state/object nouns (`status`, `result`, `list`, `catalog`) — but the convention is stable enough that no name is surprising.
At 17 tools this sits at the upper edge of comfortable, but each one maps to a real lifecycle operation (session CRUD, job control, discovery, cleanup). Nothing looks like a redundant alias, though a few pairs (wait/watch, archive/unarchive) inflate the count beyond the strictly minimal set.
The surface covers session lifecycle (create/fork/archive/unarchive/delete/prune), job lifecycle (send/queue/steer/interrupt/status/result/wait/watch), and discovery via `catalog`, so there are no dead ends for the core workflow. Gaps are minor but real: there is no way to remove or inspect individual queued jobs (interrupt leaves them queued), and no operation to read a running job's partial output beyond steering it.
Maintenance
Related MCP Connectors
Run parallel coding agents: Git-worktree workspaces, agent sessions, automations, tasks.
Hosted coding agent: start, follow up on and stop tasks that can open GitHub pull requests.
Command center for developers coordinating AI coding agents across projects.
Multiplayer for the coding agents your team already uses: shared tasks, decisions, skills and tools.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables Codex or Claude Code to orchestrate persistent Antigravity CLI workers as independent implementers and testers within restricted workspace roots. It supports asynchronous task dispatch, progress polling, result inspection, follow-up messages, and cancellation with bounded, audited local event logging.5MIT
- AlicenseBqualityCmaintenanceEnables AI agents to start, monitor, follow up on, stop, and collect results from headless Claude Code CLI sessions, with queuing, budgets, locks, and wake-up notifications.9MIT
- AlicenseNot gradedqualityBmaintenanceEnables an orchestrating agent to delegate tasks to Codex, Claude, or Gemini worker CLIs running in isolated git worktrees, then wait on jobs, inspect per-file diffs, and merge or discard the resulting changes before anything touches the working tree.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables coordinating local coding agents across Antigravity, DeepSeek Harness, Claude Code, and OpenCode with persistent tasks, live public events, file-change artifacts, session follow-ups, process-tree cancellation, and configurable execution permissions.MIT