dsh-codex-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., "@dsh-codex-mcp Review the plan at plan.md and write review.md"
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.
dsh-codex-mcp
Hand a job to the Codex CLI on your machine and get the result back in a form you can review — without giving Codex write access to your project.
What it does
Runs one Codex task. Give it a complete job — "review this plan", "review this patch" — and it runs
codex execand brings back Codex's answer.Keeps Codex away from your files. Codex works in its own temporary folder. It can read your project, but it can only write inside that folder.
Hands you a list, not a wall of text. You get Codex's answer plus a list of the files it produced, with their size and a sha256 checksum. You open what you need, decide, and copy in only what you approve.
One tool, one job. Nothing else to learn or configure.
Typical uses: reviewing a plan, reviewing a patch or a pull request, getting a second opinion.
Related MCP server: codex-cli-sync-mcp
Requirements
Node.js 22.19+ or 24+
A working
codexCLI on the same machine, already logged in
Install
Add this block to the end of
~/.dsh/profiles/<your-profile>/cordis.patch.yml, replacing every/absolute/path/...with a real path:
- insert:
- id: mcp-codex
name: '@deepseek-ai/dsh-mcp-client'
config:
transport: stdio
serverName: codex
command: /absolute/path/to/node
args:
- /absolute/path/to/dsh-codex-mcp/src/server.mjs
cwd: /absolute/path/to/your/workspace
toolCallTimeoutMs: 900000
failOnStartupError: trueRestart the DSH app once. (In practice it also works without a restart — when we tested it, the new row was live in the same session.)
You now have one new tool: mcp__codex__run.
Usage
Ask your agent for a review and it calls the tool for you. The arguments:
Argument | Required | What it means |
| yes | The whole job, written out. Codex cannot see your chat, so include the paths it should read and the file name it should write. |
| no | Which Codex model to use, for example |
| no | Report only these files. Defaults to everything the run created. |
| no | How long the run may take, in milliseconds. Default: 15 minutes. |
What comes back looks like this:
ok exit=0 140.1s model=gpt-6-astra terminal=yes
run run-20260925-181307-9c44
artifact /path/to/your/workspace/.codex-staging/run-20260925-181307-9c44/work
manifest /path/to/your/workspace/.codex-staging/run-20260925-181307-9c44/manifest.json
final message
-------------
review written to review.md
artifacts (1) — bodies are NOT included, read them yourself
-------------
2500 B sha256:6676042702213315 review.mdartifact is the folder Codex was allowed to write. Open the files listed under it, read them,
then copy the parts you agree with into your project.
Tip: put a size limit in your prompt ("at most 60 lines", "top 5 risks only"). Long answers can be cut off by the model provider; short, structured ones come back reliably.
Command line (optional)
The same engine, handy for trying things by hand:
codex-mcp run -p "Review the plan at plan/foo.md and write review.md" -m gpt-6-astra
codex-mcp runs # list finished runs
codex-mcp prune --older-than-days 7 --keep 5 # clear old temporary runs
codex-mcp env # show how Codex will be startedSettings (optional)
Variable | What it does |
| Full path to the |
| Default model when a call does not name one. |
| Default time limit for a run. |
| Where temporary run folders go. Default: |
Safety
Codex can read your project, but it can only write inside the temporary folder for that run.
Commands Codex runs cannot reach the network, so it cannot upload your files.
Codex uses its own login. This tool never reads, stores or forwards your keys.
Nothing Codex produces enters your project by itself — you decide what to copy.
Development
node --test tests/*.test.mjsThe tests are offline: they use a fake Codex, so they never call a model and cost nothing.
For a real run there is scripts/live-review.mjs — that one does cost money.
License
MIT.
Available Tools
1 toolrunA
Run one Codex CLI task (codex exec) in an isolated scratch directory. Returns Codex's final message plus an artifact manifest (path, bytes, sha256 per file) — file bodies are NEVER included. Codex can read the workspace but can only write inside its own scratch directory. Read the artifact paths yourself, review them, and only then copy what you approve into the workspace.
Inputs: prompt (required), files, model, timeoutMs.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusing it with another operation. The tool's purpose—running a Codex CLI task in an isolated scratch directory—is singular and clearly bounded.
A single tool cannot exhibit internal naming inconsistency. The name 'run' is a simple imperative verb that matches the server's single action, even though there is no broader verb_noun pattern to evaluate.
The server's stated purpose is to run one Codex CLI task, so a single tool is appropriately scoped rather than thin. Adding extra tools for the same action would be redundant; the tool is substantial rather than trivial.
The tool covers the full intended workflow: it executes Codex, returns the final message, and provides an artifact manifest with paths and hashes so the agent can review and copy approved files. There are no obvious missing lifecycle operations because the server is intentionally a stateless task runner.
Maintenance
Related MCP Connectors
Ephemeral single-task tool forged from examples, sandbox-proven, task-bound, expiring by design.
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables Codex to delegate coding tasks to an OpenCode CLI locally, returning structured results such as exit codes, session summaries, tool calls, and git diffs.2MIT
- AlicenseAqualityCmaintenanceEnables MCP clients to delegate coding tasks to the local Codex CLI synchronously, returning a compact report with the model's final message, git diff/status, exit code, and threadId.19 npmMIT
- AlicenseBqualityCmaintenanceEnables a local Codex chat to ask a second opinion, review staged, unstaged, or revision-based diffs, and delegate coding tasks to the Antigravity CLI running in isolated or disposable workspaces. Supports starting, polling, retrieving, and cancelling tasks with returned answers, diffs, changed-file lists, exit codes, and time/output limits, while never auto-applying returned patches.81MIT
- AlicenseAqualityCmaintenanceEnables handing one self-contained job to the Claude Code CLI on the local machine and getting back its final message plus a manifest of the artifacts it produced, without letting Claude write into the user's project. Reads are limited to named directories and all writes stay in a throwaway run directory, so the user reviews the listed files and copies in only what they approve.1MIT