deepseek-as-subagent MCP

An MCP server that runs DeepSeek or your own local model as a sub-agent in Claude Code and Codex with its own tool loop.

  • 59 ★ on the repository
  • Last commit
  • MIT
MCP server

Broad access

Why this level

  • The delegated model writes files and runs shell commands in your workspace, and its content goes to an external API.
All reasons and checks

pschina/deepseek-as-subagent

Install

Manual install

git clone https://github.com/PsChina/deepseek-as-subagent.git

Then read `install.sh` and `requirements.lock` and run `./install.sh`.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The delegated model writes files and runs shell commands in your workspace, and its content goes to an external API.

This is third-party code. Review the repository files before installing.

What it does

The server delegates parts of the work to a configured model: DeepSeek through its API or any OpenAI-compatible local server. The model gets its own agent loop and reads and writes workspace files itself, while the main agent keeps the conversation, planning, judgment and verification. Most DeepSeek MCP servers make a single model call and the host reads the files itself. Here a whole logical unit of work is handed off, saving tokens on reading and writing. There are coding calls `delegate_to_deepseek` and `start_deepseek` (Read, Write, Edit, Bash, Glob, Grep, NotebookEdit) and read-only ones `delegate_to_deepseek_readonly` and `start_deepseek_readonly` (Read, Glob, Grep). Background jobs are steered by `send_deepseek_message`, `get_deepseek_status`, `cancel_deepseek` and `get_deepseek_result`. The host picks `flash` or `pro` profiles while the user sets the actual model IDs. For Claude Code a skill and a `/ds` command are installed.

Who it is for. Developers on Claude Code or Codex who want to hand token-heavy edits and code reading to a cheaper model and keep decisions with the main agent.

Good fit when

  • A large refactor splits into mechanical edits that can be handed to DeepSeek.
  • You need file analysis without running commands: the read-only calls fit.
  • A local model on an OpenAI-compatible server must act as a sub-agent.
  • A background job needs course corrections on the way and is steered with messages.

Not a fit when

  • The workspace must not be sent to an external model.
  • You need the guaranteed accuracy of a single call with no tool loop.
  • Python 3.10 to 3.12 is unavailable.

Example request

/ds inspect this workspace and summarize its structure.

MCP

Transport
stdio
Authentication
key is optional

Environment variables

DEEPSEEK_API_KEY secret
DeepSeek key on Windows; on POSIX the key lives in `~/.deepseek-mcp/config.json`.

Limitations

Python 3.10 to 3.12 and a DeepSeek key are required: in `~/.deepseek-mcp/config.json` on POSIX or the `DEEPSEEK_API_KEY` variable on Windows. A local OpenAI-compatible server on loopback needs no key. Coding always runs in `trusted_host` mode: bounded shell commands run without container isolation, and edits through Write, Edit and NotebookEdit are journaled while Bash changes are not. Workspace content goes to the chosen model.

How to disable. Remove the MCP server registration from the Claude Code or Codex configuration, the skill and the `/ds` command from the skill directories, and the cloned directory. Delete the key from `~/.deepseek-mcp/config.json` by hand.

FAQ

How do I install deepseek-as-subagent in Claude Code?

Clone the repository, read `install.sh` and `requirements.lock`, then run `./install.sh`. The installer installs hash-verified dependencies, registers the MCP server and deploys the skill and the `/ds` command.

How does it differ from ordinary DeepSeek MCP servers?

Ordinary ones make a single model call and the host reads files itself. Here the model gets its own tool loop and works with the workspace independently.

How do coding calls differ from read-only ones?

Coding calls can write files and run bounded commands, while read-only ones only read and search. Read-only calls need neither Bash nor Docker or Podman.

Can I pick a model profile?

Yes, the `model` argument accepts `flash` or `pro`, with `flash` as the default. Real model IDs are set in configuration.

How do I start a task with a command?

In Claude Code type `/ds` followed by a description, for example `/ds inspect this workspace and summarize its structure`.

Discussion

No questions or reviews yet.

An MCP server that gives Claude Code and Codex a cheap DeepSeek helper for classification, summaries and text cleanup.

MCP serverExtended access56Repository stars

MCP server that connects DeepSeek V4.1 Flash and V4 Pro to Claude Code and Codex with images, FIM and the Responses API

MCP serverExtended access366Repository stars

An MCP server that gives text models sight: it takes a clipboard image, sends it to Qwen-VL and returns a text description.

MCP serverExtended access63Repository stars

A MoonBit coding agent for DeepSeek, Kimi and GLM over an OpenAI-compatible API that runs without cloning the repository.

CLIBroad access107Repository stars

A skill that sets DeepSeek up as a native subagent of desktop Codex on macOS and Windows and verifies request routing

SkillExtended access394Repository stars

An MCP server that runs sub-agents defined in Markdown through Codex, Claude Code, Cursor CLI and other CLIs from any MCP client

MCP serverBroad access98Repository stars

README in short

The project is presented as a real sub-agent: the main agent keeps conversation and verification while the chosen model takes the heavy part. The docs cover the workspace boundary, an execution lease, a mutation journal and a network retry policy.

README badge

Report a problem