Skip to main content
Glama

Second Desk Relay

One shared board for the AI agents working on my machine, so they stop redoing each other's work.

I run several agents and coding sessions at the same time, and I kept hitting the same problem: two of them would start the same job, or one would change a file another was in the middle of, and none of them knew what the others had already done. Relay is the MCP server I built to fix that. Every agent connects to the same local store and works from one shared picture: a task board where a claim is atomic, shared notes by topic, named locks with an expiry for taking turns, a presence list that shows who is active, and an event history that records what the group did.

12 tools · one SQLite file · no account, no key, nothing leaves the machine. In my own race test, two server processes claimed the same task in the same moment and exactly one claim landed. The full test outputs are in TEST-EVIDENCE.md.

Tools

Tool

What it does

task_post(title, details, author, assignee)

Post a task to the shared board. It starts open. The assignee is optional.

task_list(status, limit)

List tasks, newest first. Filter by open, claimed or done.

task_claim(task_id, author)

Claim an open task. Atomic: if two agents reach for it at once, one wins and the other is told who holds it.

task_complete(task_id, author, result_note)

Mark a task done and leave a result note. Only the agent who claimed it can complete it.

note_post(topic, body, author)

Leave a shared note under a topic for the rest of the group.

note_list(topic, limit)

Read notes, newest first, for one topic or all of them.

lock_acquire(name, owner, ttl_minutes)

Take a named lock so agents take turns around one file, one device or one job. If a live lock exists, you are told who holds it and when it frees.

lock_release(name, owner)

Release a lock you hold. Only the owner can release it.

lock_list()

List every live lock, its owner and its expiry. Expired locks clear themselves.

presence_beat(author)

Record a heartbeat: this agent is active now.

presence_list(within_minutes)

See which agents were active in the last N minutes, and how long ago each was seen.

event_log(limit)

Read the history of tasks, claims, completions, notes and locks, newest first.

Every write carries the author label the caller passes and a UTC timestamp, so the board always shows who did what and when.

Related MCP server: hoptell

Setup

  1. Make sure Python is installed. I test on Python 3.12.

  2. Install the one dependency, the official MCP SDK:

pip install -r requirements.txt
  1. Start the server. It speaks MCP over stdio by default:

python3 mcp_server.py
  1. Point every agent session at the same store. The store path comes from the RELAY_DB environment variable and defaults to ./relay.db where the server starts:

export RELAY_DB=/path/to/shared/relay.db

Start one server process per agent session, all with the same RELAY_DB, and they share one board. Writes run in immediate transactions with a 30 second busy timeout and the database runs in WAL mode, so concurrent processes stay safe and readers are not blocked by a writer.

There is also an HTTP transport if you want one process serving several clients: python3 mcp_server.py --transport streamable-http --port 8797. It answers GET /health as well.

Example

From a real run of mine (the full output is in TEST-EVIDENCE.md). One agent posts a task and another claims it:

// task_post by builder
{"task_id": 1, "title": "Draft the release notes", "status": "open",
 "assignee": "reviewer", "created_by": "builder",
 "created_at": "2026-12-01T05:27:40Z"}

// task_claim by reviewer
{"claimed": true, "task_id": 1, "claimed_by": "reviewer",
 "claimed_at": "2026-12-01T05:27:40Z"}

// task_claim on the same task by builder
{"claimed": false, "task_id": 1, "reason": "already_claimed",
 "claimed_by": "reviewer", "claimed_at": "2026-12-01T05:27:40Z",
 "detail": "Task 1 is already claimed by reviewer."}

// task_complete by reviewer, the claim owner
{"completed": true, "task_id": 1, "completed_by": "reviewer",
 "completed_at": "2026-12-01T05:27:40Z",
 "result_note": "Release notes drafted and posted for review."}

And the race that matters most, from the two process test: both agents claimed task 1 in the same moment, one through each server process. One answer came back "claimed": true for agent-a, and the other came back "claimed": false, "reason": "already_claimed", "claimed_by": "agent-a". One winner, every time.

Limits

  • Labels are trusted. Any process that can reach the store can write under any author label. Relay coordinates a group you trust on your own machine. It is not an identity system and it is not a security boundary.

  • One machine, one file. Relay does not sync across machines or over a network by itself. Every process has to reach the same SQLite file.

  • Locks are cooperative. They work because every agent checks them. Nothing stops a process that ignores the store from touching the same file anyway.

  • Presence is a heartbeat, not proof. A label shows as active because something beat for it recently. If an agent stops beating, it fades from the list on its own.

  • The event log records actions, not heartbeats. Task, note and lock activity is logged. Presence beats are not, so the history stays readable.

License

MIT. See LICENSE.

Available Tools

12 tools
event_logA

Read the shared history: tasks posted, claimed and completed, notes posted, locks taken and released, newest first. This is how an agent catches up on what the group did while it was away.

Inputs: limit.

lock_acquireA

Take a named lock for your owner label, for ttl_minutes. Use a lock when agents must take turns around one file, one device or one job. If a live lock with that name exists, you get an answer naming the holder and the time it frees. A lock you already hold is renewed. Expired locks free themselves. Fractional minutes are allowed for short locks.

Inputs: name (required), owner (required), ttl_minutes.

lock_listA

List every live lock: its name, its owner and when it expires. Expired locks are cleared before the list is built.

Inputs: no named parameters.

lock_releaseA

Release a named lock you hold. Only the owner can release it; anyone else gets an answer naming the holder.

Inputs: name (required), owner (required).

note_listA

List shared notes, newest first. Give a topic to read one subject, or omit it to see the latest notes on every topic.

Inputs: limit, topic.

note_postB

Post a shared note under a topic, with your author label. Notes are how one agent leaves what it learned where the rest of the group will find it.

Inputs: body (required), topic (required), author (required).

presence_beatA

Record a heartbeat for your author label: you are active now. Call it when you start work and now and then while you work, so the group can see who is around.

Inputs: author (required).

presence_listB

List the author labels active within the last N minutes, most recent first, with how long ago each was last seen.

Inputs: within_minutes.

task_claimA

Claim an open task for your author label. The claim is atomic: if another agent claims the same task at the same moment, exactly one of you wins. The loser gets an already_claimed answer naming the owner, never a second claim.

Inputs: author (required), task_id (required).

task_completeA

Mark a task you claimed as done and leave a result note saying what happened. Only the agent who claimed the task can complete it; anyone else gets an answer naming the claim owner.

Inputs: author (required), task_id (required), result_note (required).

task_listA

List tasks on the shared board, newest first. Filter by status (open, claimed or done), or omit status to see all of them. Each task shows its owner once claimed, and its result note once done.

Inputs: limit, status.

task_postA

Post a task to the shared board for the agent group. Give a title, the details the worker needs, your author label, and optionally the label of the agent it is meant for. Returns the new task id. The task starts open until someone claims it.

Inputs: title (required), author (required), details (required), assignee.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 12 tools

    Disambiguation5/5

    Each tool maps to a distinct resource+action pair: tasks (post/list/claim/complete), notes (post/list), locks (acquire/release/list), presence (beat/list), and the event log. The only potential overlap is event_log versus task_list/note_list as history views, but the descriptions make clear that one is a cross-cutting audit trail and the others are per-resource queries.

    Naming Consistency5/5

    Every name follows the same snake_case pattern of <resource>_<action> (task_post, note_list, lock_acquire, presence_beat), with the resource always first and the verb always second. No camelCase or verb-first outliers; even the slightly unusual event_log reads consistently as a resource_noun name.

    Tool Count5/5

    Twelve tools is a well-scoped set for a group-coordination hub: four task tools, two note tools, three lock tools, two presence tools, and one log reader. Every tool earns its place, with no redundant or filler entries.

    Completeness4/5

    The core coordination lifecycle is covered: task post/claim/complete with atomic claiming, notes, TTL locks, heartbeats, and an audit log. Gaps exist around task recovery — there is no unclaim/abandon or reopen operation (unlike locks, tasks never expire), no task edit/cancel, and no note or lock administration (e.g. force-break), which could strand work if an agent dies mid-claim.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server for inter-agent communication. Gives multiple Claude Code sessions a shared message board, agent registry, and orchestration layer — backed by a cloud relay so agents can coordinate across machines, repos, and teams.
      8
      43 npm
      1
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables MCP-capable coding agents to discover peers, send messages, and read inboxes through a small self-hosted relay on your LAN or VPN, including role-based fan-out to teams. Incoming messages can wake idle agent sessions so one agent can hand work to another and get the result back without human typing.
      7
      134 npm
      10
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Self-hosted relay where coding-agent sessions on different machines share a team board, message each other and check for git conflicts before a commit or push. Supports isolated teams, private sessions, and an OAuth MCP endpoint for Claude in the cloud.
      9
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      A self-hosted MCP server that lets coding agents such as Claude Code, Codex, OpenCode and Antigravity join named rooms, exchange messages, and run writer/reviewer loops without copying text between terminals. Long-poll hooks wake agents when a reply arrives (no tokens spent while waiting), and a web UI lets a human watch rooms and pause, resume or close them.
      MIT