Skip to main content
Glama

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

codex

Image generation & heavy tools

OpenAI Codex CLI

codex exec --sandbox workspace-write "<prompt>"

agy

UI/UX design & creative

Google Antigravity CLI (agy, Gemini-based) — unverified, swap via env if wrong

agy -p "<prompt>" --dangerously-skip-permissions

claude-code

Hard coding & logic

Claude Code

claude -p "<prompt>" --output-format text --permission-mode acceptEdits

--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 which agent_name fits a subtask.

  • delegate_task — spawns agent_name's CLI in workspace_path with prompt, waits for it to exit (or hit timeout_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 and truncated is 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 build

Each 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 server

Available Tools

2 tools
delegate_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesThe task/instructions to hand to the agent's CLI.
agent_nameYesWhich agent to delegate to. One of: codex, agy, claude-code. See get_agent_roster for specializations.
timeout_msNoMax time to wait for the agent process, in ms. Defaults to 15 minutes, capped at 1 hour.
workspace_pathYesAbsolute path to the working directory the agent CLI should run in.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the spawn-wait-return mechanism and the return payload (stdout/stderr/exit code), adding real behavioral detail beyond the tool name. However, it does not warn about potential side effects of running an arbitrary agent CLI in the workspace, which is an important unmentioned behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the definitive action and outcome, with the follow-up usage hint. No wasted words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema and moderate complexity, the description sufficiently covers purpose, return values, and prerequisite usage. It omits timeout failure behavior, but the timeout parameter's schema description partially addresses it. Overall, the context is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers 100% of parameters with descriptions, so the baseline is 3. The description paraphrases how workspace_path and prompt are used but does not add semantic details beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('spawns') and resource ('agent's CLI'), and clearly distinguishes the tool from the sibling by describing execution rather than roster lookup. It explains the full lifecycle: spawn, wait, and return output/exit code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly directs the user to call get_agent_roster first to choose the correct agent_name, which provides clear usage context. It does not explicitly state when not to use this tool, but the sequencing guidance is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It clearly states the output (list with id and specialization) and implies a read-only operation via 'Returns'. It does not mention edge cases like empty roster or authentication, but for a simple getter the core behavior is transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the main purpose, followed by usage guidance. Every word earns its place with no fluff or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple no-parameter list getter with no output schema, the description covers the return fields and the use case. It could briefly mention what happens if no agents are available, but the provided context is sufficient for most scenarios. The sibling relationship is clearly defined.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the schema coverage is trivially 100%. Per the rubric, 0 params gives a baseline of 4, and the description does not need to explain parameters. No additional info is necessary.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description starts with 'Returns the list of local agents available for delegation', which is a specific verb and resource. It also mentions the returned fields (id and specialization), clearly distinguishing it from the sibling tool delegate_task.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states 'Call this before delegate_task to decide which agent_name fits a given subtask.' This gives a clear when-to-use directive and names the alternative tool, providing unambiguous usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.0
    • First observeddelegate_task
    • First observedget_agent_roster

TDQS

A4.3/5.0

Scored across 2 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count3/5

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.

Completeness4/5

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

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A 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.
    -
  • F
    license
    B
    quality
    D
    maintenance
    An 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
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    An 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.
    11
    15
    AGPL 3.0
  • A
    license
    A
    quality
    B
    maintenance
    Local 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.
    3
    MIT