Labsco
MCP SERVER

Agent Dispatch

by ginkida

Delegate a task to a Claude Code agent in another project directory — it runs there with that project's MCP servers, CLAUDE.md and tools, and hands the result back.

Model Routing, Multi-Model Consultation & Cost Control
Summary
Inspect before you dispatch — that is the whole cost model.

Every dispatch spawns a full Claude session, so the cheap lookup that reads an agent's config, detected MCP servers and CLAUDE.md preview without spawning anything is the tool you should reach for first. The README is equally clear about when not to use it: if you can do the task yourself, dispatching is the expensive answer. Budget, timeout and tool allowlists are per agent, so a gateway agent with wide permissions does not hand those permissions to everything else.

What it is

An MCP server for cross-project delegation. Each registered agent is a project directory; dispatching to one spawns a separate `claude -p` session inside it, so the agent inherits that project's MCP servers, instructions and tooling rather than working blind from your context. Related projects can be bundled into a group with a shared brief, so one session can coordinate work spanning code, deploy and verification.

What you get
  • The configured agents listed with health, detected MCP servers, stacks and databases, read from each project's own files — `list_agents`
  • A cheap detailed lookup that reads an agent's config and CLAUDE.md and README previews without spawning a session, so you can confirm the fit before paying for a probe — `inspect_agent`
  • One-shot delegation with the result cached, so identical requests inside the TTL return instantly — `dispatch`
  • Asynchronous and parallel dispatch, streaming, multi-turn dialogue, plus status, wait, cancel and result retrieval — `dispatch_async`, `dispatch_parallel`, `dispatch_stream`, `dispatch_dialogue`, `dispatch_session`, `dispatch_status`, `dispatch_wait`, `dispatch_cancel`, `fetch_result`, `dispatch_jobs`, `dispatch_gc`
  • Groups as a descriptive layer: an orchestrator-facing `description` that is never injected into a member's prompt, and a member-facing `shared_context` that is prepended automatically when you dispatch with a group — `list_groups`, `inspect_group`
  • Agents managed at runtime with their own permission mode and allowed or disallowed tool lists — `add_agent`, `update_agent`, `remove_agent`
  • Cache inspection and clearing — `cache_stats`, `cache_clear`
  • Per-agent limits that are configuration rather than hope: budget, timeout, model, concurrency and dispatch depth
Requirements

The Claude Code CLI installed and authenticated — `claude --version` must print a version before anything else works; OAuth, API key and subscription authentication are all supported. Python with `pip install agent-dispatch` or `pipx install agent-dispatch`. `agent-dispatch init` writes the config and registers the MCP server with Claude Code at user scope; `agent-dispatch add <name> <path>` registers a project directory as an agent, with descriptions generated from the project's files. `agent-dispatch test <name>` dispatches a real task and exits 0 on success, and `agent-dispatch doctor` verifies the whole install. If a test fails with a permission error, `--allowed-tools "Bash,Read,Grep"` is the least-privilege fix and `--permission-mode bypassPermissions` the blunt one. Groups are managed with the `agent-dispatch group` CLI or by editing `agents.yaml`.

Setup effort

One command — pip install agent-dispatch