dsh-codex-bridge
An MCP server that enables AI coding assistants like Codex and Claude Code to use DSH as an external resumable sub-agent via async task management tools and a visual dashboard.
README
dsh-codex-bridge
DSH 插件 / MCP 服务器 — 让 Codex、Claude Code、Cursor 等 MCP 客户端将 DSH 当作外部可恢复子代理使用。
flowchart LR
C[Codex / Claude Code / Cursor / any MCP client] -->|MCP SSE| B[DSH Bridge :3101]
B -->|spawn detached| S[Supervisor]
S -->|dsh --profile headless| W[DSH Worker]
S -->|持久化| F[(~/.dsh/tasks/)]
Features
- 5 MCP tools:
dsh_task_start,dsh_task_poll,dsh_task_cancel,dsh_task_list,dsh_get_status - Async task model: start returns immediately, poll for events via cursor
- Resumable: bridge restart recovers running tasks, orphans dead ones
- Visual dashboard:
http://127.0.0.1:3101/agents— frosted glass UI - REST API: full task management API
- SSE stream: real-time task events
- Security: bearer token, 127.0.0.1 only, cwd restriction
Quick Start
# 1. Install as DSH plugin
dsh plugin --profile web add dsh-codex-bridge
# 2. Set token (optional, has dev default)
export DSH_CODEX_BRIDGE_TOKEN="your-32-char-token"
# 3. Start DSH
dsh web
# 4. Open dashboard
open http://127.0.0.1:3101/agents
MCP Tools
| Tool | Description |
|---|---|
dsh_task_start |
Start an async task, returns taskId + dashboardUrl |
dsh_task_poll |
Read events incrementally by cursor (≤64 KiB) |
dsh_task_cancel |
Cancel a running task |
dsh_task_list |
List all tasks with status |
dsh_get_status |
Bridge health and stats |
State Machine
queued → running → succeeded
→ failed
→ timed_out
→ cancelled
→ orphaned
Codex Configuration
[mcp_servers.dsh_agent]
url = "http://127.0.0.1:3101/sse"
bearer_token_env_var = "DSH_CODEX_BRIDGE_TOKEN"
startup_timeout_sec = 10
tool_timeout_sec = 45
enabled_tools = [
"dsh_task_start",
"dsh_task_poll",
"dsh_task_cancel",
"dsh_task_list",
"dsh_get_status"
]
API Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/agents/tasks |
List tasks |
| GET | /api/agents/tasks/:taskId |
Task detail |
| POST | /api/agents/tasks |
Create task |
| POST | /api/agents/tasks/:taskId/cancel |
Cancel task |
| POST | /api/agents/tasks/:taskId/retry |
Retry task |
| GET | /api/agents/tasks/:taskId/events |
Get events (cursor) |
| GET | /api/agents/tasks/:taskId/files/:file |
Download artifact |
| GET | /api/agents/stream |
SSE event stream |
Dashboard
The dashboard at http://127.0.0.1:3101/agents provides:
- Left panel: task list with status filter
- Center: real-time event stream (stdout/stderr/status)
- Right panel: task details (PID, timing, artifacts)
- Dark/light mode: follows system preference
Architecture
dsh-codex-bridge/
├── lib/
│ ├── index.js DSH plugin entry + MCP server + REST API
│ ├── dashboard.html Visual dashboard (single-file HTML/CSS/JS)
│ └── supervisor.mjs Detached supervisor process
├── package.json
├── cordis.patch.yml
└── LICENSE
License
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.
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.
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.
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.