# swarmcode [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/spranab/swarmcode  
**GitHub Stars:** 8  
**npm Downloads (last month):** 51  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/swarmcode

## Description
Real-time cross-machine communication between Claude Code instances.

## Tools
Capabilities this server exposes over MCP:

- **swarm_send** — Send a message to a workspace or broadcast (`to: "*"`)
- **swarm_receive** — Read and mark pending messages as read
- **swarm_status** — See all registered workspaces
- **swarm_register** — Register/update this workspace's description
- **swarm_listen** — Long-running task that completes when the next message arrives

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "swarmcode": {
    "command": "npx",
    "args": ["-y","swarmcode-mcp"],
    "env": {
      "SWARMCODE_REDIS_URL": "",
      "SWARMCODE_WORKSPACE_ID": "",
      "DASHBOARD_USER": "",
      "DASHBOARD_PASS": "",
      "DASHBOARD_PORT": ""
    }
  }
}
```

**Requires environment variables:** `SWARMCODE_REDIS_URL`, `SWARMCODE_WORKSPACE_ID`, `DASHBOARD_USER`, `DASHBOARD_PASS`, `DASHBOARD_PORT` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What swarmcode does

swarmcode provides a Redis-backed communication channel for Claude Code workspaces running on different machines. Each workspace registers an identifier and description, then uses MCP tools to exchange messages with another workspace or with every workspace through the `*` broadcast target.

The message channel is suited to coordination between agents working on related parts of a project. One workspace can share an API schema, configuration detail, artifact, or question while another agent continues its own task. Workspace status gives agents visibility into which workspaces are registered and what they are working on.

A separate web dashboard provides browser-based monitoring and control. It displays workspace activity, exposes per-workspace inboxes, shows a real-time global message log, and can send messages to selected workspaces.

## How it works

All participating workspaces point to the same Redis instance. Redis stores messages and provides the pub/sub channel used for delivery. Workspace-specific channels isolate direct messages, while broadcast messages are delivered through a shared broadcast channel.

The event path uses a one-shot listener. A background listener waits for the next Redis message; when one arrives, it completes and triggers a task notification in VS Code. The agent can then call `swarm_receive` to read and mark pending messages as read, reply with `swarm_send`, and start listening again. A five-minute cron-based inbox check runs as a fallback alongside the event listener.

The package includes a CLI initializer that creates the workspace setup, including its MCP configuration and hooks. Repeat initialization on each machine and use the same Redis connection for all workspaces.

## Setup and configuration

Install the package globally with npm, provide a Redis instance, and initialize a workspace:

```bash
npm install -g swarmcode-mcp
swarmcode-mcp init my-workspace --redis redis://your-redis:6379
```

For local Redis, the project demonstrates running the `redis:alpine` Docker image with port `6379` exposed. After initialization, restart Claude Code and repeat the process for other workspaces.

`SWARMCODE_REDIS_URL` controls the Redis connection and defaults to `redis://localhost:6379`. `SWARMCODE_WORKSPACE_ID` identifies the workspace when it is not supplied through the generated MCP configuration.

The optional dashboard uses `SWARMCODE_REDIS_URL`, `DASHBOARD_USER`, `DASHBOARD_PASS`, and `DASHBOARD_PORT`. Its documented container listens on port `4200`; the default dashboard credentials are `admin` and `bridge`, so set explicit values before exposing it beyond a trusted environment.

Redis and dashboard manifests are also available for Kubernetes deployment, including a Redis NodePort and an ingress configuration that requires a hostname edit.

## Tools and capabilities

- `swarm_send` sends a message to a named workspace or broadcasts with `to: "*"`.
- `swarm_receive` reads pending messages and marks them as read.
- `swarm_status` lists registered workspaces and their status information.
- `swarm_register` creates or updates the current workspace description.
- `swarm_listen` waits until the next message arrives.
- The dashboard provides workspace monitoring, inbox viewing, real-time message logging, and browser-based sending.

The package was renamed from `mcp-agent-bridge`. Existing deployments can migrate to `swarmcode-mcp`; the old package name and `bridge_*` tools are retained only for compatibility, while new setup uses the `swarm_*` names and `SWARMCODE_*` variables.

_Full upstream README: https://allmcps.com/mcp/swarmcode/readme_

