agent-coord-mcp 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -359,7 +359,7 @@ AGENT_COORD_DIR=~/agent-coord \
|
|
|
359
359
|
agent-coord-mcp
|
|
360
360
|
```
|
|
361
361
|
|
|
362
|
-
Defaults to `127.0.0.1`. To bind to a LAN address (Tailscale, WireGuard, etc.) set `AGENT_COORD_BIND=10.x.y.z`; the
|
|
362
|
+
Defaults to `127.0.0.1`. To bind to a LAN / overlay address (Tailscale, WireGuard, etc.) set `AGENT_COORD_BIND=10.x.y.z`; a non-loopback bind trips the fail-closed gate below — the server **refuses to start** (rather than warns) unless identity and transport are both secured. `GET /healthz` is unauthenticated (for reverse-proxy / orchestrator probes); everything else requires `Authorization: Bearer <token>`. TLS is out of scope — front with Caddy/nginx, or skip TLS entirely on a private overlay network.
|
|
363
363
|
|
|
364
364
|
The server can run as a long-lived daemon on one machine (the "host") while local agents on that host keep using stdio per-session; the two modes don't conflict — they're separate processes.
|
|
365
365
|
|
|
@@ -370,9 +370,31 @@ The server can run as a long-lived daemon on one machine (the "host") while loca
|
|
|
370
370
|
|
|
371
371
|
Mint the per-agent tokens with `coord-token` (below). Loopback binds are exempt from both checks, so single-host use needs no extra setup.
|
|
372
372
|
|
|
373
|
+
**Example — bind to a Tailscale IP.** Tailscale/WireGuard *is* the secured transport (WireGuard-encrypted), so `AGENT_COORD_INSECURE=1` is the correct acknowledgement here, not a hack. On the host, after minting at least one token (see [Identity binding](#identity-binding-v070)):
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
node scripts/coord-token.mjs add worker-2 # creates ~/agent-coord/tokens.json, prints the token
|
|
377
|
+
AGENT_COORD_HTTP_PORT=8765 \
|
|
378
|
+
AGENT_COORD_BIND=100.x.y.z \ # this host's Tailscale IP (`tailscale ip -4`)
|
|
379
|
+
AGENT_COORD_INSECURE=1 \ # ack: WireGuard is the encryption layer
|
|
380
|
+
node dist/server.js
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
Remote nodes then reach it at `http://100.x.y.z:8765/mcp`. Add or rotate tokens later without a restart: `coord-token add <id>` then `kill -HUP <bus-pid>` reloads the map. `GET http://100.x.y.z:8765/healthz` (no auth) is a quick reachability check from another tailnet device.
|
|
384
|
+
|
|
385
|
+
### Joining from another machine
|
|
386
|
+
|
|
387
|
+
A remote participant is just an **MCP client with a bearer token** — there is nothing to build or clone. What you need depends on how you connect:
|
|
388
|
+
|
|
389
|
+
- **Claude Code (or any MCP client that speaks HTTP): nothing to install.** The client already speaks MCP; a config entry (below) is the entire setup. You do *not* need this package on the client to use the tools.
|
|
390
|
+
- **Optional real-time push into a tmux pane:** install the package globally (`npm i -g agent-coord-mcp`) for the `coord-pusher` bin (the MCP SDK ships with it — no repo needed). See [`coord-pusher`](#coord-pusher--real-time-push-cross-machine) below. Without it you simply poll with `read_messages` / `wait_for_message`.
|
|
391
|
+
- **Operator-side tools** (`coord-token`, `coord-node.sh`) live in the repo and run on the **bus host**, not on a pure client. `coord-node.sh` is not a published bin, so a client without the repo can't (and needn't) run it.
|
|
392
|
+
|
|
393
|
+
> ⚠️ **Installing the package globally does not connect you to a remote bus.** The `agent-coord-mcp` bin is the *stdio server* — pointing a Claude config at it spins up a **separate, local, file-backed bus on your own machine**, not a connection to anyone else's. To join a networked bus you must add the **HTTP** entry below (with `"type": "http"` and a URL), never the stdio server.
|
|
394
|
+
|
|
373
395
|
### Point a Claude Code session at the remote server
|
|
374
396
|
|
|
375
|
-
In `~/.claude.json
|
|
397
|
+
In `~/.claude.json` (or a project `.mcp.json`) — the token must be the one minted for *this* agent's id; the bus enforces that the id you `join` as matches the token:
|
|
376
398
|
|
|
377
399
|
```json
|
|
378
400
|
{
|
|
@@ -380,12 +402,14 @@ In `~/.claude.json`:
|
|
|
380
402
|
"agent-coord": {
|
|
381
403
|
"type": "http",
|
|
382
404
|
"url": "http://host:8765/mcp",
|
|
383
|
-
"headers": { "Authorization": "Bearer <
|
|
405
|
+
"headers": { "Authorization": "Bearer <this-agent's-token>" }
|
|
384
406
|
}
|
|
385
407
|
}
|
|
386
408
|
}
|
|
387
409
|
```
|
|
388
410
|
|
|
411
|
+
Or via the CLI (no hand-editing): `claude mcp add --transport http --scope user agent-coord http://host:8765/mcp --header "Authorization: Bearer <token>"`.
|
|
412
|
+
|
|
389
413
|
Then `join({agentId:"me"})` and call any tool exactly as you would locally. `send_message`, `read_messages`, `wait_for_message`, `list_rooms`, `join_room`, etc. all work identically.
|
|
390
414
|
|
|
391
415
|
### `coord-node` — one-command onboarding (recommended)
|
|
@@ -464,7 +488,7 @@ Backward-compat: if `tokens.json` is absent, the legacy single shared `AGENT_COO
|
|
|
464
488
|
### Auth posture, briefly
|
|
465
489
|
|
|
466
490
|
- Threat model: misbehaving / buggy / compromised same-LAN cooperator can no longer assert another agent's identity. Not a hostile-attacker model (TLS + per-message signing is a separate, larger task).
|
|
467
|
-
- Don't bind to a public address without TLS.
|
|
491
|
+
- Don't bind to a public address without TLS. A non-loopback bind is refused outright unless per-agent tokens are configured **and** `AGENT_COORD_INSECURE=1` is set — and that acknowledgement is meant for a private overlay (Tailscale/WireGuard) or a TLS reverse proxy, not the open internet.
|
|
468
492
|
|
|
469
493
|
### Other clients
|
|
470
494
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-coord-mcp",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "File-backed MCP server for coordinating multiple AI coding agents (Claude Code, Cursor, Cline, etc.). Local stdio or networked over Streamable HTTP.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|