dsh-codex-mcp
Launches the official Codex CLI as a persistent MCP server so DeepSeek Harness can invoke Codex models without storing or transmitting ChatGPT credentials to third parties.
README
dsh-codex-mcp
Codex models in DeepSeek Harness, through OpenAI's official CLI — without giving any third-party code custody of your ChatGPT credentials.
Install
npm i -g @openai/codex # if you don't already have it
codex login # sign in with your ChatGPT account
dsh plugin --profile web add dsh-codex-mcp
dsh web
That's it. Codex appears in the agent's tools as mcp__codex__codex. No API key, no OAuth flow inside the harness, nothing to paste.
Why this exists
Other plugins that put a ChatGPT subscription into the harness run their own OAuth flow, obtain a token scoped to your plan, and store it. To OpenAI those requests appear to come from Codex CLI. In practice a third-party package is holding a credential for something you pay for.
This plugin does not authenticate at all. It locates the Codex executable, launches it as an MCP server, and lets the harness talk to it over stdio. Authentication happens inside OpenAI's own signed binary, against its own ~/.codex/auth.json. There is no token here to leak, and uninstalling leaves nothing behind to revoke.
DeepSeek Harness ──MCP/stdio──▶ codex mcp-server ──HTTPS──▶ OpenAI
(official binary,
own credentials)
Why MCP rather than shelling out per call
Measured on the same prompt and model:
| Approach | Latency |
|---|---|
| MCP server (persistent process) | 11.4s |
codex exec (new process per call) |
31.5s |
Every codex exec invocation cold-starts the binary and reloads its skills context before answering. The MCP server pays that once. It also keeps thread state, so codex-reply can continue a conversation.
The cost is a resident process — around 140 MB in observed use.
Configuration
Every option is optional; the defaults are what you want.
| Option | Default | Purpose |
|---|---|---|
command |
auto-detected | Full path to the Codex executable |
serverName |
codex |
Tool namespace (mcp__<serverName>__…) |
cwd |
harness working directory | Working directory for the Codex process |
env |
{} |
Extra environment variables |
toolCallTimeoutMs |
900000 |
Per-call ceiling — Codex turns are agent runs, not completions |
failOnStartupError |
false |
Whether a missing Codex should stop the harness booting |
DSH_CODEX_BINARY overrides detection without editing config.
How the executable is found
- An explicit
command, orDSH_CODEX_BINARY - The native binary inside a global
@openai/codexinstall, enumerated from disk rather than hardcoded — a new platform or architecture needs no change here - A
codexexecutable onPATH
On Windows the npm .cmd and .ps1 shims are deliberately skipped: the MCP stdio transport spawns without a shell, and a shim cannot be launched that way.
When Codex is missing
The plugin logs one warning naming the fix and mounts nothing. The harness starts normally with Codex tools absent. Set failOnStartupError: true if you would rather boot loudly than run without it.
Requirements
- DeepSeek Harness with
@deepseek-ai/dsh-mcp-client0.1.0-rc.6–0.1.0-rc.8 - Node
^22.19.0 || >=24 - Codex CLI, signed in
- A ChatGPT plan that includes Codex
Verified against harness 0.1.0-rc.8 and codex-cli 0.144.5.
Uninstall
dsh plugin --profile web remove dsh-codex-mcp
No credentials were stored, so there is nothing else to clean up. Your Codex CLI login is untouched.
Development
npm install
npm test
Tests build synthetic npm layouts in a temp directory, so the suite passes on machines with no Codex installed. CI runs them on Linux, macOS and Windows across both supported Node versions, and separately verifies that a clean install of the packed tarball works.
Licence
MIT
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.