agent-rack wraps command-line AI coding agents behind a single Model Context
Protocol server. It ships with four agents built in —
claude, codex, opencode, and Antigravity (agy) — but isn't limited to them: any other
local CLI coding agent can be wired in with a small adapter (see
Connecting your own CLI agent). Point any MCP client at it, and it spawns sub-agents
synchronously for one-shot tasks, or as background sessions with log streaming, follow-up
input, and cancellation.
It also ships a structured, adversarial-capable code review tool
(agent_review) that runs read-only and returns validated JSON instead of free text, plus
9 packaged commands and 2 auto-activated guidance skills for Claude Code, Cursor, and
Antigravity.
Contents
- What it's for — why delegate to a CLI sub-agent at all
- Supported MCP clients and agents
- Install — Claude Code plugin,
setup wizard, or per-client install
- Requirements
- MCP tools —
agent_run, agent_session_*, per-agent shortcuts
- Skills — slash commands for Claude Code, Cursor, Antigravity
- Structured code review (
agent_review)
- How it works — adapters, engine, tools
- Configuration —
agent-rack.config.json, adding an agent profile
- Security model — workspace boundary, execution policy, SSE auth
- CLI commands —
start, setup, dashboard, session, agents, …
- Troubleshooting
- FAQ
- Connecting your own CLI agent
- Contributing · License
What it's for
The main thing agent-rack buys you is another agent's context, not just another tool call. A
sub-agent reads files, runs commands, and reasons on its own budget, then hands back a result —
so the work never lands in your main conversation's context window.
- Parallel sub-agents. Fan several background sessions out at once (
agent_session_create),
poll them, and collect results — a test-fixing session, a docs session, and a refactor session
running side by side.
- Second-opinion code review. Have Codex review what Claude Code just wrote (or the reverse)
via
agent_review, and get validated JSON findings
back instead of prose you have to re-read.
- Model and vendor diversity. Your client stays whatever you like using; the sub-agent can be
a different CLI, a different vendor, and a different model per call
(see Changing models).
- Long-running work off the critical path. Start a migration or a large test run as a
background session, keep working, and check on it with
agent_session_logs or the
terminal dashboard.
- One protocol for every CLI. Any local CLI coding agent — including one that isn't built in
— becomes the same set of MCP tools everywhere
(see Connecting your own CLI agent).
You keep using whichever CLIs you already pay for: agent-rack drives the binaries on your
$PATH with your existing logins. It never asks for an API key and never calls a model itself.
Supported MCP clients and agents
Clients agent-rack can register itself with (see Install):
| MCP client | Command | Scope |
|---|
| Claude Code | agent-rack install --target claude (or the plugin) | project or user |
| Codex CLI | agent-rack install --target codex | user |
| Claude Desktop | agent-rack install --target desktop | user (macOS path) |
| Cursor | agent-rack install --target cursor | project or user |
| Antigravity | agent-rack install --target antigravity | user |
| OpenCode | agent-rack install --target opencode | user |
| VS Code, GitHub Copilot, anything else | agent-rack snippet vscode → paste the JSON | — |
Agents it can spawn as sub-agents:
| Agent | Agent id | CLI | Transport | Follow-up input |
|---|
| Claude Code | claude | claude | claude_stream_json | yes — resume |
| Codex | codex | codex | codex_exec_json | yes — resume |
| OpenCode | opencode | opencode | pty_interactive | yes — live |
| Antigravity | agy | agy | agy_stream | no |
| Your own CLI | anything | anything | pty_interactive or a custom adapter | depends |
See Follow-up input for what live and resume mean — they need the session
to be in opposite states.
Install
Using Claude Code? Skip the steps below entirely and install the
Claude Code plugin instead — it registers the MCP server
automatically and adds slash commands (/agent-rack:run, /agent-rack:review, …) for every tool:
/plugin marketplace add lakpriya1s/agent-rack
/plugin install agent-rack@agent-rack
/reload-plugins
For every other MCP client, no cloning, no config file to write by hand — just register it.
Not sure which targets apply to you? Run the interactive wizard instead — it detects what's
actually installed (including project-local .claude/.cursor folders, offering
project-vs-global registration for those two) and asks before registering with each:
Or register with a specific target directly:
npx agent-rack install --target claude # Claude Code CLI
npx agent-rack install --target codex # Codex CLI
npx agent-rack install --target desktop # Claude Desktop
npx agent-rack install --target cursor # Cursor
npx agent-rack install --target antigravity # Antigravity
npx agent-rack install --target opencode # OpenCode
npx agent-rack snippet vscode # print a snippet to paste anywhere else
claude and cursor also accept --scope project to register only for the current project
(a git-shareable .mcp.json/.cursor/mcp.json in the project root) instead of globally for
every project — see install below for details.
Then restart your MCP client to pick up the new tools. That's it — with no config file present,
agents are automatically scoped to whichever directory your MCP client launches the server
from (almost always your project root). See Configuration below only if you
need to customize that.
Prefer a global install so the agent-rack command is always on hand?
npm install -g agent-rack
agent-rack install --target claude
--target desktop writes to macOS's Claude Desktop config path
(~/Library/Application Support/Claude/claude_desktop_config.json). On other platforms, run
agent-rack snippet claude-desktop and paste the printed JSON into your config by hand.
Adding another client later
None of this is a one-time-only step. install --target <x> and setup are both safe to run
again at any point after your first install — each target's registration is independent, so
adding Cursor six months after you set up Claude Code doesn't touch Claude Code's registration at
all, and re-running the same target is idempotent (it just confirms/repairs that one entry).
There's nothing to migrate and no shared state between clients to keep in sync — every client
still resolves the same agent-rack.config.json (see Configuration), it's only
which clients know to spawn agent-rack that changes. Just restart the newly-registered client
afterward to pick up the tools.
Requirements
- Node.js 20+
- Whichever underlying CLI(s) you intend to run must be on
$PATH: claude, codex,
opencode, and/or agy. Check with npx agent-rack agents.
MCP tools
Two execution models, pick based on how long the task runs and whether you need to watch it:
- Synchronous —
agent_run blocks until the sub-agent finishes and hands back its output
directly. Simplest option for one-shot tasks.
- Asynchronous —
agent_session_* starts a sub-agent in the background and returns a
sessionId immediately. Poll agent_session_status, stream agent_session_logs, or stop it
early with agent_session_cancel. Use this for anything long-running or that you want to
monitor mid-flight.
Follow-up input
agent_session_send continues a session's conversation. How it does that — and therefore what
status the session must be in — depends on the agent's followUpMode: