Skip to content

MCP ​

Carrybrain speaks the Model Context Protocol, so any MCP client can use it. The endpoint is stateless Streamable HTTP.

URLhttps://memory.example.com/mcp (your server's address plus /mcp)
TransportStreamable HTTP, JSON responses
AuthAuthorization: Bearer cb_... with a personal API key

The server also sends MCP instructions that tell agents to call recall before work, remember instead of local memory files, set_rule for "from now on" instructions, and list_skills / get_skill for skills. A read-only key can call every tool except the four that write (remember, forget, set_rule, remove_rule); those return this key is read-only.

Set up a client ​

The CLI does this for you: carrybrain install claude|codex|cursor|gemini (see CLI). To do it by hand:

sh
# Keeps the key out of Claude's config by asking the CLI for the header at connect time:
claude mcp add-json --scope user carrybrain \
  '{"type":"http","url":"https://memory.example.com/mcp","headersHelper":"carrybrain mcp-headers"}'

# Or with a static header:
claude mcp add-json --scope user carrybrain \
  '{"type":"http","url":"https://memory.example.com/mcp","headers":{"Authorization":"Bearer cb_your_key"}}'
toml
# ~/.codex/config.toml
[mcp_servers.carrybrain]
url = "https://memory.example.com/mcp"
http_headers = { "Authorization" = "Bearer cb_your_key" }
json
// ~/.cursor/mcp.json
{
  "mcpServers": {
    "carrybrain": {
      "url": "https://memory.example.com/mcp",
      "headers": { "Authorization": "Bearer cb_your_key" }
    }
  }
}
json
// ~/.gemini/settings.json
{
  "mcpServers": {
    "carrybrain": {
      "httpUrl": "https://memory.example.com/mcp",
      "headers": { "Authorization": "Bearer cb_your_key" }
    }
  }
}

Any other MCP client that supports remote (HTTP) servers: add a server named carrybrain, set its URL to https://memory.example.com/mcp and add the Authorization header. These files hold your key in plain text, so keep them out of git. In a repo you share, commit a .mcp.json that reads the key from the environment instead (what carrybrain init-repo writes):

json
{
  "mcpServers": {
    "carrybrain": {
      "type": "http",
      "url": "${CARRYBRAIN_URL}/mcp",
      "headers": { "Authorization": "Bearer ${CARRYBRAIN_KEY}" }
    }
  }
}

Clients other than Claude Code do not load rules automatically. They call get_rules (the server instructions say so). For headless runs, allow the tools without a prompt, for example claude -p "..." --allowedTools "mcp__carrybrain__*".

Tools ​

A repo argument is any git remote (git@github.com:acme/api.git or github.com/acme/api); the server normalizes it to github.com/acme/api.

remember ​

Save a durable fact, decision or preference. Saving a near-duplicate of one of your own memories updates it instead of adding another.

ArgumentTypeNotes
contentstring, 1 to 4000 charsOne self-contained statement
visibilityprivate (default), team, orgteam and org only work if an admin allowed agents to write shared content
teamstringTeam name, for visibility: "team"; you must be a member
repostringOmit when it applies everywhere
json
{ "content": "Integration tests in acme/api need the local Postgres running on port 5432",
  "visibility": "team", "team": "backend", "repo": "github.com/acme/api" }

Returns Saved memory #12, or Updated memory #12 (replaced: "...").

recall ​

Search memories by meaning, best first, with a similarity score. Includes your private memories plus the team and org memories you can see.

ArgumentTypeNotes
querystring, 1 to 2000 charsNatural language
repostringAlso include this repo's memories (memories with no repo are always included)
limitinteger 1 to 100Default 5
json
{ "query": "how do I run the integration tests?", "repo": "github.com/acme/api" }

Returns one line per match: #12 [0.81] (team · github.com/acme/api · by Alex Morgan) Integration tests in .... Results scoring under the server's minimum (default 0.62) are dropped, so unrelated queries return No memories found.

list_memories ​

Newest first, for browsing. Arguments: repo (optional), limit (1 to 100, default 20). Use recall to find something specific.

forget ​

Delete a memory by id, the number after # in results. Only the owner or an admin can.

json
{ "id": "12" }

get_rules ​

The merged rules that apply to you, as the same labelled markdown the session hook injects. Argument: repo (optional). Rules labelled company policy (locked) come from admins. Returns No rules apply. when there are none.

set_rule ​

Save a persistent rule, replacing any rule with the same key at that scope.

ArgumentTypeNotes
keystringLowercase letters, digits and -, up to 64, such as testing or commit-style
contentstring, 1 to 8000 charsMarkdown
scopeorg, team, repo, user, user_repoDefaults to user_repo when repo is given, otherwise user
repostringRequired for repo and user_repo
teamstringRequired for team
json
{ "key": "commit-style", "content": "Use Conventional Commits.", "repo": "github.com/acme/api" }

repo, team and org rules affect other people, so they are refused unless an admin allowed agents to write shared rules. A key locked by a broader scope is refused too. See Rules.

remove_rule ​

Delete a rule you may edit. Arguments: key, scope, and repo or team where the scope needs one. Shared scopes follow the same agent-write setting as set_rule.

json
{ "key": "commit-style", "scope": "user_repo", "repo": "github.com/acme/api" }

list_skills ​

One line per skill available to you: name (scope): description. Argument: repo (optional, to include repo-scoped skills). Agents without native skill support should call it at the start of a task.

get_skill ​

The full SKILL.md of one skill. Arguments: name (from list_skills), repo (optional). An unknown name returns a hint to call list_skills.

json
{ "name": "release-checklist", "repo": "github.com/acme/api" }

Errors ​

A refused call comes back as a tool error with a readable message (this key is read-only, you are not in a team named "backend", an agent-writes message with what to do instead). Authentication failures are HTTP 401. The same data is available over REST.

Carrybrain is open source under the MIT license.