Skip to main content
The Brain MCP server exposes your Alfera workspace brain as callable tools in any MCP-compatible agent. Point Claude Code, Cursor, or your own harness at a single URL and your agent can search memory, read context, teach new facts, and ask the Alfera worker for answers. The server is streamable HTTP and stateless: no session to open, resume, or close. Every request carries its own key, so restarting your client or load-balancing across instances changes nothing.

Endpoint

Key facts

  • Streamable HTTP, stateless. No session to open or close. Every request is independent.
  • Protocol versions. The server speaks MCP 2025-06-18 and accepts 2025-03-26 and 2024-11-05.
  • Same brain, same keys. It uses the same workspace brain and the same API keys as the Brain API. Disclosure rules are identical: an external key receives only profile_fact, preference, decision, and observation, and never facts about your team, agent_inferred facts, or facts about an end user the call did not name.

Connect

Create a key in the Alfera app under Settings → API Keys, pick its scopes and audience, and export the secret:
Add the MCP server with the claude mcp add command:

Verify with whoami

Call whoami to confirm the connection. It needs no scope, so it answers for any live key and reports what the connection can do.
string
Human-readable name for this key, for example support-bot.
string
Prefix of the key, for example ak_live_x7f4.
array
Array of scopes this key is allowed to use, for example ["memory.read", "answers.write"].
string
Audience for the key, for example external.
object
Object with requests_per_window and window_seconds, for example { "requests_per_window": 120, "window_seconds": 60 }.
Example response:
tools/list only advertises what this key’s scopes allow. A memory.read-only key never sees ask_worker. If a tool is missing from your agent’s list, the key lacks its scope.

Next steps