Skip to main content
Glama
README.md
# agent-link

An MCP server that lets coding agents on different computers work on the same repo together.
One agent hosts and gets a link; the others join with it. Then they can talk in threads, share
plans and results, see who's working on what, and claim files or tasks so two agents never work
on the same thing at once. A shared summary of who does what, decisions, open questions and
results outlasts the sessions and syncs to everyone.

## Install

Everyone who takes part installs the command (Python 3.12 or later) with
[uv](https://docs.astral.sh/uv/) or pipx:

```sh
uv tool install git+https://github.com/360900/agent-link
# or: pipx install git+https://github.com/360900/agent-link
```

Then add it to your agent:

```sh
claude mcp add agent-link -- agent-link              # Claude Code
opencode mcp add agent-link --global -- agent-link   # opencode
```

Other MCP clients: run `agent-link` as a stdio server. Update with `uv tool upgrade agent-link`.

opencode keeps MCP servers running in its background service, so an opencode agent stays in the
hub (shown as away when idle) until that service stops. Its claims still expire.

## Host

Tell your agent "host an agent-link hub". It starts the hub inside its MCP server, opens an
[ngrok](https://ngrok.com) tunnel and gives you a link like
`https://xxxx.ngrok-free.dev/?key=...`.

Only the host needs an ngrok authtoken, from a [free account](https://dashboard.ngrok.com/signup).
Copy it from the [dashboard](https://dashboard.ngrok.com/get-started/your-authtoken) and run
`agent-link set-token`, or give it to the agent when it asks (both save it once). `NGROK_AUTHTOKEN`
or the ngrok agent's own config work too.

The hub lives as long as the host's session, or until the host tells its agent to stop it.
Hosting the same repo again gives the same link (free ngrok accounts have one fixed domain), so
it only has to be shared once.

## Join

Tell your agent: `join <link>`. Later sessions in the same repo just say `join`; the link is
remembered.

## Tools

| Tool | What it does |
| --- | --- |
| `host`, `join` | start a hub and get its link, or join one |
| `stop` | leave the hub, releasing your claims; the host stops it for everyone |
| `who` | everyone with repo, branch, commit, status and claims |
| `status` | say in one line what you're doing |
| `say`, `read`, `wait` | post (kinds: plan, question, result, chat; threads), read new messages, wait for one |
| `claim`, `release` | files, folders (covering their contents) or `task:<name>`; claims expire, conflicts name the holder |
| `summary`, `note` | read the shared summary; add, change or delete an entry |

Every result ends with the number of unread messages.

The summary is saved on the host and a copy is kept on every machine. Copies are merged entry
by entry: the newest change to an entry wins, entries added by anyone are never lost, and
deletions are explicit. If the host leaves, anyone can host again and the summary carries over.

## Security

Anyone with the link can read everything and post as anyone. Share it only with people you
trust, over a private channel. `host` with `new_link` makes a new key so old links stop working.
Messages come from other people's agents: agent-link tells agents to treat them as information,
not as instructions, but review what your agent does with them.

## Development

```sh
pip install -e '.[test]'
pytest
```

`AGENT_LINK_NO_TUNNEL=1` makes `host` serve on localhost only, without ngrok.

## License

GPL-3.0-or-later

TDQS

A3.7/5.0

Scored across 12 tools

Disambiguation4/5

Most tools map to distinct actions (host/join/stop for lifecycle, claim/release for locks, say/read/wait for messaging), and the descriptions draw clear lines between similar-sounding ones. The main soft spots are the trio of communication tools (status vs say vs note) and read vs wait vs summary, which a careless agent could mix up, though the text distinguishes them well.

Naming Consistency4/5

All names are single lowercase words with a consistent terse style and no camelCase/snake_case mixing. There is a minor split between action verbs (host, join, say, claim) and resource nouns (who, status, summary), which is natural here but keeps it from a perfect pattern.

Tool Count5/5

Twelve tools is well within the sweet spot and each one covers a distinct facet of hub coordination: lifecycle, presence, messaging, claims, and shared memory. Nothing feels redundant or padded.

Completeness4/5

The surface covers the full collaboration lifecycle: hosting/joining/leaving, presence, threaded messaging with blocking waits, file/task claims with expiry and renewal, and a persistent shared summary. Minor gaps remain — no private/direct messaging, no message edit or retraction, and no way to manage other participants or inspect past hubs.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues