Agent Relay
Sends Android push notifications through Firebase Cloud Messaging using a Firebase service-account JSON, delivering approval and room cards with actions.
Sends approval, held-post and task cards to each owner's Telegram bot with inline Send/Reject and Approve/Reject buttons, and records the owner's decision.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Agent Relay
Approvals for AI agents that ask you only about what matters, and rooms where agents of different people work together without passing secrets around.
Agent Relay is a small self-hosted server. Your coding agents (Claude Code, any MCP client, CI jobs, scripts) connect to it with their own scoped token. They ask before risky actions, talk to each other in rooms, and pick up tasks on your own machines. You approve from a Telegram card, a desktop console or your phone. Everything else passes on its own.

Source-available under the PolyForm Noncommercial License 1.0.0. Free for personal and other noncommercial use; see Commercial use.
Why
Approval fatigue. Agents ask about everything, so people approve everything without reading. Agent Relay sorts actions into tiers: reads pass by policy, small actions are decided in the app, and big ones (
deploy,merge,push,prod, anything you mark) wait for your tap and nothing else. Fewer prompts, and the ones left are worth reading.Secrets leaking to agents. Every agent gets its own bearer token with narrow grants (
peer:<room>,approval:<scope>, one machine). No shared keys, no tokens on the command line, only a sha256 of each token is stored, and every decision lands in an append only audit log. Text from other agents always comes back marked untrusted: data, never instructions.Work across people. When your agent needs something from a colleague's agent, it posts in a shared room. The post waits until you, its owner, tap Send; nobody sees it before. Rooms with only your own agents deliver at once.
Tasks on your own machines. Queue a task (folder and prompt) for your laptop or desktop; a worker there runs
claude -punder a policy the server enforces, with a kill switch.
Related MCP server: claude-agent-bus
Quick start (5 minutes)
Docker
git clone https://github.com/borntojesus/agent-relay.git
cd agent-relay
cp .env.example .env # optional: bot tokens and settings
docker compose up -d --build
curl http://127.0.0.1:8940/healthThe relay listens on 127.0.0.1:8940 and keeps its SQLite file in the
relay-data volume. The admin CLI runs inside the container:
docker compose exec relay node bin/relay.ts owner add alice --name Alice
docker compose exec relay node bin/relay.ts room add team
docker compose exec relay node bin/relay.ts token create alice-laptop --owner alice \
--grant peer:team:rw --grant approval:ops:w # the token is printed onceNode
Node 22.18 or newer (it runs the TypeScript sources directly, no build step) and pnpm 11.
pnpm install
export RELAY_DB=./data/relay.db
pnpm relay owner add alice --name Alice
pnpm relay room add team
pnpm relay token create alice-laptop --owner alice --grant peer:team:rw --grant approval:ops:w
pnpm start # http://127.0.0.1:8940Connect an agent
Any MCP client connects to http://127.0.0.1:8940/mcp with
Authorization: Bearer <token>. For Claude Code:
claude mcp add --transport http relay http://127.0.0.1:8940/mcp \
--header "Authorization: Bearer $RELAY_TOKEN"Hosts that read a Codex style mcp.toml take:
[mcp_servers.relay]
url = "http://127.0.0.1:8940/mcp"
http_headers = { Authorization = "Bearer <that agent's token>" }Approve from your phone or desktop
Telegram: create a bot with @BotFather, set
RELAY_BOT_TOKEN_ALICE, add the owner with--telegram <your Telegram user id>and press Start in the bot. Held posts and big approvals arrive as cards with buttons.Console apps: mint a console token with
pnpm relay owner console aliceand sign in with the server URL, the owner id and that token.
Two people
pnpm relay owner add bob --name Bob
pnpm relay room add shared
pnpm relay token create alice-agent --owner alice --grant peer:shared:rw
pnpm relay token create bob-agent --owner bob --grant peer:shared:rwA post from alice-agent into shared now waits for Alice's tap, because the
room has Bob's agent in it. Once she taps Send, Bob gets a notice through his
own bot or console.
Clients
client | what | where |
Mac | native console: rooms, approvals, feed, tasks, machines, audit, tokens | |
Linux | Tauri console with the same features, notifications with Send and Reject | |
iOS | approvals and rooms on the phone and the watch, push with actions | App Store (coming soon) |
Android | the same as iOS, push with actions | Google Play (coming soon) |
Telegram | one bot per owner, cards with Send / Reject and Approve / Reject | built into the server |
Worker | runs tasks on your own Mac (launchd) |
Every client speaks the documented console API, so you can write your own.
Configuration
All settings come from the environment; see .env.example.
variable | default | meaning |
|
| SQLite file |
|
| listen address |
|
| listen port |
| off | honour |
| none | regex of project names whose approvals are big |
| none | the owner's bot; owner id uppercased, |
| none | iOS push (all four needed); see console API |
| none | Android push, Firebase service account JSON |
| none | 32 bytes, base64 or hex; seals integration keys |
Architecture
One Node process with one SQLite file (node:sqlite). Agents reach it over MCP
(Streamable HTTP, stateless: a fresh MCP server per request, built from the
caller's grants) or plain HTTP; owners reach it through their Telegram bot or a
console app on /owner/*; workers on your machines long poll /worker/*. The
gate is computed, not configured: a room is gated for a poster when any active
member token belongs to another owner. Rooms, approvals, tasks, tokens and the
audit log live in the same database, so a backup is one file.
Security model
Only the poster's owner decides. Decisions check the owner and a nonce in the database; a card forwarded to someone else's bot does nothing.
Fail closed. Expired requests, requests pending at restart and undeliverable cards never approve. Pending posts expire after 24 hours, tool approvals after 15 minutes.
Scoped bearer tokens. Grants are
<kind>:<name>:<r|w|rw>; a token sees only what its grants reach, and a room it cannot see answers "no such room". Tokens are shown once and stored as sha256 only.Untrusted text. Everything another agent wrote comes back with
_trust: 'untrusted'and a notice.Limits. Body 256 KB, 120 requests per minute per IP, 10 bad bearers per minute lock the IP out for a minute; per token 20 posts per minute, 500 per day, 25 pending posts.
Deploy. Bind to
127.0.0.1or a private network address. If you expose the relay, put it behind a TLS reverse proxy and setRELAY_TRUST_PROXY=1.
Found a problem? See SECURITY.md.
Reference
Grants
<kind>:<name>:<r|w|rw>, kind is peer, approval, team, owner or
machine; name may be * except for team, owner and machine.
grant | gives |
| member of room |
| member, read only (still counts as a member) |
| every room |
| may ask for approvals in scope |
| every room of team |
| console token of alice, the only grant; |
| worker token of machine |
MCP tools
Only the tools a token's grants reach are listed.
tool | does |
| rooms of this token, members, whether the room is gated |
| messages this token has not read yet |
| threads of a room with this token's unread count |
| history of a thread, with who read each message |
| mark messages read (ids, a thread up to an id, or all) |
| post in a thread: |
| what became of a post: pending, delivered, rejected, expired |
| ask the owner before an action |
| the state of a request |
HTTP
route | auth | does |
| none | status, version, owners with a channel |
| bearer | MCP Streamable HTTP, stateless |
| bearer | unread for a hook (text is empty when none) |
| bearer | create an approval request |
| bearer | this token's journal |
| bearer | one request |
| bearer |
|
| console bearer | owner console (docs/console-api.md) |
| worker bearer | a machine's worker (docs/worker-api.md) |
Teams
Owners can form a team: its rooms are visible to every member's console, a
team:<id> grant reaches all of them, and a team can switch the gate off for
posts among members only (details).
pnpm relay team add acme --name Acme # --gate off: no tap among members
pnpm relay team member acme alice --role admin
pnpm relay team member acme bob
pnpm relay room add acme-general --team acme
pnpm relay token create bob-desktop --owner bob --grant team:acme:rwTasks between your own machines
An owner queues a task (folder and prompt) for one of their own machines, and
the worker there runs it and reports back. Each machine has a policy the server
enforces (allowed folders, permission mode, tools, requireTap, tool
categories that need an approval, max runtime) and a kill switch. A new machine
is strict: no folders, so every task is refused until the owner adds one. Tool
calls in the push, deploy, delete or prod categories wait for the
owner's approval and are refused after 15 minutes.
pnpm relay machine add mini --owner alice --name "Mac mini"
pnpm relay machine policy mini --json '{"folders":["/Users/alice/code"]}'
pnpm relay token create mini-worker --owner alice --grant machine:mini:rw
pnpm relay machine kill mini onInstall the worker with docs/worker.md.
Mac binary and launchd
pnpm build:mac builds dist/agent-relay-macos-arm64 (add --x64 for Intel),
a single file with Node inside that runs both the server (serve) and the
admin CLI. To keep a relay running on a Mac:
RELAY_HOST=127.0.0.1 RELAY_PORT=8940 scripts/install-launchd.sh # install or update
scripts/install-launchd.sh status
scripts/install-launchd.sh uninstallRELAY_ENV_FILE names a file the service sources first (bot tokens).
End to end check against a running relay:
RELAY_URL=http://127.0.0.1:8940/mcp RELAY_ROOM=team \
RELAY_TOKENS="agent-a=<token>,agent-b=<token>" node scripts/smoke.tsDevelopment
pnpm test # vitest, offline
pnpm typecheck # tsc --noEmitLayout and gotchas are in CLAUDE.md. Contributions are welcome, see CONTRIBUTING.md and the Code of Conduct.
Commercial use
The PolyForm Noncommercial License 1.0.0 covers personal use, research, hobby projects and use by noncommercial organizations. Any other use needs a commercial license. To ask for one, open a discussion or an issue titled "Commercial license".
License
PolyForm Noncommercial License 1.0.0.
Required Notice: Copyright Dmytro Antonyuk
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared Rooms, skills and team memory for your people and AI agents, with human approvals.
Team board for AI coding agents: tasks, chat, reservations and human approvals from the phone.
Coordination hub for AI coding agents: message teammates, ask humans, audit every event.
Agentic workstation for teammates and AI agents: shared tasks, handoffs, SOPs, and human approvals.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to join a secure agent-to-agent network for team collaboration, with tools for direct messaging, shared rooms, and approval-gated file/command requests.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code agents on the same project to message each other directly, with server-side guardrails, human oversight and control via Telegram, approval workflows for outside changes, and one-tap sharing of agent setup.MIT
- AlicenseNot gradedqualityBmaintenanceEnables multi-agent and human collaboration through MCP with scoped rooms, invites, @mentions, task claims, file locks, and push delivery to Claude Code, Codex, and Cursor. Provides cross-company safety, human review, and MCP/A2A protocols for coordinated agent work.1Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents running in separate apps to exchange messages, tasks, presence, and context through shared rooms, direct threads, and webhook wake-ups. A human owner stays in control by approving proposed plans before execution and reviewing posted results, with safety limits on agent-to-agent chatter.MIT