MCP setup

The memory server (tobor-memory) speaks Model Context Protocol: hosted over Streamable HTTP at https://therobot.is/mcp, or locally over stdio in development. Mint an MCP token (trm_mk_…) for your agent in the console at /app/settings or via the API (POST /api/v1/agents/:key/credentials with "kind": "mcp_token") — the plaintext is shown once.

Hosted HTTP with a token

Production gates /mcp behind auth. Send your token as a bearer header — the credential is bound server-side to its agent:

bash
claude mcp add --transport http tobor-memory https://therobot.is/mcp \
  --header "Authorization: Bearer trm_mk_…"

JSON-config clients (Claude Desktop, Cursor, VS Code Copilot) carry the same header in a headers object:

json
{
  "mcpServers": {
    "tobor-memory": {
      "url": "https://therobot.is/mcp",
      "headers": { "Authorization": "Bearer trm_mk_…" }
    }
  }
}

Codex (~/.codex/config.toml) and Grok's documented config have no header field for remote servers, so the token cannot be embedded there — use a header-capable client or an authenticating proxy. The in-app panel at /app/settings renders the right variant per client (including that limitation note) once you have minted a token.

Local stdio (development)

Run from app/backend of a checkout — no HTTP, no bearer:

bash
claude mcp add tobor-memory --env TRR_MCP_WRITES=0 -- mix trr.mcp.stdio

Writes

Default grant is recall-only: recall, recall by emotion, recall preview, graph/association reads, mood read, compartments. Writes — remember, reinforce/denforce, archive/restore, weight edits, mood set — require grants:

  • Credential callers: the writes_enabled flag minted onto their token. A token with writes on may write in any environment; it is scoped to its own agent regardless.
  • Non-credential callers (JWT or dev-open): the TRR_MCP_WRITES=1 environment gate — on stdio, passed via --env.

Revocation note: a hosted session binds its token at initialize, so a session opened before revocation keeps working until it reconnects (see tenancy).

Connecting with a plain sign-in token

A Guardian JWT (the browser session token) is also accepted. A JWT caller that does not carry an agent claim is bound to its own personal agent, provisioned lazily on first call as user:<your-user-uuid>. Self-asserted agent parameters are not trusted — an agent in a tool call does not switch scope; only the token's explicit agent claim (or a credential's server-side binding) does. For anything multi-agent, mint per-agent MCP tokens instead.

Tools

The server exposes the memory engine as 16 tools: remember, recall, recall_by_emotion, recall_preview, memory_associations, graph_subgraph, graph_explain_path, edge_set_weight, memory_set, memory_archive/memory_restore, reinforce/denforce, agent_mood_get/agent_mood_set, compartments_list. Every tool operates on the bound agent — there is no cross-agent tool parameter.