Claude MCP Swarm
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| --bare | No | Minimal headless mode (skip hooks, plugins, CLAUDE.md discovery, OAuth/keychain; API-key / provider auth only). | |
| --agent | No | Default agent name. | |
| --model | No | Default model alias or full name (e.g. opus, sonnet, haiku, fable). | |
| --tools | No | Built-in tools to expose ("" for none, "default", or comma-separated names). | |
| --agents | No | Default custom agents JSON object or file path. | |
| --effort | No | Default reasoning effort (low, medium, high, xhigh, max). | |
| --add-dir | No | Additional directory Claude can access by default (repeatable). | |
| --settings | No | Default extra settings JSON object or file path. | |
| --max-turns | No | Default maximum agentic turns per invocation. | |
| --mcp-config | No | Default MCP config file or JSON string (repeatable). | |
| --allowed-tools | No | Tool rule to allow by default (repeatable). | |
| --system-prompt | No | Default system prompt override. | |
| --fallback-model | No | Default fallback model(s), comma-separated. | |
| --max-budget-usd | No | Default maximum API budget in USD per invocation. | |
| CLAUDE_SWARM_BIN | No | Explicit path or command name for claude (auto-searches PATH and ~/.local/bin/claude). | |
| CLAUDE_SWARM_LOG | No | Log file path. Default: <user-runtime>/claude-swarm/claude_mcp_swarm.log | |
| --permission-mode | No | Default permission mode (acceptEdits, auto, bypassPermissions, manual, dontAsk, plan). | |
| --setting-sources | No | Comma-separated setting sources (user,project,local). | |
| --disallowed-tools | No | Tool rule to deny by default (repeatable). | |
| --strict-mcp-config | No | Only use MCP servers from --mcp-config by default. | |
| CLAUDE_SWARM_MIN_WAIT | No | Floor in seconds for claude_wait. | 150 |
| CLAUDE_SWARM_TASK_DIR | No | Task output storage directory. Default: <user-runtime>/claude-swarm/tasks (owner-only 0700 when using default). | |
| --append-system-prompt | No | Default text appended to the system prompt. | |
| CLAUDE_SWARM_LOG_LEVEL | No | Log level (DEBUG, INFO, WARNING, ERROR). | WARNING |
| --disable-slash-commands | No | Disable skills and slash commands by default. | |
| --no-session-persistence | No | Do not persist sessions to disk by default. | |
| CLAUDE_SWARM_TASK_MAX_AGE | No | Seconds after completion / last reply activity before task artifacts and worktrees are cleaned up. | 86400 |
| CLAUDE_SWARM_WORKTREE_DIR | No | Worktree storage directory. Default: <user-cache>/claude-swarm/worktrees (owner-only 0700 when using default). | |
| --dangerously-skip-permissions | No | Bypass all permission checks by default. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
claude-mcp-swarm wraps the Claude Code CLI (claude -p) for parallel execution, session resume, git worktree isolation, and live progress monitoring.
Execution lifecycle:
Sync calls (
claude,claude_reply) have no server timeout, but MCP clients typically enforce ~300s limits; useclaude_async+claude_waitfor long runs or parallel fan-out. Clients supporting MCP 2026-07-28 withio.modelcontextprotocol/tasksreceive native async tasks directly fromclaudeandclaude_reply(poll viatasks/get, cancel viatasks/cancel).claude_asynctask IDs are internal to this server and NOT tracked by legacy MCP clients. Always callclaude_waitin the same turn (passing all launched task_ids in one call).claude_statusis a read-only peek and collects nothing.Let
claude_waitrun past the client's ~120s auto-backgrounding threshold; short timeouts are raised to a floor (finished tasks still return instantly). A wait timeout is NOT a failure and does not kill tasks -- callclaude_waitagain.
Session resume, permissions & diagnostics:
claude_replyautomatically defaultscwdto the original session's working directory (including its worktree path if still present) unless overridden. Passfork_session: trueto branch into a newsession_id.Terminal
resultJSONL events determine completion or failure (includingis_error: true,error_max_turns,error_max_budget_usd, anderror_during_execution). Tool errors andpermission_denialsare surfaced structurally without retrying turns.
Worktree isolation:
worktree: truecreates an isolated git worktree and branch (claude-swarm/<id>) based onHEAD. Uncommitted and untracked working-tree changes are NOT included in the worktree -- commit them first if the task needs them. Expired worktrees (default 24h) are force-removed and their branches deleted on a subsequent launch.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| claudeA | Run a Claude Code ( |
| claude_asyncA | Launch a Claude Code task and return immediately with a task_id for parallel fan-out, then collect with a single claude_wait. CRITICAL: the task_id is internal to this server and NOT tracked by your MCP client -- you MUST call claude_wait in the same turn or results are stranded on disk. Pass session_id to resume an existing session asynchronously, and set worktree=true to isolate parallel edits in a HEAD-based git worktree. |
| claude_replyA | Continue a Claude Code session via |
| claude_statusA | Get live status of async Claude Code tasks (tool calls, tool errors, permission mode, token usage, and terminal failure details). This is a read-only peek: it collects nothing and does not keep a task attached to your session -- only claude_wait does that. A FAILED verdict here is not always authoritative when inferred without a terminal event or exit code (flagged explicitly in the output). |
| claude_waitA | Block until one or more async Claude Code tasks complete, then return all results. Pass every task_id you launched in ONE call. Let it run long past your client's backgrounding threshold (short timeouts are raised to a floor; finished tasks return instantly). A wait timeout does NOT kill tasks -- call claude_wait again to keep waiting. |
| claude_cancelA | Kill a running async Claude Code task and its child processes. Any worktree and partial output are preserved for inspection. If the task had already failed, the response includes its structured failure details. |
| claude_modelsA | List available Claude Code model aliases/identifiers, their resolved model IDs, and supported effort levels (queried live from the Claude Code CLI without starting a turn or persisting a session). Use this before passing a |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Server Info | Server version, configuration, and capabilities. |
| Server Config | Current server-level Claude Code CLI defaults. |
| Available Models | Available Claude Code model aliases, resolved IDs, and supported effort levels. |
| Active Tasks | List of all known async tasks and their current state. Includes session_id, model, usage, tool errors, permission denials, and failure details. |
TDQS
Scored across 7 tools
Most tools are clearly distinct: launch (claude/claude_async), resume (claude_reply), inspect (claude_status), collect (claude_wait), cancel, and model listing. The main overlap is between claude (synchronous) and claude_async (asynchronous launch), plus claude_reply versus claude_async with a session_id, but the descriptions explicitly clarify these boundaries.
Six of seven tools follow a predictable claude_<verb> snake_case pattern: claude_async, claude_reply, claude_status, claude_wait, claude_cancel, claude_models. The base synchronous runner is just named 'claude', which is a minor but understandable deviation.
Seven tools is well-scoped for managing Claude Code sessions and async tasks. Each tool maps to a distinct lifecycle operation: run, launch, resume, inspect, wait, cancel, and list models.
The surface covers the core lifecycle well: synchronous execution, asynchronous launch, resumption, status inspection, result collection, cancellation, and model discovery. Minor gaps include no explicit session/task listing or worktree cleanup/management tool, though worktrees are handled implicitly through launch and cancel.