Brainery

connect agents to this brain

Three ways. Pick the one your stack already speaks.

We don't build the agent. We're the brain agents call. Cursor, Claude Code, Codex, Sierra, Decagon, your custom internal agent — all of them already speak at least one of the three protocols below. No code changes on our side per consumer.

01

MCP server (most agents)

Model Context Protocol — Anthropic, OpenAI, Cursor, Codex, Goose all support this natively.

for

Claude Code · Cursor · Codex · Windsurf · Goose · Continue · ChatGPT Desktop

tldr

Add the brain as an MCP server. Agent auto-discovers all skills as resources + tools.

1. Drop this into Claude Code

~/.claude/server.json (or Cursor → Settings → MCP Servers)

{
  "mcpServers": {
    "company-brain": {
      "url": "https://your-brain.com/api/mcp",
      "transport": "http"
    }
  }
}

2. Verify the agent can see your skills

Run any agent — it should list 'company-brain' as a resource server.

# Tool surface visible to the agent:
brain://skills/refund-decision-policy
brain://skills/db-connection-pool-exhausted
brain://skills/pricing-exception-approval
brain://skills/auth-jwks-rotation-spike
... 9 total skills

3. The agent calls the brain when relevant

No code changes. The agent picks the right skill based on the task automatically.

User: "How do we handle a $312 refund — package never arrived?"
Agent: → resources/list → finds refund-decision-policy
       → resources/read brain://skills/refund-decision-policy
       → walks the runbook
       → returns the decision (with citations)

02

HTTP API (anything that can curl)

Plain JSON over HTTP. For custom internal agents, scripts, automations, anything.

for

Custom agents · Zapier · n8n · cron · CI · Slack bots

tldr

Three endpoints. List, fetch, match. Use any HTTP client.

List all skills

GET /api/skills

curl https://your-brain.com/api/skills | jq

# {
#   "ok": true,
#   "count": 9,
#   "skills": [
#     {
#       "slug": "refund-decision-policy",
#       "domain": "cx",
#       "version": "1.2.0",
#       "confidence": 0.91,
#       "url": "/api/skills/refund-decision-policy"
#     }, ...
#   ]
# }

Match a task to the right skill

POST /api/skills/match — the brain.match() primitive

curl -X POST https://your-brain.com/api/skills/match \
  -H "content-type: application/json" \
  -d '{ "task": "customer wants refund, package never arrived" }'

# {
#   "matched": {
#     "slug": "refund-decision-policy",
#     "confidence": 0.94
#   },
#   "candidates": [...]
# }

Fetch the full skill

GET /api/skills/:slug?format=raw

curl https://your-brain.com/api/skills/refund-decision-policy?format=raw

# Returns the raw SKILL.md contents — agent loads directly into its context.

03

Git submodule (max determinism)

Skills as files. Mount the brain as a git submodule. Best for compliance-sensitive deployments.

for

Air-gapped agents · audited deployments · gh skill install · GBrain compatibility

tldr

The brain is a git repo of versioned SKILL.md files. Add it as a submodule. Agent reads files at runtime.

1. Clone the brain into your agent's workspace

cd ~/.claude/skills
git submodule add https://github.com/your-org/your-company-brain
git submodule update --init

2. Or use the Anthropic skill installer

Compatible with the open SKILL.md spec. One file per skill.

gh skill install your-org/your-company-brain
# → resolves to ~/.claude/skills/your-company-brain/*.skill.md

3. Brain updates land via PR

Every skill change is a git commit. Lint blocks risky merges. Approval workflow per skill.

# Nightly: brain ingests new Slack threads
# Generates PR: 'Update refund-decision-policy.skill.md (cap raised to $500)'
# Coherence engine runs on PR: detects contradiction with HR doc
# Routes to @rachel for sign-off
# On merge: agents pulling via submodule auto-update on next pull

why three options

We are not the agent. Different teams have different agents — some off-the-shelf (Cursor, Sierra), some custom-built. The brain is the substrate underneath. Every consumer model already speaks at least one of these three protocols, so adopting Brainery doesn't require any change on the agent side.