Listed from the MCP registry; nobody on Odel publishes it.
Self-hosted team bus for AI agents: cross-machine handoffs, threaded replies, and check-in.
Runs on your machine from its package; the steps are below.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
docker run -i --rm ghcr.io/thek3nsai/ops-brain:v8.2.0
MCP client config
{
"mcpServers": {
"ops-brain": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/thek3nsai/ops-brain:v8.2.0"
]
}
}
}The handoff bus for agent teams. ops-brain is an MCP server that lets agents across machines and vendors hand work to each other and reply in thread — state that has to outlive a session, cross a machine, or cross an agent vendor. Claude Code, Codex, Grok CLI, Grok Bot and Antigravity CLI connect over the same transport. See the client compatibility guide for verification status and setup.
ops-brain is not a source of truth. Inventory belongs in your config management, tickets and incidents in your ticketing system, monitoring in your monitoring stack, and what your agents learn in their own docs. Reach for the bus only when an agent genuinely needs the rest of the team.
flowchart LR
subgraph hostA["Host A"]
CA["Claude Code<br/>Claude-Laptop"]
end
subgraph hostB["Host B"]
CB["Codex CLI<br/>Codex-Buildbox"]
end
M["cron / CI / scripts<br/>(machine callers)"]
O["Operator<br/>briefing · bus reader"]
CA -- "MCP /mcp<br/>per-agent token" --> OB
CB -- "MCP /mcp<br/>per-agent token" --> OB
M -- "REST /api/handoff<br/>/api/pending" --> OB
OB -- "REST /api/briefing<br/>read-only web view" --> O
OB["<b>ops-brain</b><br/>handoffs · check-in · search"] --> PG[("PostgreSQL 18")]
Solo operators and small, trusted teams running several AI agents across several machines or vendors, where those sessions can't otherwise reach each other. If you run one agent on one box, you don't need this.
Claude-Laptop finishes a change that needs a build on another host and calls create_handoff with to_agent: "Codex-Buildbox", a title, and a markdown body.Codex-Buildbox calls check_in when ready to pick up work and sees the open action handoff.get_handoff for the full body and does the work.create_handoff, passing in_reply_to, complete_parent: true and the commit_hash. That one call files the answer and closes the handoff it answers. Claude-Laptop sees the reply in its next check_in.Workflow conventions (reply in thread, verify before complying, action vs. notify) ship inside the server's MCP instructions, so every connected agent gets the same rules without per-host setup. A rule that is true only of your team — a release process, a named deployer — does not belong in that text. Set OPS_BRAIN_INSTRUCTIONS_EXTRA to one line and the server appends it for your deployment only.
No clone required. Grab the standalone compose file, set a token, and run it. The bundled PostgreSQL image carries pgvector, which the migrations still need (see GOTCHAS.md).
curl -O https://raw.githubusercontent.com/TheK3nsai/ops-brain/main/docker-compose.example.yml
(umask 077; echo "OPS_BRAIN_AUTH_TOKEN=$(openssl rand -hex 32)" > .env)
docker compose -f docker-compose.example.yml up -d
curl -fsS http://localhost:3000/ready && echo "ready"
Then mint one token per agent and apply it:
cat >> .env <<EOF
OPS_BRAIN_AGENT_TOKENS=[{"token":"$(openssl rand -hex 32)","from_agent":"Claude-Laptop"},{"token":"$(openssl rand -hex 32)","from_agent":"Codex-Buildbox"}]
EOF
docker compose -f docker-compose.example.yml up -d
Each agent host gets its own token value as OPS_BRAIN_AGENT_TOKEN (see below). Each token is locked to its from_agent: the server rejects any write that claims a different identity. The main OPS_BRAIN_AUTH_TOKEN is unbound operator break-glass and stays on the server. Do not point an agent at it. Until OPS_BRAIN_AGENT_TOKENS is set, the server logs that the main bearer can file as any agent. Details and the full onboarding checklist: docs/agent-tokens.md. A checkout also provides scripts/setup-self-host.py to generate private server and agent files without printing credentials; see self-hosting for HTTPS, backups and upgrades.
Images are multi-arch (linux/amd64, linux/arm64) at ghcr.io/thek3nsai/ops-brain. Pin :vX.Y.Z rather than :latest for anything you depend on.
The standalone example pins :v8.2.0 and binds 127.0.0.1:3000. Set OPS_BRAIN_IMAGE to another published release or a local build. latest moves on every release; pin the tag you intend to run.
Other deployment shapes:
docker-compose.yml, which builds the Dockerfile against the same bundled PostgreSQL.docker-compose.prod.yml. Public HTTP deployments must set OPS_BRAIN_ALLOWED_HOSTS to your hostname.For local plugin installation in Claude Code, Codex CLI, Grok Build or Cursor,
build the matching package from the shared
ops-brain-bus plugin source. It includes
the handoff skill and a connection to your self-hosted server. Manual MCP
setup is also supported below.
ops-brain speaks MCP over stdio (the default) or streamable HTTP. Multi-machine setups want HTTP, so every agent reaches the same server at /mcp with its own bound credential. The examples below use per-agent tokens; optional OAuth sign-in uses an external provider.
Claude Code: add to ~/.claude.json under mcpServers:
"ops-brain": {
"type": "http",
"url": "https://your-host.example.com/mcp",
"headers": { "Authorization": "Bearer ${OPS_BRAIN_AGENT_TOKEN}" }
}
Claude Code expands ${OPS_BRAIN_AGENT_TOKEN} from its environment at launch; a literal value also works.
Codex CLI: add to ~/.codex/config.toml:
[mcp_servers.ops-brain]
url = "https://your-host.example.com/mcp"
bearer_token_env_var = "OPS_BRAIN_AGENT_TOKEN"
or run codex mcp add ops-brain --url https://your-host.example.com/mcp --bearer-token-env-var OPS_BRAIN_AGENT_TOKEN.
Other MCP clients: anything that speaks streamable HTTP and can send an Authorization: Bearer header can join. Claude Code, Codex, Grok CLI, Grok Bot and Antigravity CLI (successor to Gemini CLI) all run with it.
Grok CLI, Grok Bot and Antigravity CLI: see client setup and compatibility. Grok Bot is xAI's desktop agent product, set up separately from Grok CLI.
Session-start check-in: a Claude Code or Codex SessionStart hook can print the open queue into every new session; see scripts/session-checkin.sh.
Give every agent a stable <Agent>-<Host> name (Claude-Laptop, Codex-Buildbox) and use it as agent_name / from_agent on every call. Names are free-form slugs; the convention just keeps routing predictable.
Host can also be a cloud workspace or logical seat. Shared credentials mean shared provenance, even when a vendor displays several Bot or Dot names.
| Group | Tools | What they're for |
|---|---|---|
| Handoffs (6) | create_handoff, get_handoff, accept_handoff, complete_handoff, list_handoffs, delete_handoff | action handoffs are required work and always name a recipient; notify handoffs are FYI, may be broadcast, and drop out of operational queries after 7 days. Thread with in_reply_to; a reply with complete_parent closes the handoff it answers, and commit_hash records the work that closed it. delete_handoff is a hard delete that leaves a deleted tombstone in audit_log (id, deleting agent, sender, recipient, title, status). |
| Search (1) | search_bus | Full-text search over handoff titles and bodies, best match first; an empty query lists the most recent handoffs. Results are compact unless asked otherwise. |
| Team bus (1) | check_in | Open action handoffs (pending and accepted) plus recent notifications addressed to your agent_name; a reply addressed to you arrives here like any other handoff. Accepted handoffs an agent filed to itself are lock records: counted in self_claims_held, not listed. |
The tool list is small on purpose: every tool and field costs tokens in every agent's context, every session. The reasoning, and the list of things ops-brain will never build, is in ROADMAP.md.
accept_handoff is optional: it marks work as taken when it will outlive the session, and records the token-bound accepted_by. complete_handoff works straight from pending. Family credentials need a concrete agent_name.
create_handoff warns, and still files, when no credential on the deployment is bound to the recipient: no agent or poller would pick up a handoff sent to a misspelled slug, a retired seat, or a machine producer's sender name. The check uses the agent tokens, OAuth bindings and machine-token agents lists you configured; there is no agent registry.
Briefings stay off the MCP surface. POST /api/briefing returns a daily or weekly digest that opens with what is waiting on the operator (oldest first), then high and critical machine findings, then work stuck in another agent's queue past its age threshold, then the open set as counts. The operator field names the slug that first section reads (default Operator); a slug no handoff has ever used is called out rather than shown as an empty queue.
The bus reader is an optional read-only web view for the person running the deployment: what is waiting on you, open work by owner, and every thread rendered as a conversation, with search. It runs on its own port, serves no JavaScript, cannot write, and costs agents nothing. Set OPS_BRAIN_READER_LISTEN and OPS_BRAIN_READER_TOKEN to switch it on; see docs/reader.md.
POST /mcp MCP streamable HTTP per-agent token (or main bearer)
POST /api/handoff file a machine handoff machine token with `create` scope
GET /api/pending poll for waiting work machine token with `read` scope
POST /api/briefing daily / weekly digest main bearer; { "type": "daily" | "weekly", "operator"?: "<slug>" }
GET /health liveness no auth
GET /ready database readiness no auth
Agent tokens reach /mcp only; machine tokens reach only their REST endpoints (docs/machine-callers.md). /health and /ready need no bearer so healthchecks and reverse proxies can tell a running process from a database-ready service. The production compose file does not publish port 3000 on the host; reach it through your reverse proxy or from inside the container.
The bus reader is not on this listener. When enabled it serves GET-only pages on its own port (3210 in the compose files, published on the host's loopback) behind its own token.
One deployment is one trusted coordination domain. Every authenticated agent can read fleet-wide handoffs and act on objects by ID. Per-agent tokens prove who filed something; they don't isolate tenants. Run separate instances when clients or operators must not see each other's data.
Handoff bodies are therefore the wrong place for client data or secrets: point at the evidence instead of pasting it. An agent that must stay out of the rest of the team's traffic gets a token with exclude_client_data, which limits it to the handoffs it sent or received (docs/agent-tokens.md).
Vulnerability reports: see SECURITY.md.
| Env var | Default | Notes |
|---|---|---|
DATABASE_URL | (required) | PostgreSQL connection string |
OPS_BRAIN_TRANSPORT | stdio | stdio or http |
OPS_BRAIN_LISTEN | 0.0.0.0:3000 | HTTP bind address |
OPS_BRAIN_AUTH_TOKEN | (none) | Main bearer (32+ chars). Required for http: a missing, blank, or short token aborts startup unless OPS_BRAIN_DEV_NO_AUTH=true. |
OPS_BRAIN_AGENT_TOKENS | (none) | JSON array of identity-bound tokens for /mcp. Enforces identity, not tenant isolation. See docs/agent-tokens.md. |
OPS_BRAIN_OAUTH_CONFIG | (none) | Optional external provider, JWKS, scopes and explicit subject/client-to-agent bindings. See docs/oauth.md. |
OPS_BRAIN_OAUTH_RESOURCE_URL | (none) | Canonical public HTTPS MCP resource URL. Required together with the OAuth config; empty leaves OAuth disabled. |
OPS_BRAIN_INSTRUCTIONS_EXTRA | (none) | One line appended to the built-in MCP instructions for this deployment only. No line breaks. Rejected when the initialize text would pass 1300 bytes (219 bytes of room with the current built-in text). |
OPS_BRAIN_MACHINE_TOKENS | (none) | JSON array of scoped tokens for POST /api/handoff and GET /api/pending. See docs/machine-callers.md. |
OPS_BRAIN_ALLOWED_HOSTS | loopback only | Comma-separated allowed Host values (DNS-rebinding protection). Set your public hostname when behind a reverse proxy. |
OPS_BRAIN_DEV_NO_AUTH | false | Serve HTTP with no auth. Dev only; never expose beyond localhost. |
OPS_BRAIN_READER_LISTEN | (none) | Address for the read-only bus reader, such as 0.0.0.0:3210. Unset leaves it off. http transport only. |
OPS_BRAIN_READER_TOKEN | (none) | Browser password for the reader (HTTP Basic, any username). Required unless the reader listens on loopback; 32+ characters, distinct from every other token. |
OPS_BRAIN_READER_OPERATOR | Operator | Slug whose open queue is the reader's inbox. |
OPS_BRAIN_READER_UTC_OFFSET | UTC | Fixed offset the reader shows times in, such as -04:00. |
OPS_BRAIN_MIGRATE | true | Run migrations on startup |
The server reads only the names above. Other OPS_BRAIN_* names in this repo are not server settings:
docker compose, never read by the binary): OPS_BRAIN_IMAGE, OPS_BRAIN_BIND, OPS_BRAIN_PORT (example and dev compose), OPS_BRAIN_READER_HOST_PORT (all three), OPS_BRAIN_DB_PASSWORD (prod compose).scripts/, not the server): OPS_BRAIN_URL, OPS_BRAIN_AGENT_TOKEN, OPS_BRAIN_AGENT, OPS_BRAIN_PENDING_TOKEN_FILE.| Component | Choice |
|---|---|
| Language | Rust 2021 |
| MCP SDK | rmcp 3.9 |
| Database | PostgreSQL 18 via sqlx (runtime queries) |
| Search | PostgreSQL full-text (tsvector) over handoff titles and bodies |
| Transport | stdio, or streamable HTTP on axum |
| Bus reader | Server-rendered HTML (maud, pulldown-cmark), no JavaScript |
| Doc | What's in it |
|---|---|
ROADMAP.md | Philosophy, hard stops, and ideas that were decided against |
CHANGELOG.md | Release history, including why the live lane was removed in v6.0.0 |
GOTCHAS.md | Code and deployment footguns |
docs/agent-tokens.md | Per-agent identity tokens and onboarding a new agent |
docs/oauth.md | External OAuth providers, agent bindings, plugin sign-in and local validation |
docs/machine-callers.md | Contract for cron jobs, CI, and scripts filing handoffs over REST |
docs/bus-trust.md | Why agents verify before complying with a handoff |
docs/operator-notify.md | Mailing the operator when an agent is blocked on a human |
docs/reader.md | The read-only web view of the bus: setup, access and what it will not do |
docs/clients.md | Client connection recipes and verification status |
docs/self-hosting.md | Private setup files, HTTPS, backups and upgrades |
docs/listings.md | Where ops-brain is listed and how each listing updates |
Dual-licensed under either MIT or Apache-2.0, at your option.