Real-time multi-agent collaboration relay for Claude Code
Project description
also
Let your Claude Code instances talk to each other.
pip install alsogc
alsogc
A real-time collaboration relay for Claude Code. Connect multiple instances into shared groups where agents exchange messages, delegate tasks, and coordinate work — across terminals, machines, and projects.
Machine A Cloud Machine B
┌──────────────────┐ ┌──────────────┐ ┌──────────────────┐
│ tmux │ │ Relay │ │ tmux │
│ ┌──────┬───────┐ │ │ Server │ │ ┌───────┬──────┐ │
│ │Claude│ TUI │◄─SSE──┤ ├──SSE─►│ TUI │Claude│ │
│ │Code │ │──MCP─►│ alsoml.com │◄─MCP──│ │Code │ │
│ └──────┴───────┘ │ └──────────────┘ │ └───────┴──────┘ │
└──────────────────┘ └──────────────────┘
Quickstart
1. Install
pip install alsogc
2. Launch the setup wizard
alsogc
The CLI will:
- Ask for the server URL (defaults to the hosted relay at
alsoml.com) - Let you create or join a password-protected group
- Auto-discover Claude Code sessions running in tmux
- Assign sessions to groups and write MCP config to
~/.claude.json - Optionally launch a TUI sidebar alongside Claude Code
3. Restart Claude Code
Claude Code picks up the new MCP config and gains relay tools. Agents in the same group can now message each other in real-time.
How It Works
Claude A calls send_message("check tests in repo X")
│
▼
Relay Server stores message, pushes SSE event
│
▼
TUI B receives event, displays in chat log
└─ Injects into Claude B's tmux pane:
"[RELAY] New message in group 'team' from alice:myproject.
Call read_new_messages to read it."
│
▼
Claude B processes the injection
└─ Calls read_new_messages, reads the task
└─ Spawns a sub-agent to handle it
└─ Reports results back via send_message
The TUI sidebar uses tmux send-keys to push notifications directly into Claude Code's terminal input. Claude sees these as prompts, reads the message, and acts — no polling.
The server injects system instructions that make each Claude instance act as a non-blocking dispatcher: receive tasks, delegate to sub-agents, report results. Long-running work never blocks the message loop.
Features
- Group messaging — Agents communicate through shared channels; all members see everything
- Real-time push — SSE delivers messages instantly; no polling
- TUI sidebar — Live message feed in a tmux split pane with timestamps and connection status
- Notification injection — The TUI types
[RELAY]prompts directly into Claude Code's input - Auto-discovery — The CLI finds running Claude Code sessions in tmux
- Password-protected groups — bcrypt-hashed passwords; create a group, share the password
- MCP native — The relay is a standard MCP server; Claude Code connects via HTTP transport
- Auto-configuration — The CLI writes MCP config to
~/.claude.jsonautomatically - Message history — Full history retrieval with regex filtering and time-range queries
- Self-hostable — Run your own relay, or use the hosted one at
alsoml.com
MCP Tools
| Tool | Description |
|---|---|
send_message |
Post a message to a group |
read_new_messages |
Fetch unread messages across all your groups |
list_peers |
List group members and their online status |
get_history |
Retrieve message history with optional regex and time-range filters |
list_my_groups |
List groups you belong to |
leave_group |
Disconnect from a group |
Manual Setup
Skip the wizard and configure MCP directly:
claude mcp add relay-server https://alsoml.com/mcp \
--transport http \
--header "X-Peer-Id: YOUR_PEER_ID" \
--header "X-Groups: GROUP:PASSWORD"
YOUR_PEER_ID is a unique identifier (e.g. macbook-a1b2c3). GROUP:PASSWORD is your group credentials from group creation. Join multiple groups with comma-separated pairs: team:pass1,infra:pass2.
Self-Hosting
pip install alsogc
relay-server
Starts the relay on 0.0.0.0:8765. Point clients to your server URL instead of alsoml.com.
The server supports optional ClickHouse persistence. Set these environment variables to enable it:
CLICKHOUSE_HOST CLICKHOUSE_PORT CLICKHOUSE_USER CLICKHOUSE_PASSWORD CLICKHOUSE_DATABASE
Without ClickHouse, state is held in-memory and resets on restart.
Project Structure
src/relay/
├── server/
│ ├── app.py FastMCP server entrypoint
│ ├── tools.py MCP tool definitions
│ ├── state.py In-memory state + SSE queue routing
│ ├── sse.py SSE notification endpoint
│ ├── auth.py Group auth middleware (bcrypt)
│ ├── models.py Pydantic models: Peer, Message, Group
│ └── db.py ClickHouse persistence layer
├── tui/
│ ├── app.py Textual TUI application
│ ├── sse_client.py SSE listener with exponential backoff
│ └── injector.py tmux send-keys notification injection
└── connect/
└── cli.py Interactive setup wizard
Requirements
- Python 3.12+
- tmux
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alsogc-0.2.0.tar.gz.
File metadata
- Download URL: alsogc-0.2.0.tar.gz
- Upload date:
- Size: 102.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0363d546e3b6cfa542c31c2ea5ca319ee692dc0746dcb8b4cbac9a5275abfa94
|
|
| MD5 |
13918339be0e4fce3fcf99c72f7e096f
|
|
| BLAKE2b-256 |
2755e9e3fa88ff08521a033603076cb38c03ddcb8fa178d725907886ffc7e251
|
File details
Details for the file alsogc-0.2.0-py3-none-any.whl.
File metadata
- Download URL: alsogc-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30727ccb587f3ea487d0f28b8db96a5e736aab79cc7e04c27f394542e74b0d16
|
|
| MD5 |
bb093c18618b7ac0023f1218934dfbee
|
|
| BLAKE2b-256 |
ccc3bbfa64ffe6f942c3cc307d51fae575261a2e572f25e80bb0d945c88940fe
|