mcp-swarm-router
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-swarm-router Plan a full-stack app and delegate subtasks to codex and claude-code."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP-Swarm-Router
An MCP server that lets an LLM host (e.g. Claude Code) plan a large task, then delegate subtasks to local CLI agents based on their specialization — a "swarm router" for tools already installed on your machine.
Roster
id | specialization | CLI assumed | non-interactive invocation |
| Image generation & heavy tools |
| |
| UI/UX design & creative | Google Antigravity CLI ( |
|
| Hard coding & logic |
|
--sandbox workspace-write / acceptEdits / --dangerously-skip-permissions are there so
each CLI can actually write files without blocking on an approval prompt — none of these
processes have a TTY, so an unhandled prompt would hang until timeout_ms.
Edit src/registry.ts to add/remove agents or change how
each one is invoked.
Related MCP server: delegations-mcp
Tools
get_agent_roster— returns the roster above as JSON (id, specialization, description, resolved CLI command). Call this first to decide whichagent_namefits a subtask.delegate_task— spawnsagent_name's CLI inworkspace_pathwithprompt, waits for it to exit (or hittimeout_ms, default 15 min, max 1 hour), and returns{ exitCode, signal, stdout, stderr, timedOut, durationMs }. Output per stream is capped at ~5MB (further output is dropped andtruncatedis set).
There's also a plan-and-delegate MCP prompt that spells out the intended
workflow: call get_agent_roster → break the task into subtasks → confirm
the plan for anything large → run delegate_task per subtask → summarize
results.
Setup
npm install
npm run buildEach agent's CLI must be installed and reachable on PATH under the name in
src/registry.ts (codex, agy, claude). If your local install differs,
copy .env.example to .env (or set the vars in your shell / MCP client
config) to point at the real binary:
MCP_SWARM_CODEX_CMD=
MCP_SWARM_AGY_CMD=
MCP_SWARM_CLAUDE_CMD=Spawning goes through cross-spawn
rather than a shell, so Windows .cmd/.bat shims (npm global installs)
resolve correctly and the prompt text can't be interpreted as shell
metacharacters.
Register with an MCP client
{
"mcpServers": {
"swarm-router": {
"command": "node",
"args": ["C:/KERJAAN/mcp-swarm-router/dist/index.js"]
}
}
}Development
npm run dev # run src/index.ts directly via tsx
npm run build # compile to dist/
npm start # run the compiled serverAvailable Tools
2 toolsdelegate_taskDelegate TaskA
Spawns the named agent's CLI in workspace_path with the given prompt, waits for it to finish, and returns its stdout/stderr/exit code. Use get_agent_roster first to pick the right agent_name.
Inputs: prompt (required), agent_name (required), workspace_path (required), timeout_ms.
get_agent_rosterGet Agent RosterA
Returns the list of local agents available for delegation, each with its id and specialization. Call this before delegate_task to decide which agent_name fits a given subtask.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one provides an inventory of available agents, the other executes a task with a specified agent. There is no overlap or ambiguity between them.
Both tool names follow a consistent verb_noun pattern (get_agent_roster, delegate_task), using snake_case and clear action verbs. The naming is uniform and predictable.
With only 2 tools, the set is on the thin side but still covers the core workflow of a router: discovering agents and delegating to them. It feels slightly sparse for a 'swarm' concept, but each tool is essential.
The tool pair covers the full delegation lifecycle needed: learn who is available, then execute a task. Missing features like parallel delegation or cancellation are minor gaps for a simple router implementation, and agents can work around them by calling delegate_task repeatedly.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for agentverse documentation, generated by doc2mcp.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA lightweight MCP server that enhances AI agents with tools for codebase analysis, task delegation to sub-agents, multi-agent coordination through chatrooms, and project todo management.-
- FlicenseBqualityDmaintenanceAn MCP server that exposes a library of delegation prompts to orchestrate tasks between a primary LLM and specialized sub-agents. It enables the execution of self-contained, bounded tasks with built-in support for configuration discovery and project-specific delegation libraries.3-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that allows a planning agent to delegate tasks to executor agents (e.g., Claude Code, Aider) with bi-directional communication and real-time log streaming.19 npm15AGPL 3.0
- AlicenseAqualityDmaintenanceLocal MCP server that exposes delegation tools for Codex, Claude, and Antigravity CLI, enabling an orchestrator agent to assign tasks to these sub-agents via non-interactive CLI commands.3MIT