Deepseek As Subagent logo

Deepseek As Subagent

by PsChina

Delegate coding or read-only workspace tasks to DeepSeek through MCP, with tools, background jobs, and controlled file access.

Install Deepseek As Subagent

Run the project’s own setup commands, in order.

Setup steps from the project

PsChina/deepseek-as-subagent installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    git clone https://github.com/PsChina/deepseek-as-subagent.git
    
  2. 2. Install
    cd deepseek-as-subagent
    
  3. 3. Install
    ./install.sh
    
  4. 4. Install
    git clone https://github.com/PsChina/deepseek-as-subagent
    
  5. 5. Install
    bash adapters/codex/install.sh
    

Overview

PsChina/deepseek-as-subagent connects Claude Code or Codex CLI to DeepSeek or another OpenAI-compatible local model as an autonomous sub-agent. Coding delegations can read, modify, search, and test within a workspace, while read-only delegations are limited to file inspection and static analysis. MCP tools support direct requests and steerable background jobs, with optional contracts for tool permissions, path scopes, and resource budgets. Reach for it when the host agent should hand off a complete coding or analysis task instead of sending isolated prompts.

Use cases

  • Delegate implementation tasks to a workspace-aware coding sub-agent
  • Ask DeepSeek to inspect and summarize a repository
  • Run steerable background coding or analysis jobs
  • Review files with a read-only agent loop
  • Apply contract-scoped delegation with mutation budgets

Key features

  • DeepSeek agent loop with workspace tools
  • Separate coding and read-only delegation APIs
  • Background jobs with status, messaging, cancellation, and results
  • OpenAI-compatible hosted or local model support
  • Workspace path boundaries and mutation recovery
  • Optional Task Contracts with scoped permissions

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

25/26 checks healthy over the last 112d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars62Stargazers on the source repository.
Last commit8d agoMost recent push to the default branch.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Deepseek As Subagent works

What PsChina/deepseek-as-subagent does

PsChina/deepseek-as-subagent exposes DeepSeek through an MCP server implemented in Python and connected over stdio. It is designed for Claude Code and Codex CLI, and is also listed for use with Cursor, Cline, and Claude Desktop. The provider connection uses an OpenAI-compatible Chat Completions API, so the configured backend can be DeepSeek's hosted service or a compatible local model.

The main distinction is that the delegated model receives its own agent loop rather than one prompt-and-response call. The host agent can pass a complete logical unit of work, allowing the sub-agent to inspect the workspace, perform actions, and return a result for host-side verification.

How it works

Coding delegation provides Read, Write, Edit, Bash, Glob, Grep, and NotebookEdit capabilities. File operations are restricted to the configured workspace, and outbound symlinks are rejected. Bash runs on the trusted host with the workspace as its working directory; commands are bounded and credential-isolated, but this is not an operating-system sandbox.

Read-only delegation uses only Read, Glob, and Grep. It can review files, search the workspace, and perform static analysis without command execution or file mutation. Both modes support synchronous delegation and background jobs. A background task returns a job ID that can be used to send another message, check status, cancel the task, or retrieve its result.

Optional Task Contracts add per-delegation tool permissions, workspace-relative file scopes, and limits on tool calls and mutations. Contract-aware execution disables Bash, checks scopes during dispatch and after canonical path resolution, and preserves built-in secret-path denials. Results include policy checks, resource accounting, mutation digests, and host-observed workspace readback for review.

Setup and configuration

The project supports macOS, Linux, and Windows, and requires Python 3.10 through 3.12. For Claude Code, clone the repository and run ./install.sh. For Codex CLI, run bash adapters/codex/install.sh from the repository. The installers create an isolated runtime, validate the configuration and MCP protocol, then update the host registration.

Hosted DeepSeek access uses DEEPSEEK_API_KEY. On POSIX systems, the key can be placed in ~/.deepseek-mcp/config.json; on Windows, set the environment variable. A local loopback OpenAI-compatible server does not require a DeepSeek key. Provider profiles include flash and pro, while the actual provider model IDs are controlled through configuration.

Tools and capabilities

The server includes these delegation entry points:

  • delegate_to_deepseek for coding work
  • delegate_to_deepseek_readonly for read-only analysis
  • start_deepseek and start_deepseek_readonly for background jobs
  • Shared controls for sending messages, checking status, cancelling jobs, and retrieving results
  • Contract-aware variants with scoped permissions and budgets

The coding path also includes a crash-safe mutation journal for Write, Edit, and NotebookEdit operations, recovery queries, file verification, and acknowledgement before another mutation-capable delegation. A cross-process execution lease prevents concurrent DeepSeek runs against the same workspace.

Limitations and notes

Trusted-host Bash is not an OS-level sandbox, and Bash changes are not covered by the mutation journal. Contract results provide review evidence rather than proof of functional correctness or complete isolation. Mutation-capable hosts must complete the recovery, verification, and acknowledgement flow before starting another delegation; read-only usage does not require that handshake.

The server uses stdio transport. Local Python module signatures are implementation details rather than a stable public interface, and clients should not depend on exact health or error message text. Installers retain the active generation and one previous generation for recovery, and manual runtimes must remain outside delegated workspaces when file mutation is enabled.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Deepseek As Subagent

PsChina/deepseek-as-subagent is an MCP server that connects Claude Code or Codex CLI to DeepSeek or another OpenAI-compatible local model. Its main tools delegate coding or read-only work, start background jobs, send follow-up messages, inspect status, cancel jobs, and retrieve results.

Install it by cloning the repository and running `./install.sh` for Claude Code, or `bash adapters/codex/install.sh` for Codex CLI. Python 3.10–3.12 is required. Configure `DEEPSEEK_API_KEY` or a local compatible model before starting the client.

Yes, Cursor is listed as a compatible MCP client. The server uses stdio transport and exposes its coding, read-only, and background-job tools through MCP.

Yes, it can use a local loopback server that implements the OpenAI-compatible Chat Completions API. A local loopback model does not require a DeepSeek API key.

No, coding Bash runs on the trusted host and is bounded and credential-isolated rather than OS-sandboxed. Workspace path checks, contract scopes, and mutation controls provide additional restrictions and review evidence.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDeepseek As Subagent AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/pschina-deepseek-as-subagent?style=directory)](https://allmcps.com/mcp/pschina-deepseek-as-subagent)
HTML Embed
<a href="https://allmcps.com/mcp/pschina-deepseek-as-subagent"><img src="https://allmcps.com/api/badge/pschina-deepseek-as-subagent?style=directory" alt="Deepseek As Subagent on AllMCPs" /></a>