apiary
MCP server for Enclave-based agent coordination — leader/worker hive runtime
❦Report a bug or suggest a featureApiary
MCP server for Enclave-based agent coordination, built with Sigil.
Apiary participates in an Enclave IRC channel as a bot, coordinating a hive of agent worker sessions. One binary serves both leader mode (spawns workers, dispatches directives, owns DM channel to the human) and worker mode (executes assigned tasks, reports status, listens for instructions). Mode is selected by the APIARY_MODE env var; voicing is delegated to Enclave group membership.
Architecture
- Connects to an Enclave server as a bot via SASL.
- Joins a coordination channel.
- Filters incoming channel messages through a trusted set (owner + reports-to + subordinates + dynamically-listened peers). Messages from outside the trusted set are dropped to keep agent context clean.
- Forwards trusted messages to the running Claude session via MCP
channel-notify!events, rewritten in<sender>: <body>format. - Provides MCP tools for posting to channel, sending DMs (leader-only), spawning/revoking workers (leader-only), and managing the trusted set.
Configuration
Env vars (.env-apiary recommended):
APIARY_ENCLAVE_HOST=<enclave-host> APIARY_ENCLAVE_PORT=6697 APIARY_ENCLAVE_TLS=yes APIARY_USER=<bot-nick> APIARY_TOKEN=<sasl-token> APIARY_CHANNEL=#<coordination-channel> APIARY_MODE=leader # or 'worker' APIARY_OWNER_NICK=<owner-nick> APIARY_REPORTS_TO=<superior-nick> # defaults to APIARY_OWNER_NICK APIARY_LEADER_GROUP=<leader-group> # Enclave group name granting +v APIARY_WORKER_GROUP=<worker-group> # Enclave group name for non-voiced workers
Mention syntax
Channel mentions use a strict @<nick>: <body> prefix:
@worker-1: please proceed with the analysis. @leader: blocked — need policy decision.
Anything not matching @<nick>: is treated as a broadcast.
License
BSD-3-Clause.
$ git clone https://codeberg.org/sigil/apiary
v0.17.3 — latest by version, released 14 Jul 2026
All releases — 13 tags in this repository.
One page per file, and every line has a permalink.
Fix APIary smoke channel scope
0af64a92
64c244fd
The last 20 commits keep a page here. Everything older lives in the clone.