DSH Crew X
Registers DSH Crew X as an MCP server inside OpenAI Codex (via node src/install/cli.mjs codex), allowing Codex to spawn Flash/Pro workers, run concurrent read-only audits, and continue work in persistent sessions without re-reading the codebase each turn.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
DSH Crew X (dsh-crew-x)
📖 Open Source Acknowledgements & Fork Notice
This project is hard forked from ZSeven-W/dsh-crew under the terms of the MIT License.
Upstream Credit: Special thanks to
ZSeven-Wfor creating and architecting the clean, elegant DSH subagent protocol and three-surface framework.Divergence & Evolution:
Upstream Project: Focused on keeping the core clean, lightweight, and strictly stateless (one-shot), maintaining minimal DSH settings panel options and Hub configs.
DSH Crew X: Tailored specifically for heavy-duty production engineering and multi-agent enterprise workflows. It addresses complex multi-turn collaboration, large-scale concurrent code audits, Windows enterprise security hurdles, and context window exhaustion by introducing persistent session pools, automatic worktree isolation, result offloading, and deep stability hardening.
Related MCP server: DSH Crew
⚡ Key Differences from Upstream
Dimension | Upstream | Enhanced | Practical Benefits |
Session Model | Purely stateless (one-shot); all context discarded upon task completion | Opt-In Persistent Sessions1:1 forwarding subagent binding with idle reaper & turn watchdog | Eliminates repeated file re-reads & token wastage in iterative multi-turn bug-fixing |
Connection & Discovery | Fixed loopback port (default | Atomic File Discovery ( | Perfect for DSH Desktop dynamic random ports; reconnects seamlessly after restarts |
Model Routing | Hand-edited | Visual Dropdowns + Custom ID Input + Real Tool-Call Probe Button | Live inspection of registered providers & instant no-op tool-call route verification |
Sandbox & Permissions | Static global mode; restricted Windows directories crash with | 4-Tier Per-Task Permissions + Ceiling + Windows Auto-Worktree Fallback | Least-privilege execution; auto-degrades to isolated Git Worktree on Windows ACL issues without failing |
Output Management | Entire 10,000+ token reviews returned inline, easily overflowing context windows | Threshold Auto-Offload ( | Saves 85%+ context window space; extracts structured |
Concurrency & Locks | Shared workspace (CWD) strictly serialized | Exclusive Write Locks + Concurrent Read-Only Dispatches ( | Enables running multiple parallel Flash workers for rapid multi-module code audits |
🎯 Three Real-World Production Scenarios
Scenario 1: Large-Scale Concurrent Code Auditing (Parallel Reads + Auto-Offload)
Problem: In standard workflows, a single workspace can only run one worker at a time; deep security audits returning tens of thousands of tokens quickly overwhelm Claude, Codex, or Antigravity context windows.
Solution: Spawn multiple read-only workers concurrently by setting
allow_concurrent_cwd: trueandpermission: "read-only". Excessive outputs are automatically saved to disk, returning only structured summaries.
// Worker 1: Audit auth module
dsh_spawn_worker({
task: "Audit src/auth for JWT refresh replay vulnerabilities",
tier: "flash",
permission: "read-only",
allow_concurrent_cwd: true
});
// Worker 2: Concurrently audit database queries without blocking
dsh_spawn_worker({
task: "Audit src/db for SQL injection risks and slow query patterns",
tier: "flash",
permission: "read-only",
allow_concurrent_cwd: true
});Scenario 2: Multi-Turn Iterative Bug Fixing (Persistent Session Mode)
Problem: Complex issues require an iterative loop: root-cause analysis ➔ reproduction test ➔ code fix ➔ regression check. In a stateless model, each turn forces the worker to read the entire codebase all over again.
Solution: Bind a long-lived persistent session to carry forward full memory, tool results, and reasoning chains.
// Turn 1: Launch persistent session for root cause investigation
const step1 = await dsh_run_worker({
task: "Diagnose why unit test #104 occasionally times out in src/hub/index.mjs",
tier: "pro",
persistent: true
});
// ➜ Returns session_id: "session-9b1c-4f8a" with the root cause explanation
// Turn 2: Continue in the same session to write the fix (inherits all Turn 1 context)
const step2 = await dsh_run_worker({
session_id: "session-9b1c-4f8a",
task: "Apply the mutex lock fix we discussed in turn 1 and run the unit test suite"
});
// Turn 3: Work complete, destroy the session explicitly
await dsh_session_close({
session_id: "session-9b1c-4f8a"
});Scenario 3: Windows Desktop Zero-Config Plug-and-Play (Dynamic Discovery + Auto-Worktree)
Problem: DSH Desktop generates a randomized port on every startup; modifying protected branches or restricted paths triggers Windows
Win32 5 Access Deniederrors.Solution:
The Hub broadcasts its live port to
~/.config/dsh-crew/hub.json, and the MCP client performs CAS-governed automatic failover.Tasks defaulting to
permission: "auto"gracefully transition to a clean temporary Git Worktree at%TEMP%\dsh-crew-worktrees\<id>upon encountering ACL limitations, surviving DSH restarts seamlessly.
🚀 Quick Start & Integration
1. Installation
Option A: Install from npm
npm install -g dsh-crew-xOption B: Build from Source
git clone https://github.com/xiaobaijiadepugongyingpai-coder/dsh-crew-x.git
cd dsh-crew-x
pnpm install
npm run build2. Connect External AI Hosts
dsh-crew-x includes an installer CLI to configure external coding assistants in one command:
# Register all supported hosts (Claude Code, Codex, Antigravity, Grok)
node src/install/cli.mjs all
# Or configure specific hosts:
node src/install/cli.mjs agy --agy-permissions=safe # Antigravity (auto-allows safe query tools)
node src/install/cli.mjs claude --statusline # Claude Code (with optional statusline)
node src/install/cli.mjs codex # OpenAI Codex
node src/install/cli.mjs grok # Grok Build CLIMigration Notices & Breaking Changes:
Do Not Mix: Avoid running upstream
@zseven-w/dsh-crewanddsh-crew-xsimultaneously within the same host to prevent MCP tool name collisions.Async Persistent Refusal:
dsh_spawn_workerstrictly operates in one-shot mode. Passingpersistent: trueorsession_idwill be explicitly refused withPERSISTENT_ASYNC_UNSUPPORTED(upstream silently stripped unknown fields).Windows Worktree Signals: When an
autotask triggers an ACL degradation, the response payload explicitly includesworktree_pathandisolation: true.
🏗️ Architecture & Interface Reference
flowchart LR
subgraph Host["External AI Hosts"]
Orch["Claude Code / Codex / Antigravity / Grok"]
end
subgraph MCP["MCP Stdio Server (lib/server.mjs)"]
Router["Tool Dispatch & Validation"]
CwdLock["Workspace Read/Write Mutex"]
Policy["4-Tier Sandbox Permission Policy"]
Summary["Structured Summary Contract"]
Offload["Large Output Auto-Offload (.dsh-reports/)"]
HubCli["Dynamic Discovery & Hot Reconnect Client"]
end
subgraph Hub["DSH Hub Plugin (src/hub/index.mjs)"]
Http["Loopback HTTP API (/_dsh/dsh-crew/*)"]
PortDisc["hub.json Live Port Broadcast"]
SessionPool["Persistent Session Pool (WorkerRegistry)"]
Reaper["Idle Session Automatic Reaper"]
Watchdog["Turn-Level Watchdog (turnEpoch)"]
end
subgraph UI["DSH Settings Web UI (lib/client.js)"]
ModelUI["Flash/Pro Visual Selector & Route Probe"]
SessionUI["Active Session Monitor & Close Button"]
JobsUI["Aggregated Jobs Board & Lock Indicator"]
end
Orch -->|"MCP stdio"| MCP
HubCli -->|"127.0.0.1 / hub.json"| Http
UI -->|"Loopback Fetch"| Http🛠️ 8 MCP Tools Reference
Tool Name | Purpose | Key Parameters |
| Blocking execution (supports persistent session) |
|
| Asynchronous background dispatch |
|
| Inspect live task progress & CWD advisory locks | None |
| Retrieve settled task result with summary parsing |
|
| Terminate running task and release its CWD lock |
|
| Inspect or override session configuration |
|
| Test route connectivity with a no-op tool call |
|
| Explicitly destroy persistent session with tombstone |
|
Configuration File: ~/.config/dsh-crew/config.json
{
"mode": "auto", // auto | hub | standalone
"default_tier": "flash", // flash | pro
"default_effort": "high", // off | high | max
"persistent_sessions": false, // Global toggle for persistent sessions
"persistent_session_idle_timeout_enabled": true, // Auto-reap idle sessions toggle
"persistent_session_idle_timeout_minutes": 30, // Idle timeout threshold (1-1440 min)
"preset_flash": "default", // Agent preset for Flash tier
"preset_pro": "default", // Agent preset for Pro tier
"report_dir": "" // Custom path for reports (empty = default)
}Key Environment Variables
DSH_CREW_MAX_PERMISSION: Caps maximum permissible sandbox privileges (read-only|workspace-write|auto|full-access).DSHPLUGIN_CREW_HUB: Override URL to force a fixed Hub loopback address.DSH_CREW_ORIGIN_CHAIN/DSH_CREW_DEPTH: Protects against cyclic dispatch loops and recursion deadlocks.
📄 License & Credits
This project is licensed under the MIT License.
Upstream Copyright: Copyright (c) 2026 ZSeven-W
Enhanced Fork Copyright: Copyright (c) 2026 xiaobaijiadepugongyingpai-coder
Our sincere gratitude to the upstream ZSeven-W/dsh-crew community for providing the foundational architecture.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Multiple MCP tools, persistent graph memory, token-saving data pointers, and more.
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Hosted MCP server for task-first delegation to remote workstations and workers.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceLets any MCP-capable coding harness (Cursor, Claude Code, Codex, Gemini CLI, VS Code/Copilot, opencode, and others) hand a self-contained task to a real, isolated DeepSeek Harness process that works in a chosen workspace with its own context window, model, and toolchain, then returns the final answer. Exposes task submission with time estimates and acceptance criteria, status polling with live progress and process-tree telemetry, graceful cancel and forced kill of whole process trees, and a health probe reporting concurrency, deadlines, and recent jobs.2MIT
- AlicenseNot gradedqualityAmaintenanceEnables hosts like Claude Code, Codex, Antigravity and Grok to dispatch work to DeepSeek Harness agents as native subagents with live progress, tier/effort presets, escalation, workspace guardrails and a jobs board. It also bridges multimodal capability into the text-only harness, letting workers read images and generate them.354 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables orchestrating hosts such as Claude Code, Codex, Antigravity and Grok to dispatch work to DeepSeek Harness agents that surface as native subagents with live progress, per-tier presets, effort control, guardrails and a jobs board. It also lends text-only harness models vision and image generation through a multimodal bridge that prefers native DeepSeek VL models and falls back to local CLIs or OpenAI-compatible endpoints.354 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables orchestrating hosts like Claude Code, Codex, Antigravity and Grok to dispatch work to DeepSeek Harness agents as native subagents, with tier/effort policy, escalation, workspace guardrails, a jobs board and in-host or standalone worker sessions. Also lends text-only harnesses vision and image generation through DeepSeek's VL model or fallback CLIs and custom providers.354 npmMIT