# agent-link [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/mikusnuz/agent-link-mcp  
**GitHub Stars:** 11  
**npm Downloads (last month):** 224  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agent-link

## Description
Bidirectional AI agent collaboration — spawn and communicate with any agent CLI

## Tools
Capabilities this server exposes over MCP:

- **spawn_agent** — Spawn an AI agent to work on a task. Returns a question if the agent needs clarification, or a result when done.
- **spawn_agents** — Spawn multiple AI agents in parallel. Each agent runs independently and results are returned together. Great for getting multiple opinions, parallel code reviews, or distributing subtasks.
- **reply** — Reply to an agent that is waiting for clarification. Continues the conversation until the agent returns a result or asks another question.
- **kill_agent** — Terminate an active agent session and clean up its resources.
- **list_agents** — List all known agents and their availability on this system.
- **get_status** — Get the status of all active agent sessions.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

## Documentation

## What agent-link does

agent-link exposes local AI coding-agent command-line tools through MCP. A host agent can delegate a task to Claude Code, Codex, Gemini CLI, Aider, or another configured CLI, then receive either a completed result or a question requiring clarification. The host can answer that question with `reply`, allowing the work to continue.

The server supports both single-agent and multi-agent workflows. `spawn_agent` handles one task, while `spawn_agents` starts several independent tasks concurrently and returns their results together. This fits code review, bug investigation, architectural comparison, research followed by implementation, and other workflows where separate agents can work in parallel or provide different perspectives.

## How it works

The MCP host calls an agent-link tool, which launches the selected agent CLI as a subprocess. Tasks can include a working directory, file references, an error description, intent, or Git diff content. The selected CLI processes the request and returns text that agent-link interprets as a result or a clarification request.

A waiting session receives an identifier such as `codex-a1b2c3`. The host passes that identifier and its response to `reply`; agent-link invokes the CLI again with the recorded task, context, working directory, and conversation. This is a fresh CLI invocation rather than a provider-side session resume. Concurrent replies to the same session are rejected.

Sessions are held in memory and are lost when the server restarts. `kill_agent` waits for the child process to stop and escalates after five seconds if necessary. Shutting down the server also cancels active child processes.

## Setup and configuration

Node.js 20 or later is required, including the environment used by the MCP host's `npx` command. Install and authenticate each agent CLI you intend to use. The supported built-in profiles detect the `claude`, `codex`, `gemini`, and `aider` commands when they are available.

The server can be launched directly with:

```bash
npx agent-link-mcp
```

For example, Claude Code can register it with `claude mcp add agent-link npx agent-link-mcp`, and Codex can use `codex mcp add agent-link npx agent-link-mcp`. Only the host agent needs the MCP server; delegated agents run as subprocesses and do not need agent-link installed.

Aider requires either `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`. The other agent CLIs have their own installation and authentication steps, such as `claude login`, `codex login`, or Gemini's interactive sign-in flow.

Custom profiles are configured in `~/.agent-link/config.json`. Profiles can specify the executable command, arguments, prompt handling, and output format. JSON profiles must return one result object containing a string `result` field; error markers are treated as failures.

## Tools and capabilities

- `spawn_agent`: Start one agent with a task, optional context, model, reasoning level, retry behavior, escalation, working directory, and timeout.
- `spawn_agents`: Run multiple agent tasks in parallel and return aggregate counts plus individual results.
- `reply`: Answer a clarification question and continue the associated task.
- `kill_agent`: Stop an active session and clean up its resources.
- `list_agents`: Show detected agent commands and their availability.
- `get_status`: Show active sessions, agent identifiers, statuses, and start times.

Tasks can request automatic retries, with up to three attempts, and optional increases to the thinking level during retries. The default task timeout is one hour, with a maximum value controlled by the supplied timeout setting.

## Limitations and notes

The delegated CLIs must be installed and authenticated separately, and each may impose additional requirements. Agent-link works with command-line tools that accept a prompt and return text; custom JSON output must follow the expected result shape. In-memory sessions do not survive a restart, and a reply does not resume a provider-managed session.

_Full upstream README: https://allmcps.com/mcp/agent-link/readme_

