PsChina/deepseek-as-subagent
View on GitHub ↗Run DeepSeek as a real sub-agent inside Claude Code / Codex CLI — DeepSeek gets its own 7-tool agent loop in a sandboxed workspace, not just a single LLM call.
26 ★6 forksPythonUpdated 1mo ago
What you need to know
An MCP server that runs DeepSeek as a real sub-agent inside Claude Code/Codex. Claude stays on the main loop and delegates batch/mechanical work through one delegate_to_deepseek tool, with DeepSeek using its own sandboxed agent loop.
Install
curl -sSL https://raw.githubusercontent.com/PsChina/deepseek-as-subagent/main/curl-install.sh | bash git clone https://github.com/PsChina/deepseek-as-subagent && cd deepseek-as-subagent && ./install.sh
Usage
- •paste your DeepSeek API key into ~/.deepseek-mcp/config.json
- •Run /ds <task> to force delegation or let Claude decide
Key features
- ✓delegate_to_deepseek with a full local agent loop
- ✓7 sandboxed tools (Read/Write/Edit/Bash/Glob/Grep/NotebookEdit)
- ✓Path sandbox and command blacklist safety
- ✓Skill + slash command so Claude knows when to delegate
- ✓Works with Claude Code, Codex, Cursor, Cline
Best for
Saving tokens on large batch/mechanical coding work by offloading it to a cheap model
Caveats
- ⚠Requires a DeepSeek API key (paid)
- ⚠Delegation must be decided before Claude reads source files, or costs go up
Platforms: macOS · Linux · WindowsClients: Claude Code · Codex · Cursor · Cline · Claude Desktop
Reviewed 2026-08-11
Topics
agent-loopai-agentclaude-codecodex-clideepseekllm-orchestrationmcpmodel-context-protocolsub-agenttoken-optimization
- Stars
- 26★
- Forks
- 6
- Language
- Python
- License
- MIT
- Created
- 2026-05-11
- Last push
- 2026-07-16