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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。