The control MCP server
The control server runs on the hub, so it needs atrium run. See Rooms: start a hub.
The hub serves one MCP server at /_hub/mcp. Every session on the board connects to it from inside its own claude
process, so no session spawns a helper. Each request carries the caller's identity in headers, X-Atrium-Agent and
X-Atrium-Room, which Claude Code fills in per session. It answers loopback only.
Registering it
Add it to a session's MCP configuration as an HTTP server:
{
"mcpServers": {
"atrium-control": {
"type": "http",
"url": "http://127.0.0.1:7778/_hub/mcp",
"headers": {
"X-Atrium-Agent": "${ATRIUM_AGENT_NAME}",
"X-Atrium-Room": "${ATRIUM_ROOM}"
}
}
}
}
Use your hub's board address. 7778 is the default. Atrium sets ATRIUM_AGENT_NAME and ATRIUM_ROOM in the
environment of every session it launches.
A room's first start writes the stdio relay below into ~/.atrium/mcp.json as atrium-control, unless that file
already has one, and adds --mcp-config ~/.atrium/mcp.json to the claude runner row beside --strict-mcp-config. A
launched session gets exactly the servers listed in that file, and never stops on a prompt from a server it was not
going to use. A room made before this starts claude with --strict-mcp-config and no --mcp-config, so it has no
atrium-control until you put the entry in that file and add --mcp-config <that file> to its claude runner.
A claude started outside atrium does not read that file. Register the relay for it once:
claude mcp add --scope user atrium-control -- /path/to/atrium mcp-relay
Surviving a hub restart
Claude Code connects an HTTP MCP server once and never redials it. If the hub goes down, every live session loses its atrium tools until it is restarted. To avoid that, register a stdio relay instead of the URL:
{
"mcpServers": {
"atrium-control": { "type": "stdio", "command": "/path/to/atrium", "args": ["mcp-relay"] }
}
}
atrium mcp-relay keeps the stdio side open and redials the hub, with backoff, for each request, for up to ten
minutes (--retry-for). It sends X-Atrium-Agent and X-Atrium-Room from ATRIUM_AGENT_NAME and ATRIUM_ROOM.
The hub address is --url, then ATRIUM_HUB_MCP, then http://127.0.0.1:7778/_hub/mcp.
The tools
| Tool | What it does |
|---|---|
atrium_status | Is atrium running, is its store healthy, and what is on the board. Scoped to your room. |
atrium_peers | The other sessions: what each is called, what it is doing, where, and how long it has waited. |
atrium_say | Say something to another session. Typed in where atrium owns the terminal, queued otherwise. |
atrium_report | Report to the session that launched you: done with a commit, blocked, question or progress. |
atrium_task | One card: its status, what its runner is doing, its recent events, and whether you saw its last turn. |
atrium_launch | Start a new agent in a directory, on its own card, supervised by atrium. |
atrium_exit | Ask a session to finish and leave. Asked, not killed. |
atrium_cull | Retire a worker whose merged work you accepted: it leaves, its worktree and branch are removed. |
atrium_git_url | Where to fetch code that is not in your directory: the hub's copy of finished work, or a room's work in progress. |
atrium_ci | A repository's CI, read by the hub: runs, a run's jobs and steps, a failed job's log, artifacts. |
atrium_git_push | Push your branch to the hub, the same push git push hub <branch> makes, with no shell. Plain branch pushes only. |
atrium_merge | Land your pushed branch on claude/main through the hub's merge queue: merged with the sha, red with the failing tests, a conflict, or refused. |
atrium_git_sync | Bring a room's clone up to date with claude/main now, instead of on the hub's own schedule. |
atrium_git_collect | Fetch a room's claude/* branches to the hub now, so they can be merged. |
atrium_alias | Read or set a card's alias, the short @name that atrium_say and atrium_peers take. |
atrium_model | Switch a live session's model now, by typing /model when its line is clear. |
atrium_publish | Publish a document on the hub, with a stable /d/<slug> link that outlives the card. |
atrium_put | Leave a file in the hub's drop for a card on another room or the board, by path from your own card or as content. |
atrium_files | List the drop, newest first: who put each file, from which room, and when it expires. |
atrium_get | Fetch a drop file into your own card, under .atrium/incoming/ or at a dest inside the card. |
atrium_export | Pull every online room's usage rows or card list into the drop in one call, with no card needed on those rooms. |
atrium_backlog | The backlog, kept on the hub, so an item filed on one room is seen on every room. |
atrium_reports | Director reports, kept on the hub, append-only and marked read once read. |
atrium_remind | Bring something back to a card later, up to 90 days out: an alert on the board and the phone, and with wake the text typed into the card. Kept on the hub. |
atrium_deps | Work items that wait on other work: other items, a room attached, a commit landed. |
atrium_resources | The machines and environments you may use. Call it before looking for a machine. |
atrium_deploy | Ask for a room deploy, or, as the deploy owner, run one that holds every agent first. |
atrium_wake_after_restart | Queue one prompt for your own card, typed in once a restart brings your session back. |
restart_atrium | Wind a room down and bring it straight back on the same database. |
A worker, a card tagged atrium:subagent and not a director, gets only the tools it needs to talk, report and
push: atrium_status, atrium_peers, atrium_say, atrium_report, atrium_task, atrium_alias,
atrium_publish, the four file drop tools, atrium_git_push, atrium_git_url, atrium_ci and atrium_resources.
Everyone else gets them all.
atrium control, the stdio server for a session that does not reach the hub, carries atrium_status,
restart_atrium, the peer tools, atrium_git_push, atrium_git_url, atrium_ci, atrium_remind, and two of its own: atrium_git_clone, which
returns a clone of a repository on this room and makes it if it is missing, and atrium_open.
The file drop
atrium_put, atrium_files, atrium_get and atrium_export hand files between rooms through the hub. A put reads
a file from your own card by path, through its room, or takes content with a name, and answers the name it was
stored under: a name already taken gets a suffix, usage-2.jsonl, and nothing is replaced. A get writes only into your
own card, and never into another or outside yours. Without dest it lands in .atrium/incoming/. With dest, a
relative path inside the card, it makes the folders, and it will not replace a file unless replace is true.
atrium_export has the hub read each online room's usage rows (what: usage, since a time, default 7 days) or card
list (what: tasks) and store one file per room. It answers rows and never a raw database. A room that is offline or
too old is listed under skipped and the rest still land.
Every file in the drop is readable by every card and by anyone past the board's password, so a private file does not
belong there. A file is kept 7 days unless ttl_days says up to 30, is at most 32 MiB, and a card may put 30 an hour.
The secret checks are a speed bump: a file named like a secret, or text holding a key or token, is refused, and a
secret in a binary format or a screenshot is not seen. The Files page on the board lists, downloads, deletes and
uploads.
Talking, not typing
atrium_say answers with how the message went: terminal when it was typed in, queued when it waits for the
session's next tool call or turn end. Neither is a reply. The receiving session is told who sent it, so a message
reads as one agent talking to another.
Call atrium_peers before saying anything. The handle it returns is what atrium_say takes. A handle read off a
card title is usually wrong.
atrium_say takes wake, which resumes a parked session and delivers, including one on another room
(name@room). It costs a cold start, so leave it off unless the message is worth it. A say to a parked session
without it is refused and nothing is queued.
atrium_say and atrium_report take kind. fyi is news the receiver need not act on, and a launcher that holds its
notices keeps it on its card instead of being interrupted. needs is the default, and done, blocked, question
and anything carrying an ask are always needs.
Launching a colleague
atrium_launch starts a real session, not a subagent. It has its own conversation, its own permission gate and its
own card, it outlives the session that started it, and you can watch it, type into it or take it over.
- It starts empty. It inherits nothing of the caller's conversation. Hand it what it needs with
prompt. briefis written toBRIEF.mdin the new session's directory and read first, so it survives compaction.themepicks its terminal theme. Workers usually wearactive-work.- Its permission requests go to you, on your board.
roomlaunches on another room through the hub.cwdis then a path on that machine.- At most ten agent-launched sessions run at once. A launch past the cap is refused and recorded in the audit tab.
A session another session launched should end every turn with atrium_report or atrium_say to its launcher. A
turn that ends with neither is a silent stop, and the launcher is told, then your board.
Culling a finished worker
atrium_cull is how a worker's slot comes back once its work is done. Calling it is the acceptance, so call it after
the worker's branch is merged into claude/main and you are finished with the work, never before. A worker cannot
cull itself.
- The room checks. A card not tagged
atrium:subagent, or one whose branch is not merged, is refused whole. - It asks, then removes. The worker is asked to leave, then its worktree is removed and its branch deleted.
- Uncommitted work is kept. A dirty worktree stays with its branch, and
keptsays why. The worker still leaves. - Nothing is forced. Git removes the worktree only when it agrees it is clean. The card and its history stay.
Seen
atrium_task with no card answers about the caller's own card. Its seen block says whether you have read the
last turn and which of its Open Questions you have not answered. atrium_peers counts unseen turns and open
questions per peer. An agent checks this before assuming you read what it wrote.
Restarting from inside
restart_atrium is scheduled, not immediate, because it takes down every terminal the room owns, possibly the
caller's own. The room parks its working agents first, spawns a restarter that outlives it, and comes back as the
same room. Staged binaries are installed on the way.
Fetching code you do not have
atrium_git_url takes repo (host/owner/repo or a name), and optionally branch and room. It answers with the URL
to git fetch, and whether the code is the hub's copy of pushed work or a room's work in progress. A branch that is
both says which is ahead. A repository the hub does not know answers with the closest names. Use it instead of asking
for a paste.
Reading CI
atrium_ci answers what a repository's CI did. It is read only, and the HUB answers it, because only the hub runs
gh. A room's session never runs gh and should not ask a person to. The tool takes repo (owner/repo or
host/owner/repo) and an action:
| Action | Takes | Answers |
|---|---|---|
runs | branch, sha, limit (10, max 50) | Runs, newest first: id, workflow, status, conclusion, sha, url. |
run | run_id | The run's jobs, and each job's steps with their conclusions. |
log | job_id or run_id, failed_only, tail | The END of a log. A run's is the failed steps only. |
artifacts | run_id | The run's artifacts: name, size, expired. ci.sh uploads build.claude/ci. |
artifact | run_id, name, file | Downloads it on the hub (max 200 MiB), answers its folder and files. |
A log is bounded while it is read, never read whole and cut after. It keeps the last tail lines (400 by default,
at most 5000) within 64 KiB, and truncated says earlier lines were left out. An artifact lives on the hub's disk, which
a room cannot read, so pass file to read the last lines of one file in it.
The hub downloads the zip itself and unpacks it with the cap counted as it writes, so a zip bomb stops at
200 MiB. Downloads are kept 24 hours and at most 1 GiB in all, oldest first.
A GitHub login the hub lacks, or a gh it does not have, answers the command to run ON THE HUB, for example
gh auth login --hostname github.com, and raises the hub's forge alert. Bitbucket answers not supported on bitbucket. A room reaches the hub through its link (POST /v1/hub/ci on its daemon, then /_forge/ci on the git
kind), and the hub's own control MCP asks its board (POST /_hub/forge/ci).