agent-link — Claude Code MCP server: what it does, how to install
This MCP server lets your primary coding assistant launch, query, and coordinate CLI agents like Codex, Gemini, or Claude Code.
claude mcp add agent-link -- npx -y agent-link-mcpWhat agent-link does
The server enables two-way collaboration between AI coding tools through terminal subprocesses. When your working agent hits a blocker or needs code review before a merge, it can delegate work to another CLI. The system provides spawn_agent for isolated tasks and spawn_agents for parallel evaluations across multiple models.
Communication flows in both directions. A spawned subprocess can ask clarifying questions, and the host agent provides answers via reply. Each reply executes a fresh CLI command with the conversation history attached rather than resuming a remote session. Active session records live strictly in memory and vanish whenever the MCP server restarts.
Node.js 20 or newer is required. The host cannot spawn secondary agents unless those specific CLIs are already installed and logged in on your machine.
What it helps with
- delegate an unresolved error to an alternative agent CLI
- run parallel code reviews across two different models
- pass research findings from one assistant directly into another
- provide answers when a spawned agent asks for guidance
Example prompts for the agent
- Spawn Codex with agent-link to inspect the type errors inside src/utils.ts.
- Run parallel reviews on current git changes using both Claude and Codex.
- Send a reply to agent codex-a1b2c3 confirming that Redis should be used for caching.
How to install agent-link
Platform CLI
claude mcp add agent-link -- npx -y agent-link-mcpPlatform CLI
codex mcp add agent-link -- npx -y agent-link-mcpConfig file
{
"mcpServers": {
"agent-link": {
"command": "npx",
"args": [
"-y",
"agent-link-mcp"
]
}
}
}Config file
{
"servers": {
"agent-link": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"agent-link-mcp"
]
}
}
}Platform CLI
gemini mcp add agent-link npx -y agent-link-mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about agent-link
How to install agent-link in Claude Code?
Run claude mcp add agent-link -- npx -y agent-link-mcp in your terminal. You must have Node.js 20 or later installed.
What does agent-link do?
It allows an MCP-compatible agent to start other coding CLIs as child processes. Agents can exchange questions, analyze diffs, and work on subtasks together.
Do spawned agents require separate authentication?
Yes. Every secondary tool must be installed and authenticated locally beforehand, such as running codex login or setting environment keys for Aider.