# forge-delegate

> forge-delegate is an MCP server for developer tools. Hand high-volume coding work from Claude Code or Codex to cheaper models through opencode. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI, macOS, Windows, Linux
- **Repository:** https://github.com/muhamadbarzani/forge-delegate
- **MCP Registry name:** io.github.MuhamadBarzani/forge-delegate
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm)
- **Listing updated:** 2026-11-18

## About

Forge-delegate keeps a primary coding agent's context small by passing routine work to another model and returning only a summary. Its main tool, delegate, lets the chosen model work autonomously through opencode's own tool loop on your machine, so file contents never enter the main agent's context; long jobs can run in the background and be polled by id.

The README draws a clear line: send tests for specified behaviour, boilerplate, mechanical edits, lint and type fixes, and docstrings; keep architecture, security-sensitive code, concurrency and hard debugging on the main agent. Each result ends with token usage and, where the provider reports it, cost.

A single npx setup registers the server with Claude Code, Codex and opencode, sets a default model, and installs a delegate-work skill so the triggers stay active across a long session. It needs opencode v2 or newer, and free opencode models need no sign-in. forge-delegate reuses your opencode credentials and stores no keys.

## Features

- **Autonomous delegation:** A cheaper model works through opencode's tool loop and reports back.
- **Background jobs:** Long tasks return a job id to poll.
- **Second opinions:** Ask another model a question through a direct API call.
- **One-command setup:** npx setup registers the server with Claude Code, Codex and opencode.
- **Usage reporting:** Each delegation ends with tokens used and cost when available.
- **Delegate-work skill:** Installs a skill that keeps delegation triggers active in long sessions.

## Good for

- Generate tests for a well-specified function
- Rename a symbol across many files
- Fix lint and type errors in bulk
- Get a second model's view on a design question
- Write docstrings and changelog sections

## Install

### Claude Code (Terminal)

```sh
claude mcp add forge-delegate -- npx -y forge-delegate
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "forge-delegate": {
      "command": "npx",
      "args": [
        "-y",
        "forge-delegate"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "forge-delegate": {
      "command": "npx",
      "args": [
        "-y",
        "forge-delegate"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "forge-delegate": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "forge-delegate"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "forge-delegate": {
      "command": "npx",
      "args": [
        "-y",
        "forge-delegate"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "forge-delegate": {
      "command": "npx",
      "args": [
        "-y",
        "forge-delegate"
      ]
    }
  }
}
```

## Tools

- `ask_model`: Gets a second opinion from another model through a direct API call.
- `delegate`: Has a model work autonomously via opencode, inline or in the background.
- `check_delegation`: Polls a background job or lists all jobs.
- `list_models`: Lists local, direct-API and agentic models.
- `get_delegate_config`: Reads the current configuration.
- `set_delegate_config`: Changes configuration at runtime.

## FAQ

### Which agents can delegate?

Claude Code, Codex and opencode.

### What does it require?

Node.js 18 or newer and opencode v2 or newer.

### Can I try it without paying?

Yes. opencode ships free models under opencode/ that need no authentication, though free tiers are rate-limited.

### Does it store my API keys?

No. It reuses the credentials already logged into your opencode.

### How do I add forge-delegate to Claude Code?

Run this command in your terminal: claude mcp add forge-delegate -- npx -y forge-delegate

### What are the best alternatives to forge-delegate?

The closest alternatives to forge-delegate are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/forge-delegate
