mcp-swarm-router

mcp-swarm-router

This MCP server enables LLM hosts to plan large tasks and delegate subtasks to specialized local CLI agents, such as Codex and Claude Code, using tools like delegate_task and get_agent_roster.

Category
Visit Server

README

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.

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured