Opencode subagents logo

Opencode subagents

Delegates Claude Code subagents to opencode models through a local stdio MCP server with worktrees, resumes, permissions, and background runs.

Install Opencode subagents

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "opencode-subagents": {
      "command": "npx",
      "args": [
        "-y",
        "opencode-subagent-mcp@0.1.3"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 5 tools correctly (6d ago).

Overview

The opencode subagents MCP server runs delegated Claude Code subagents on models available through opencode, including DeepSeek and opencode Go. It starts a private local `opencode serve` process, forwards delegated prompts and workspace operations, and returns reports, usage, and worktree results without proxying the main Claude Code session. Use it when inexpensive models are suitable for searches, refactors, bug fixes, tests, or research while retaining familiar subagent controls.

Use cases

  • Delegate code searches to a lower-cost opencode model
  • Run isolated refactors in git worktrees
  • Resume an agent after a server restart
  • Collect background test or research tasks
  • Apply Claude agent definitions to delegated work

Key features

  • Runs Claude Code subagents through opencode models
  • Supports background agents and resumable sessions
  • Provides git worktree isolation
  • Mirrors Claude permissions and agent definitions
  • Returns structured output with JSON Schema
  • Exposes progress and permission prompts through MCP

Tools5

What Opencode subagents lets your agent do. Expand a tool for its parameters.

Verified live~931 tokens of context

Security & health

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

ActiveLast checked 1d ago

Recent health check succeeded.

9/9 checks healthy over the last 41d

What it can do

From the 5 tools this server returned when we ran it; 1 declare their own safety hints.

Read-only tools · 5
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age37 days
Maintainers1

Observed 2026-11-02 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · opencode-subagent-mcp@0.1.3 (npm)

Adoption & maintenance

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

GitHub stars2Stargazers on the source repository.
npm downloads6.6kPackage downloads in the last 30 days.
Last commit5d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed5Callable tools this server registers over MCP.

How Opencode subagents works

What opencode subagents does

The opencode subagents MCP server lets a Claude Code session delegate work to models exposed by the opencode CLI. The main Claude Code conversation continues to use Anthropic directly; only delegated subagents run through opencode. Examples in the project documentation include DeepSeek and opencode Go models.

Delegated tasks can search a codebase, modify files, fix bugs, run tests, or perform research. The server can return a final report, usage information, structured output, and the result of any requested worktree isolation. It also supports background execution, resumable agents, permission prompts, and definitions stored in .claude/agents.

How it works

For each server run, a private opencode serve process starts on a random localhost port with a generated password. The process inherits the environment used by opencode, so provider logins and API keys already configured for the CLI remain available. The MCP server does not read, store, or transmit those credentials itself.

The server reads user and project Claude settings, agent definitions, and an optional configuration file. It uses MCP roots, CLAUDE_PROJECT_DIR, or its own working directory to determine the project location. Worktree isolation creates git worktrees under .claude/worktrees/; unchanged worktrees are removed, while changed ones remain with a summary.

Prompts, source files, and command output read by a subagent are sent to the selected model provider under that provider’s retention terms. opencode stores session history locally. The server reports no telemetry and makes no other network calls.

Tools and capabilities

The opencode subagents MCP server exposes five tools:

  • agent starts a subagent with settings such as model, working directory, isolation, permissions, turn limit, effort, tools, and output schema.
  • send_message continues a completed agent with its full history, including agents from an earlier server or Claude Code session.
  • wait collects a background agent and can use a timeout.
  • stop aborts a running agent and returns its available output.
  • list shows agents in the current session, Claude agent definitions, and opencode agents.

Agent identifiers remain usable after a restart because opencode persists their sessions. Permission requests appear as MCP elicitation dialogs, and progress is sent through MCP notifications. Structured output uses a JSON Schema supplied through output_schema.

Setup and configuration

The server requires Node 22 or newer, git, and the opencode CLI authenticated with the providers you intend to use. It can be installed as a Claude Code plugin or added as a plain MCP server with npx, using the commands documented by the project.

Optional settings belong in ~/.config/opencode-subagent-mcp/config.json, or in the file selected by OPENCODE_SUBAGENT_CONFIG. Supported settings shown in the documentation include a default model, default permission mode, the opencode executable name, a concurrency limit, and a maximum result length. OPENCODE_SUBAGENT_MODEL and OPENCODE_SUBAGENT_MODE override the corresponding defaults.

Limitations and notes

The opencode subagents MCP server does not show delegated agents in Claude Code’s /tasks view, support fork-with-parent-context, or allow the Workflow tool’s agent() function to target these agents. Hooks, skills preloading, memory, and per-agent MCP servers are not mapped.

Subagents cannot create additional subagents or ask the user questions because opencode’s task and question tools are disabled. The parent permission mode is not visible to MCP servers, so the default comes from configuration. In auto mode there is no safety classifier; configured rules and a fixed set of destructive commands still affect prompting.

The project is independent and is not affiliated with Anthropic or the opencode team.

Reviews

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

Frequently Asked Questions about Opencode subagents

opencode subagents is an MCP server that connects Claude Code to models available through the opencode CLI. Its main tools are `agent`, `send_message`, `wait`, `stop`, and `list`, supporting delegated tasks, background execution, resumption, cancellation, agent discovery, permissions, and optional git worktree isolation.

Install it either as a Claude Code plugin or as a plain MCP server using `npx`. The documented setup requires Node 22 or newer, git, and the opencode CLI authenticated with the providers you plan to use.

It uses models available through the opencode CLI, with the documentation giving DeepSeek and opencode Go as examples. You can set a default model in the configuration file or override it with `OPENCODE_SUBAGENT_MODEL`.

Yes. Use `send_message` with the agent identifier to continue a finished agent with its full history, including after a Claude Code or MCP server restart. `wait` and `stop` can also retrieve the outcome of an existing agent.

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 PreviewOpencode subagents AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/opencode-subagents?style=directory)](https://allmcps.com/mcp/opencode-subagents)
HTML Embed
<a href="https://allmcps.com/mcp/opencode-subagents"><img src="https://allmcps.com/api/badge/opencode-subagents?style=directory" alt="Opencode subagents on AllMCPs" /></a>