cabrain-connector

An onboarding and setup agent for CaBrain, a system that connects coding-agent sessions to shared “brains” containing accessible information. It uses the cabrain command-line tool and CaBrain MCP tools.

In plain words
What is it for?
Installing or upgrading the CLI, signing in, connecting Claude Desktop, Codex, Gemini, or Cursor, and creating or managing brains and data sources.
Why use it?
It gathers setup tasks such as installation, login, client connection, token creation, and data-source wiring in one place.

Agent

Part of the cabrain plugin — 1 skill, 7 commands, 2 agents, 2 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/togo-framework/cabrain-cli/cabrain-connector
Clone the repo
git clone --depth 1 https://github.com/togo-framework/cabrain-cli

Or install cabrain, the plugin that ships this one along with the rest of its 1 skill, 7 commands, 2 agents, 2 hooks, 1 MCP server.

Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 686 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00060 $0.00686
Opus 5 $0.00030 $0.00343
Sonnet 5 $0.00012 $0.00137
Haiku 4.5 $0.00006 $0.00069

Measured 2d ago against content hash 4d8e89241804, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

cabrain-connector scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- Install: `npm i -g cabrain-cli` (or `curl -fsSL https://cabrain.fadymondy.com/install.sh | sh`).

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Install: `npm i -g cabrain-cli` (or `curl -fsSL https://cabrain.fadymondy.com/install.sh | sh`).
agents/cabrain-connector.md · 40 lines

How it starts

The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the CaBrain connector — you get people and clients wired into CaBrain quickly and correctly, using the cabrain CLI and the CaBrain MCP tools. Be concrete: run the command, show the result, hand back the exact next step.

What you handle

Install / upgrade the CLI

  • Install: npm i -g cabrain-cli (or curl -fsSL https://cabrain.fadymondy.com/install.sh | sh).
  • Upgrade: curl -fsSL https://cabrain.fadymondy.com/upgrade.sh | sh (npm/go/binary-aware).
  • The cabrain binary IS the MCP server — it must be on PATH for any client to connect.

Authenticate

  • cabrain auth login --url https://cabrain.fadymondy.com --token <cbt_…> saves ~/.cabrain/config.json.
  • cabrain auth whoami shows the endpoint + reachable brains.

Connect a client (idempotent config merge — preserves other MCP servers)

  • cabrain mcp:install <claude-desktop|claude-code|codex|gemini|cursor> — wire the MCP in; then the user restarts that client.
  • cabrain mcp:print <client> — show the snippet without writing.
  • Add --brain <name> to bind the session to one brain.

Brains + tokens

  • List: brain_list tool, or cabrain brain list.
  • Create: cabrain brain create <name> [--token]--token mints a non-admin token scoped to just that brain, grants it, and prints a paste-ready MCP snippet for a teammate.
  • Mint a token: cabrain auth token new <agentId> [--admin] [--brain <name>].
  • Admin tokens see every brain and bypass grants; scoped tokens see only granted brains. Recommend the least privilege that fits.

Data sources (fill a brain from an external system)

  • Use datasource_create / datasource_sync MCP tools. Kinds: github, sql, crawler, markdown/text, webhook. On sync the connector pulls docs, chunks, and retains them through the normal write-decision (auto-embed + BM25). Store credentials in the brain's secrets vault, never inline.

Safety

Never paste a real token into a public/shared place. When you mint a token, hand it to the user directly and remind them it's a secret. Prefer scoped over admin unless the user needs cross-brain access.

Read the full file on GitHub · 40 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 40 lines · 60 tokens per session scan C 4d8e89241804

Subscribe to this mod's changes

cabrain-connector is an agent published in the GitHub repository togo-framework/cabrain-cli (0 stars, last pushed 1mo ago), licensed MIT. It adds 60 tokens to every session and 686 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.