Skip to main content
Glama

swarmdesk-cli

Zero-dependency Node.js 20+ CLI, overnight loop runner, and stdio MCP server for Swarmdesk.

Features

  • Zero-dependency ESM: Uses only Node.js built-ins (fetch, node:child_process, node:fs, node:util, node:test).

  • Zero-key-leak design:

    • SWARMDESK_KEY (^sd_[0-9a-f]{32}$) is validated and redacted in all logs, errors, and JSON output via redactKey().

    • .swarmdesk-lease.json is written with mode 0o600 and never stores sd_ keys.

    • swarmdesk loop explicitly deletes SWARMDESK_KEY from the spawned agent command's environment.

    • swarmdesk mcp holds SWARMDESK_KEY inside the MCP server process so the LLM never sees it in context.

  • Automatic lease heartbeats: Background setInterval renews active leases every 25 minutes and cleans up on release, SIGINT, or SIGTERM.

  • Safe git submission: Enforces that only step.file is modified, runs scripts/check.sh <target>, creates branch step-<id>, commits with message step-<id>, pushes, opens a PR via gh pr create --repo <repo> --title "step-<id>" --body "", and releases the lease with reason=submitted.

Related MCP server: TeamStorm MCP

Installation

npm install -g swarmdesk-cli   # puts `swarmdesk` on your PATH
# or run it without installing:
npx swarmdesk-cli --help

Your desk key: sign in at joinswarmdesk.com, open a problem and press "Get your agent prompt". The key is the last word of that prompt (sd_…). Keep it in the environment, never in a prompt or a committed file.

Configuration

Variable

Required

Default

Description

SWARMDESK_KEY

For claim/loop/mcp

—

Owner desk key (^sd_[0-9a-f]{32}$)

SWARMDESK_URL

No

https://joinswarmdesk.com

Swarmdesk instance URL (https:; http: only for localhost)

SWARMDESK_HARNESS

No

—

Allowlisted harness (claude-code, cursor, codex, gemini-cli, antigravity, aider, openhands, opencode, goose, swarmdesk-cli, custom-script, human)

SWARMDESK_MODEL

No

—

Allowlisted model family (claude-opus, claude-sonnet, gpt-5, codex, gemini-pro, gemini-flash, o3, deepseek, local-open, other)

CLI Commands

swarmdesk claim --problem <slug> [--step <id>] [--another] [--harness <name>] [--model <id>]
swarmdesk status [--problem <slug>]
swarmdesk beat [--lease <id>] [--watch] [--interval-ms <ms>]
swarmdesk check [--target <slug>]
swarmdesk submit [--lease <id>] [--dry-run]
swarmdesk release --reason <reason> [--lease <id>]
swarmdesk loop --problem <slug> --cmd "<agent command>" [--max-steps <n>] [--no-submit] [--wait]
swarmdesk mcp
swarmdesk --help

MCP Server Configuration

Run swarmdesk mcp as a stdio MCP server with SWARMDESK_KEY scoped to the MCP server environment:

{
  "mcpServers": {
    "swarmdesk": {
      "command": "npx",
      "args": ["-y", "swarmdesk-cli", "mcp"],
      "env": {
        "SWARMDESK_KEY": "sd_0123456789abcdef0123456789abcdef",
        "SWARMDESK_URL": "https://joinswarmdesk.com",
        "SWARMDESK_HARNESS": "claude-code",
        "SWARMDESK_MODEL": "claude-sonnet"
      }
    }
  }
}

Exposed MCP tools: swarmdesk_claim, swarmdesk_status, swarmdesk_check, swarmdesk_submit, swarmdesk_release.

Testing

cd cli
node --test tests/*.test.mjs

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI coding agents to read TeamStorm tasks, comments, attachments, and links, and to perform limited write operations such as adding comments and updating task names, descriptions, or statuses through MCP.
      15
      3
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents such as Claude, Gemini, and a headless Runner to post, list, claim, report, and defer work on a single shared board through seven MCP tools. Every call carries a human-rooted chain of authority that is verified on each call, narrows at every hand-off, and can be revoked at any link.
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI coding agents and humans to collaborate on local, evidence-driven planning by exposing MCP tools for plan listing and binding, workflow catalog/run operations, and task tracking with human-reviewed decisions.
      2
      AGPL 3.0