apiary
MCP server for Enclave-based agent coordination — leader/worker hive runtime
Report a bug or suggest a featuregit clone https://git.usesigil.org/sigil/apiary.git
Apiary
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.
v0.17.4 — latest by version, released 25 Aug 2026
All releases — 14 tags in this repository.
One page per file, and every line has a permalink.
Relock: record the >= pin form
7c32e6ae
2b249233
dc3f4c01
Align all Sigil packages on 0.19
d7ebb420
4abd0709
b30e0169
The last 20 commits keep a page here. Everything older lives in the clone.