Forge Delegate logo

Forge Delegate

Delegates low-risk coding tasks to models run by opencode, keeping the primary agent's context focused.

Install Forge Delegate

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": {
    "forge-delegate": {
      "command": "npx",
      "args": [
        "-y",
        "forge-delegate"
      ]
    }
  }
}

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

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y forge-delegate

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

forge-delegate routes coding tasks from Claude Code, Codex, or opencode to models that opencode can run. Its `delegate` tool gives the secondary model an autonomous opencode tool loop, while `ask_model` provides direct API-based second opinions without file access. Delegations can run inline or in the background, with job polling, model discovery, and runtime configuration through additional MCP tools. Reach for it when repetitive, well-specified work should stay out of the primary agent's context.

Use cases

  • Delegate repetitive edits across many files
  • Generate tests for well-specified behavior
  • Fix lint, formatting, and type errors
  • Request a second opinion without file access

Key features

  • Autonomous delegation through opencode's tool loop
  • Inline and background jobs with polling
  • Direct API second opinions
  • Model discovery across local and agentic providers
  • Runtime configuration without reinstalling
  • Token and provider-reported cost reporting

Tools6

What Forge Delegate lets your agent do. Expand a tool for its parameters.

Self-reported~126 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

Recent health check succeeded.

6/6 checks healthy over the last 20d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · forge-delegate (npm)

Adoption & maintenance

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

GitHub stars4Stargazers on the source repository.
npm downloads2.5kPackage downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed6Callable tools this server registers over MCP.

How Forge Delegate works

What forge-delegate does

forge-delegate lets a primary coding agent hand off selected work to another model through opencode. The primary agents named by the project are Claude Code, Codex, and opencode. The delegated model handles its own tool loop locally, so file contents and high-volume interaction remain outside the primary agent's context; the primary agent receives a result summary, session information, and token usage.

It is aimed at low-risk, clearly specified work such as boilerplate, repetitive edits, tests, lint and type fixes, documentation updates, and straightforward migrations. Architecture, security-sensitive code, public interface decisions, ambiguous requirements, and difficult debugging are better kept with the primary agent.

How it works

MCP clients communicate with forge-delegate over stdio. For an autonomous task, delegate invokes opencode with a selected model, working directory, agent, variant, and approval policy. Calls return inline by default. A caller can set background: true to receive a job identifier and use check_delegation to poll it; Claude Code may automatically background work that runs for roughly two minutes or longer.

The server can use free, no-auth opencode/* models, or any provider already configured in the user's opencode installation. Provider credentials stay in opencode and are not stored by forge-delegate. Results include token usage and, when the provider supplies pricing, cost information.

Setup and configuration

The recommended installation uses Node.js 18 or newer and opencode version 2 or newer:

Terminal
npx -y forge-delegate setup --model "opencode/deepseek-v4.1-flash-free" --targets "claude,codex,opencode"

The setup command registers the MCP server with selected agents, sets a default model, installs an update launcher for published installs, and adjusts Codex MCP timeouts. Running it without flags starts an interactive setup. Windows users can use the same npx command from cmd or PowerShell. A checkout can be configured with node cli.mjs setup.

Configuration is stored in ~/.forge-delegate/config.json and is reread on every call. It can be changed through get_delegate_config and set_delegate_config, the forge-delegate config CLI, setup flags, or direct file edits. Supported settings include the default model and agent, reasoning variant, working directory, timeout, automatic approval, and named profiles. The FORGE_OPENCODE_TIMEOUT environment variable controls the delegation timeout.

The user scope writes agent configuration for all projects; project scope writes configuration inside the selected project and may require project trust or approval, depending on the host.

Tools and capabilities

  • ask_model requests a second opinion through a direct API call. It has no file access.
  • delegate assigns work to opencode's autonomous tool loop and supports inline or background execution.
  • check_delegation polls a background job or lists available jobs when called without an identifier.
  • list_models shows local or keyless, direct-API, and agentic models available to the setup.
  • get_delegate_config reads the active defaults and profiles.
  • set_delegate_config changes those settings without reinstalling the server.

Setup also installs a delegate-work skill for Claude Code and Codex unless disabled. The skill keeps delegation guidance available throughout a long session, where one-time MCP instructions may become less prominent.

Limitations and notes

Delegated work depends on a compatible opencode v2-or-newer installation. Older opencode binaries can fail because they do not support the command options used for working directories and variants. Non-free or non-opencode/* providers must be authenticated in opencode first; Ollama instead requires its local application to be running. Free model tiers may be rate-limited.

Automatic approval defaults to enabled for headless delegation, so review that setting before assigning tasks with meaningful permissions. The project specifically recommends retaining architecture, security, concurrency, performance-critical, ambiguous, and hard-to-detect correctness work on the primary agent.

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 Forge Delegate

forge-delegate is an MCP server that connects Claude Code, Codex, or opencode to models available through opencode. Its main tools include `delegate` for autonomous coding work, `ask_model` for direct second opinions, `check_delegation` for background jobs, and configuration and model-discovery tools.

Install it with `npx -y forge-delegate setup`, optionally supplying `--model`, `--targets`, and scope flags. The command registers the server with selected agents and works on Windows, macOS, and Linux.

forge-delegate requires Node.js 18 or newer and opencode version 2 or newer. The setup process can fetch opencode, and the server checks the opencode version when it starts.

Set it with `forge-delegate config set --model <model>` or use the MCP `set_delegate_config` tool. You can also provide `--model` during setup; configuration is stored in `~/.forge-delegate/config.json` and is read on each call.

Pass `background: true` to `delegate` to receive a job ID, then call `check_delegation` to poll the task. Calls are inline by default, while longer work can be explicitly run in the background.

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