# Agent Ex

> Agent Ex is an open-source MCP server for developer tools. MCP server that hands coding tasks to background Claude Code or OpenCode agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/wuruofan/agent-ex
- **MCP Registry name:** io.github.wuruofan/agent-ex
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-27

## About

Agent Ex lets an AI client delegate self-contained coding jobs to external agent CLIs such as Claude Code and OpenCode. Each task runs in a detached background process, so a long job does not hold up the ongoing conversation. Progress is tracked in a local SQLite task store that can be polled, answered when an agent asks a question, or cancelled.

The same dispatch mechanism supports several workflows: handing off implementation, having one agent draft a design document, or having another agent review that document. Workers can be assigned to different provider profiles, each with its own environment variables, model and PATH additions. Transient API errors such as rate limits are retried automatically, and completion can trigger a Feishu (Lark) card notification.

It suits developers who already use local coding agents and want to run several of them in parallel. Workers run with permission prompts disabled, so it is intended for machines and directories the user controls.

## Features

- **Detached background execution:** Tasks run in their own process tree so the calling conversation stays responsive.
- **Task state tracking:** Tasks move through queued, running, needs input and terminal states, with up to five continuation rounds.
- **Multiple agent profiles:** Built-in Claude Code and OpenCode executors, each with its own env, model and PATH settings.
- **Answer agent questions:** Tasks waiting on input can be continued by submitting an answer to the same task.
- **Automatic retry on transient errors:** Rate limits, overload responses and connection resets are retried with backoff.
- **Feishu notifications:** Terminal task states can push a card to a Feishu bot, with a dry-run mode for testing.

## Good for

- Delegate a well-specified refactor to a background coding agent while continuing other work
- Have one agent write a design document and a second agent review it for gaps
- Run several coding tasks in parallel and collect their results later
- Get notified in Feishu when a long-running agent job finishes

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add agent-ex -- npx -y agent-ex-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "agent-ex": {
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "agent-ex": {
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

```json
{
  "mcpServers": {
    "agent-ex": {
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "agent-ex": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add agent-ex -- npx -y agent-ex-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.agent-ex]
command = "npx"
args = ["-y", "agent-ex-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "agent-ex": {
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user agent-ex npx -- -y agent-ex-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "agent-ex": {
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "agent-ex": {
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "agent-ex": {
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "agent-ex": {
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "agent-ex": {
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "agent-ex": {
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "agent-ex": {
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

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

```json
{
  "mcpServers": {
    "agent-ex": {
      "command": "npx",
      "args": [
        "-y",
        "agent-ex-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 6 tools changes data; 4 names don't say. From the server's own tool labels and tool names; not verified by us.

- `agent_ex_submit`: Submit a prompt as a background task to an external agent.
- `agent_ex_status` (name suggests: reads): Read task state and the question when input is needed.
- `agent_ex_cancel` (name suggests: changes): Cancel a running task.
- `agent_ex_version`: Report the server version and build information.
- `agent_ex_doctor`: Run diagnostics on the setup and notification path.
- `agent_ex_restart`: Restart the server so the host respawns it.

## FAQ

### What do I need to run Agent Ex?

Node.js 22.5 or newer and a local agent CLI, either claude or opencode.

### Which agents are supported?

Built-in executors for Claude Code and OpenCode, with profiles that can point them at different providers.

### Are permission prompts shown to the worker?

No. Workers run with the agent CLI's permission prompts skipped, so it should only be used on trusted machines and directories.

### How are API keys stored?

Config files hold placeholders only; real values are kept in a .env file in the data directory with restricted permissions.

### Is Agent Ex free?

Yes. Agent Ex is open source, so you can use and self-host it for free.

### How do I add Agent Ex to Claude Code?

Run this command in your terminal: claude mcp add agent-ex -- npx -y agent-ex-mcp

### What are the best alternatives to Agent Ex?

The closest alternatives to Agent Ex are Agent Link, AgentGo, LLM Provider MCP, Agent Intern and agentchan.

## Where this comes from

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

## Alternatives

- [Agent Link](https://ai-powered.com/mcp/agent-link): Agent Link is an open-source MCP server for developer tools.
- [AgentGo](https://ai-powered.com/mcp/agentgo-2): AgentGo is an open-source MCP server for developer tools.
- [LLM Provider MCP](https://ai-powered.com/mcp/llm-provider-mcp): LLM Provider MCP is an open-source MCP server for ai models and llm tooling.
- [Agent Intern](https://ai-powered.com/mcp/agent-intern): Agent Intern is an open-source MCP server for ai models and llm tooling.
- [agentchan](https://ai-powered.com/mcp/agentchan): agentchan is an open-source MCP server for developer tools.
- [AgentRQ](https://ai-powered.com/mcp/agentrq): AgentRQ is an open-source MCP server for productivity.
- [Nexus MCP](https://ai-powered.com/mcp/nexus-mcp): Nexus MCP is an open-source MCP server for developer tools.
- [Ai Cli MCP](https://ai-powered.com/mcp/ai-cli-mcp): Ai Cli MCP is an open-source MCP server for ai models and llm tooling.

---
Source: https://ai-powered.com/mcp/agent-ex
