Codex Dobby MCP
A local stdio MCP server that lets Claude delegate scoped work to Codex with structured results, persistent artifacts, and guardrails around filesystem access, review fan-out, and reverse-engineering workflows.
It gives Claude a sharper tool surface than a raw shell handoff: planning stays read-only, builds stay scoped, reviews can require specialist subagents, and every run leaves behind inspectable logs and outputs. It's especially useful for long-running analysis, Ghidra sessions, and deeper code review passes.
Tools
| Tool | Description |
|---|---|
plan |
Break down a task and propose a scoped plan without editing files. |
research |
Investigate code, docs, and context in read-only mode and report findings. |
brainstorm |
Evaluate an idea, scope an MVP, and recommend whether it is worth building. |
build |
Implement a change, run focused verification, and report results. |
validate |
Run existing repo validation commands (build, test, lint) and report the results. |
review |
Review code or changes directly for one selected agent, or fan out to one Codex subagent per selected review agent when multiple agents are selected. |
reverse_engineer |
Use reverse-engineering tooling and broader roots to investigate binaries. |
start_run |
Start any Dobby tool in the background and return immediately with a task id. |
get_run |
Fetch the status or final result for a background run by task id. |
list_runs |
List recent runs for a repo so you can recover task ids and results after timeouts. |
Requirements
- Python 3.12+
uv- Codex CLI installed and authenticated
- A git worktree for the target repo
Optional MCP dependencies
Some tools work best (or only work) when specific MCP servers are available in the parent environment:
researchandbrainstorm: fetchaller-mcp MCP server for web search, URL fetching, and Reddit browsing. Without it, these tools fall back to codebase-only analysis.reverse_engineer: ghidra-mcp bridge for binary analysis via Ghidra. Without it, reverse engineering is limited to whatever other tools are available in the sandbox.
Dobby auto-detects these integrations from the active Codex MCP config. If an integration is not installed or not configured for the run, Dobby does not try to use it: the worker prompt explicitly tells Codex not to call it and to continue with the best non-integration path available.
Install
Recommended local tool install:
uv tool install .
codex-dobby-mcp
One-off local execution without installing:
uvx --from . codex-dobby-mcp
When this package is published to PyPI, replace . with codex-dobby-mcp.
Development checkout:
uv sync
Run From Source Checkout
uv run codex-dobby-mcp
Target repo is resolved in this order: explicit repo_root arg → MCP metadata (_meta.repo_root, repo_root, repoRoot, working_directory, workingDirectory, cwd) → server cwd. If your client sends working-directory metadata, that is enough. Otherwise wrap the launch with cd.
Safety guard: if repo_root is omitted and the prompt clearly references an absolute path inside a different git worktree, Dobby fails fast instead of silently defaulting to the server cwd. It also refuses to guess when the request only names relative files that do not exist under the server cwd. The caller should retry with explicit repo_root or correct working-directory metadata.
Example launch with an installed tool:
{
"mcpServers": {
"codex-dobby": {
"command": "sh",
"args": ["-lc", "cd /ABSOLUTE/PATH/TO/TARGET-REPO && codex-dobby-mcp"]
}
}
}
Example launch from a source checkout:
{
"mcpServers": {
"codex-dobby": {
"command": "sh",
"args": ["-lc", "cd /ABSOLUTE/PATH/TO/TARGET-REPO && uv --directory /ABSOLUTE/PATH/TO/codex-dobby-mcp run codex-dobby-mcp"]
}
}
}
Recommended Claude Code setup
If you use Dobby from Claude Code, add this to your CLAUDE.md so Claude delegates correctly:
## Delegating Work to Dobby (codex-dobby MCP)
Offload grunt work — build/test, code review, research, planning, implementation, brainstorming, reverse engineering — to the `codex-dobby` MCP tools instead of doing it inline. Saves tokens and context.
- Give focused prompts with a concrete outcome. One task per call — if you have multiple things to ask, make multiple Dobby calls (in parallel when independent) instead of bundling them into one vague prompt.
- Call `mcp__codex-dobby__*` directly. Never wrap them in a general-purpose Agent/Task subagent.
- Don't lower `timeout_seconds` below the default. Err too long — a short timeout kills the run; a long one costs nothing because Dobby returns as soon as it's ready.
- If your MCP client has a short `tools/call` timeout, start long work with `mcp__codex-dobby__start_run` and then poll `mcp__codex-dobby__get_run`.
Requests
Common params: prompt, repo_root, files, important_context, timeout_seconds, extra_roots, model, reasoning_effort. Tool-specific: danger (build, reverse_engineer), agents (review).
review agents: generalist (default), security, performance, architecture, correctness, ux, regression. Pass multiple for multi-agent review.
start_run takes the same params as the target tool, plus required tool. If timeout_seconds is omitted, it defaults to that target tool's normal timeout. Non-empty agents are only accepted when tool is review; other tools reject them with a validation error.
get_run params: task_id, optional repo_root.
list_runs params: optional repo_root, optional limit.
For clients with a hard tools/call timeout around 120 seconds, prefer start_run + get_run/list_runs for long review, research, build, validate, or reverse_engineer work.
Defaults
Default model is gpt-5.4, except review: single-agent review defaults to gpt-5.4-mini, while multi-agent review keeps a gpt-5.4 parent and injects gpt-5.4-mini review subagents. Any explicit timeout_seconds must be at least 300s.
| Tool | Timeout | Reasoning | Sandbox |
|---|---|---|---|
plan |
600s | high | read-only |
research |
1200s | medium | read-only |
brainstorm |
600s | high | read-only |
review |
600s default, 1200s recommended for multi-agent | medium | read-only |
validate |
600s | medium | workspace-write via --full-auto |
build |
1200s | high | workspace-write via --full-auto |
reverse_engineer |
1800s | high | workspace-write via --full-auto |
build and reverse_engineer switch to danger-full-access when danger=true.
start_run, get_run, and list_runs are control-plane tools and return immediately. start_run uses the selected target tool's timeout budget.
Behavior
- Child Codex runs inherit the parent's environment, but Dobby seeds a private per-run
CODEX_HOMEunder the system temp directory (.../codex-dobby/<task-id>/codex-home) instead of pointing children at the user's global Codex home directly. researchprefers codebase evidence and uses fetchaller MCP tools when available. If fetchaller is not installed or not configured for the run, the worker is told not to call it and to continue without web MCP support.validateruns in workspace-write--full-autobecause validation often needs temp or cache writes; the worker prompt still forbids source edits and commits.reviewuses a direct single-lens path for one agent, or multi-agent orchestration (viaspawn_agentovercodex exec --json) for multiple. Single-agent review defaults togpt-5.4-miniatmediumreasoning. Multi-agent review uses agpt-5.4parent atmediumreasoning and injectsgpt-5.4-minireviewer subagents, also atmediumby default.reverse_engineerincludes a Ghidra MCP workflow only when Ghidra is installed and configured for the run. When Dobby can discover Ghidra from the active Codex configs (CODEX_HOME/config.tomland repo-local.codex/config.toml), it adds the configured Ghidra MCP helper repo as a writable helper root. When a live Ghidra UDS socket runtime directory is discoverable, Dobby also mounts that runtime path so child reverse-engineering workers can reach the already-running Ghidra instance. In that live-UDS case, Dobby enables workspace-write network access and passes the discovered socket roots throughnetwork.allow_unix_socketsfor the child Codex run. If Ghidra is not installed or not configured, the worker is told not to callmcp__ghidra__*.reverse_engineerresponses includereverse_engineer_details.ghidra, which reports whether Ghidra was configured, whether the run used direct MCP calls or the mounted helper fallback, and which Ghidra calls were observed.start_runlaunches the selected Dobby tool in the server process and returns atask_idimmediately.get_runfirst checks any still-live in-memory run, then falls back to the run artifacts on disk.- Result artifacts are replaced atomically, so
get_runsees either the startup placeholder or the final persisted response instead of a partially writtenresult.json. - Blocking tools like
reviewandresearchstill behave exactly as before. If a caller insists on waiting synchronously, that caller can still hit its own outer MCP timeout.
Filesystem and Safety
- Read-only tools run in Codex
read-only. Dobby still mounts the per-run artifact directory plus any in-repoextra_roots;extra_rootsoutside the repo are exposed as additional read-only roots, not writable roots. - Mutating tools run in workspace-write and mount
extra_rootswritable via--add-dir. - Mutating tools also ensure
.codex-dobby/is present in.gitignore. Unsafe.gitignoretargets, such as symlinks or multiply-linked files, fail closed. - Child Codex runs no longer need write access to the parent
~/.codex/sessions. Dobby seeds the child home fromCODEX_HOME/auth.jsonandCODEX_HOME/config.tomlwhen those files exist, mirrors referenced helper files fromCODEX_HOMEandCLAUDE_CONFIG_DIRinto a private runtime, then points the child at that private temp home. The server process therefore needs read access to the parent Codex and Claude config files plus read/write access to the temp runtime directory. CODEX_DOBBY_ACTIVE=1is set on child runs and Dobby refuses to run if already set. Inheritedcodex-dobby-mcpentries are disabled so workers can't call back.- Commits are forbidden. A mutating worker that creates or moves a commit returns
status: "error". - Artifact access fails closed on invalid
task_idvalues and symlinked artifact roots or paths. Wrapper writes also fail closed on unsafe.gitignoretargets.
Artifacts
Each run writes to <target-root>/.codex-dobby/runs/<task-id>/: request.json, prompt.txt, stdout.log, stderr.log, last_message.txt, result.json, output-schema.json. Multi-agent review logs are JSONL. Treat .codex-dobby/ as unredacted local logs.
Worker-facing tools (plan, research, brainstorm, build, validate, review, reverse_engineer) return task_id, tool, status, summary, completeness, important_facts, next_steps, files_changed (this run only), artifact_paths, sandbox_violations, repo_root, exit_code, duration_ms, warnings, raw_output_available, model, reasoning_effort, and result_state. review responses also include review_details, where requested_review_agents is the raw caller-supplied list and effective_review_agents is the normalized/defaulted list Dobby actually used. reverse_engineer responses also include reverse_engineer_details.ghidra, with mode, summary, and the observed mcp_calls and helper_calls.
Async control tools return different structured payloads:
start_runreturns anAsyncRunHandlewithtask_id,tool,state,summary,repo_root,artifact_paths,model, andreasoning_effortget_runreturns aRunLookupResponsewithtask_id,state,summary,repo_root, optionaltool, optionalstatus, optionalresult_state, optional finalresult, artifact metadata, and warningslist_runsreturns the resolvedrepo_rootplus recent run summaries for that repo
Async Runs
If your MCP client gives up on long blocking tool calls before Dobby finishes, use the async path:
{
"tool": "start_run",
"arguments": {
"tool": "review",
"prompt": "Review the current uncommitted state",
"repo_root": "/ABSOLUTE/PATH/TO/TARGET-REPO",
"files": ["src/foo.ts", "ui/main.ts"]
}
}
This returns quickly with a task_id. Then poll or recover the result:
{
"tool": "get_run",
"arguments": {
"task_id": "<task-id>",
"repo_root": "/ABSOLUTE/PATH/TO/TARGET-REPO"
}
}
If you lost the id because a previous blocking call timed out, list_runs reads .codex-dobby/runs/ and shows recent task ids and summaries.
States reported by get_run:
running: the server still has the run alive in memoryfinished: a finalToolResponseis available andresult_stateisfinalunknown: the run directory exists but no readable final result is available; ifresult_stateisplaceholder, only the startup placeholder artifact was writtennot_found: there is no matching run directory, or the suppliedtask_idis invalid
Important limitation: live background tracking is in-process. If the server restarts, running background work is lost. Completed results remain recoverable from .codex-dobby/runs/.
Development
uv run pytest
uv build --offline --no-build-isolation
uv run mcp dev src/codex_dobby_mcp/server.py:app
uv run python -m codex_dobby_mcp
Metadata
Release files for codex-dobby-mcp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| codex_dobby_mcp-0.1.2.tar.gz | 52.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codex_dobby_mcp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 121.1 kB
Release files / codex_dobby_mcp-0.1.2.tar.gz
| Download URL | codex_dobby_mcp-0.1.2.tar.gz |
|---|---|
| Size | 52.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
deabff17e52aefbd55f1693b8d28b4788ee2ea93a3f70019e403734ba4c48847
|
|
BLAKE2b-256 checksum How to use checksums |
da726268ed9585660cf29277604669f764c87947c95bbedd8e8d495875c01190
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.
Transparency logRelease files / codex_dobby_mcp-0.1.2-py3-none-any.whl
| Download URL | codex_dobby_mcp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 68.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c624912aac8f4cad36d904126e06c0b9a89dfa1d8931a61d2f09fb2686e9977
|
|
BLAKE2b-256 checksum How to use checksums |
ec24950d588bd76f7509e4a25973d58ffc17bd34627c0cbd9a4a124347e75897
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.
Transparency log