Agent Ex MCP logo

Agent Ex MCP

Dispatches Claude Code or OpenCode tasks to detached workers with SQLite tracking, continuation support, cancellation, and Feishu notifications.

Install Agent Ex MCP

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

Setup steps from the project

agent-ex-mcp 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
    npm i -g agent-ex-mcp
    
  2. 2. Install
    npx -y agent-ex-mcp@latest init
    
  3. 3. Run
    agent-ex init
    

Overview

agent-ex-mcp exposes MCP tools for dispatching Claude Code and OpenCode jobs to detached background processes. It records task state in SQLite, supports polling, cancellation, retries for selected transient errors, and continuation when a worker needs input. Use it when coding work should continue outside the active conversation, with optional Feishu notifications for terminal results.

Use cases

  • Delegate a self-contained coding ticket to a background worker
  • Draft an implementation plan in a repository without blocking the conversation
  • Review an existing design for feasibility gaps and contradictions
  • Resume a worker after answering a needs-input question
  • Receive Feishu notifications when tasks finish

Key features

  • Detached Claude Code and OpenCode executors
  • SQLite-backed task state machine
  • Needs-input continuation with up to five rounds
  • Transient-error retries with backoff
  • Feishu terminal-state notifications
  • Health checks and worker PATH diagnostics

Tools6

What Agent Ex MCP lets your agent do. Expand a tool for its parameters.

Self-reported~77 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.

Adoption & maintenance

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

Last commit4d agoMost recent push to the default branch.
Tools exposed6Callable tools this server registers over MCP.

How Agent Ex MCP works

What agent-ex-mcp does

agent-ex-mcp treats local AI coding agents as external workers. A submitted ticket runs in a detached process tree rather than occupying the foreground conversation, and the worker writes its outcome to a SQLite-backed task store. The supported built-in executors are Claude Code and OpenCode, with separate profiles for settings such as environment variables, model selection, and additional PATH entries.

The same dispatch mechanism supports implementation work, independent design drafts, and reviews. The distinction comes from the task prompt: for example, a worker can implement a self-contained ticket, write a plan into a repository, or inspect an existing plan for feasibility gaps and contradictions.

How it works

Tasks move through states including queued, running, needs_input, completed, failed, and cancelled. A worker can pause in needs_input; the answer is sent by submitting a continuation that refers to the original task. Continuation is limited to five rounds.

Use status polling to inspect task fields and retrieve a worker question, and use cancellation to stop work. Cancellation is idempotent for tasks that have already reached a terminal state. Selected transient failures—such as rate limits, service errors, and connection resets—are retried up to three times with increasing delays. Timeouts and hard failures are not retried.

The MCP server communicates through a standard process configuration. Its restart operation exits the server so the MCP host can start it again, while existing workers continue running. The version operation reports the build version, Git SHA, and build time.

Setup and configuration

Install the npm package globally with npm i -g agent-ex-mcp, or run its latest package through npx. The installed command is agent-ex. Node.js 22.5 or newer is required because both the server and runner use node:sqlite; a local claude or opencode command is also required.

Run agent-ex init for interactive setup. It detects available agent CLIs, collects provider and key settings, writes configuration under ~/.agent-ex, and prints an MCP registration snippet. Set AGENT_EX_HOME to use another data directory. The generated MCP configuration should use the absolute Node.js and server paths printed by init, because MCP hosts may launch processes without the shell's PATH.

Configuration secrets are kept in the data directory's .env file, while config.json uses environment-variable placeholders. Use agent-ex config set or agent-ex profile set for individual changes; rerunning init rewrites the configuration file after showing the proposed changes and creating a backup.

The optional dispatch skill can be installed with agent-ex skill install. It adds conventions for writing self-contained tickets, choosing delegation, continuing paused tasks, and avoiding conflicting write tasks in one directory. agent-ex doctor checks notification setup and worker PATH issues, and can apply deterministic fixes with --fix.

Tools and capabilities

  • agent_ex_submit starts a task or continues a task paused for input.
  • agent_ex_status returns task information and exposes the worker's question during needs_input.
  • agent_ex_cancel requests cancellation and safely handles already-terminal tasks.
  • agent_ex_version reports version and build metadata.
  • agent_ex_doctor returns diagnostic findings with severity, details, and fixes.
  • agent_ex_restart exits the server so the host can respawn it.

Feishu notifications can send a card when a task reaches a terminal state. A dry-run mode supports notification testing without sending the card.

Limitations and notes

Workers run Claude Code with permission prompts skipped or OpenCode with automatic permissions enabled. There is no additional confirmation layer, so use the tool only on machines and directories where those worker permissions are acceptable.

The MCP tools are low-level dispatch primitives; the optional skill provides the workflow guidance around them. Two write tasks should not run in the same directory. The server also depends on the local agent CLI, its profile configuration, and the MCP host's ability to launch the configured absolute paths.

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 Agent Ex MCP

agent-ex-mcp is an MCP server that connects AI conversations to local Claude Code and OpenCode executors. Its main tools submit coding tasks, report status, cancel work, continue tasks waiting for input, diagnose setup issues, report build metadata, and restart the host-managed server.

Install it with `npm i -g agent-ex-mcp`, or run `npx -y agent-ex-mcp@latest init` without a global install. Then run `agent-ex init` to detect local agent CLIs, create configuration, and print an MCP registration snippet.

Run `agent-ex init` and choose a detected provider. The command writes configuration under `~/.agent-ex`, stores secret values in `.env`, and creates profiles for the selected executor. Use profile commands to manage the default profile or individual settings.

Submit a continuation that references the paused task and includes the answer. A task in `needs_input` records the worker's question through `agent_ex_status`, then returns to running when continued, subject to the five-round continuation limit.

Yes. agent-ex-mcp can be registered as a standard MCP process in Cursor, and its optional dispatch skill can be linked into Cursor's skill location. Use the absolute Node.js and server paths printed by `agent-ex init`.

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