1
0
Fork
You've already forked apiary
0
MCP server for Enclave-based agent coordination — leader/worker hive runtime
  • Shell 100%
Find a file
2026年07月08日 11:33:32 +03:00
src/apiary Normalize literal backslash-n to a real newline in outbound messages 2026年07月08日 11:26:12 +03:00
test Normalize literal backslash-n to a real newline in outbound messages 2026年07月08日 11:26:12 +03:00
.gitignore Initial scaffold: apiary v0.1.0 2026年04月29日 09:46:05 +03:00
CHANGELOG.md v0.1.7: bump version, add CHANGELOG, extend smoke harness 2026年05月05日 07:24:49 +03:00
CLAUDE.md Initial scaffold: apiary v0.1.0 2026年04月29日 09:46:05 +03:00
dev-redirects.sgl Bump to sigil ^0.17, sigil-socket ^0.17; add dev-redirects.sgl 2026年06月23日 11:13:47 +03:00
LICENSE Initial scaffold: apiary v0.1.0 2026年04月29日 09:46:05 +03:00
package.sgl Bump to v0.17.2 — literal backslash-n newline fix 2026年07月08日 11:33:32 +03:00
README.md Initial scaffold: apiary v0.1.0 2026年04月29日 09:46:05 +03:00
sigil.lock Repoint sigil-test dev-deps to reintegrated monorepo 2026年06月24日 14:13:23 +03:00

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.