Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
--bareNoMinimal headless mode (skip hooks, plugins, CLAUDE.md discovery, OAuth/keychain; API-key / provider auth only).
--agentNoDefault agent name.
--modelNoDefault model alias or full name (e.g. opus, sonnet, haiku, fable).
--toolsNoBuilt-in tools to expose ("" for none, "default", or comma-separated names).
--agentsNoDefault custom agents JSON object or file path.
--effortNoDefault reasoning effort (low, medium, high, xhigh, max).
--add-dirNoAdditional directory Claude can access by default (repeatable).
--settingsNoDefault extra settings JSON object or file path.
--max-turnsNoDefault maximum agentic turns per invocation.
--mcp-configNoDefault MCP config file or JSON string (repeatable).
--allowed-toolsNoTool rule to allow by default (repeatable).
--system-promptNoDefault system prompt override.
--fallback-modelNoDefault fallback model(s), comma-separated.
--max-budget-usdNoDefault maximum API budget in USD per invocation.
CLAUDE_SWARM_BINNoExplicit path or command name for claude (auto-searches PATH and ~/.local/bin/claude).
CLAUDE_SWARM_LOGNoLog file path. Default: <user-runtime>/claude-swarm/claude_mcp_swarm.log
--permission-modeNoDefault permission mode (acceptEdits, auto, bypassPermissions, manual, dontAsk, plan).
--setting-sourcesNoComma-separated setting sources (user,project,local).
--disallowed-toolsNoTool rule to deny by default (repeatable).
--strict-mcp-configNoOnly use MCP servers from --mcp-config by default.
CLAUDE_SWARM_MIN_WAITNoFloor in seconds for claude_wait.150
CLAUDE_SWARM_TASK_DIRNoTask output storage directory. Default: <user-runtime>/claude-swarm/tasks (owner-only 0700 when using default).
--append-system-promptNoDefault text appended to the system prompt.
CLAUDE_SWARM_LOG_LEVELNoLog level (DEBUG, INFO, WARNING, ERROR).WARNING
--disable-slash-commandsNoDisable skills and slash commands by default.
--no-session-persistenceNoDo not persist sessions to disk by default.
CLAUDE_SWARM_TASK_MAX_AGENoSeconds after completion / last reply activity before task artifacts and worktrees are cleaned up.86400
CLAUDE_SWARM_WORKTREE_DIRNoWorktree storage directory. Default: <user-cache>/claude-swarm/worktrees (owner-only 0700 when using default).
--dangerously-skip-permissionsNoBypass 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; use claude_async + claude_wait for long runs or parallel fan-out. Clients supporting MCP 2026-07-28 with io.modelcontextprotocol/tasks receive native async tasks directly from claude and claude_reply (poll via tasks/get, cancel via tasks/cancel).

  • claude_async task IDs are internal to this server and NOT tracked by legacy MCP clients. Always call claude_wait in the same turn (passing all launched task_ids in one call). claude_status is a read-only peek and collects nothing.

  • Let claude_wait run 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 -- call claude_wait again.

Session resume, permissions & diagnostics:

  • claude_reply automatically defaults cwd to the original session's working directory (including its worktree path if still present) unless overridden. Pass fork_session: true to branch into a new session_id.

  • Terminal result JSONL events determine completion or failure (including is_error: true, error_max_turns, error_max_budget_usd, and error_during_execution). Tool errors and permission_denials are surfaced structurally without retrying turns.

Worktree isolation:

  • worktree: true creates an isolated git worktree and branch (claude-swarm/<id>) based on HEAD. 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

CapabilityDetails
tools
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
claudeA

Run a Claude Code (claude -p) session synchronously (or as a native MCP Task when the client advertises io.modelcontextprotocol/tasks). This server applies NO timeout of its own, but legacy MCP clients typically cut a tool call around 300s -- use claude_async + claude_wait for long runs or parallel fan-out on non-Tasks clients.

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 --resume=<session_id> (runs synchronously, or as a native MCP Task when the client advertises io.modelcontextprotocol/tasks). Automatically reuses the original session's cwd/worktree when cwd is omitted. Pass fork_session=true to branch into a new session_id. For long follow-ups on non-Tasks clients, prefer claude_async(session_id=..., prompt=...) + claude_wait.

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 model override to claude / claude_async / claude_reply.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
Server InfoServer version, configuration, and capabilities.
Server ConfigCurrent server-level Claude Code CLI defaults.
Available ModelsAvailable Claude Code model aliases, resolved IDs, and supported effort levels.
Active TasksList of all known async tasks and their current state. Includes session_id, model, usage, tool errors, permission denials, and failure details.

TDQS

A4.2/5.0

Scored across 7 tools

Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues