Your memory. Your tools.
Claude Code
Serenity connects through standard MCP OAuth. Add the server URL, and your agent opens a browser tab where you sign in, choose one project memory, and approve read-only or read-and-write access. No token is copied by hand. A private bearer token from Your project memories remains available as a fallback for environments without a browser.
Connect with OAuth
Run this in your project, then start Claude Code and use /mcp to authenticate. The browser opens Serenity’s sign-in and consent page; pick the brain for this project and the access level you want.
claude mcp add --transport http serenity https://serenity.sire.run/mcpUse --scope project to share the server entry through .mcp.json; the entry holds only the URL, never a credential. Each project that should keep separate memory connects to its own brain during consent.
Fallback: bearer token
For a session that cannot open a browser, create a token for the brain in Your project memories and add this entry to .mcp.json. Set SERENITY_TOKEN privately in the environment that launches Claude Code; never commit it or paste it into a conversation.
{
"mcpServers": {
"serenity": {
"type": "http",
"url": "https://serenity.sire.run/mcp",
"headers": { "Authorization": "Bearer ${SERENITY_TOKEN}" }
}
}
}Manage the connection
Connections appear under Connected agents, where you can disconnect any agent. Access tokens are short-lived and renewed automatically; each renewal rotates the refresh token, so a captured old token stops working. A connection expires after 30 days and your agent simply asks you to connect again.
Try your first memory
Restart or reconnect your harness, then ask: “Use Serenity to remember that this project’s test word is amber heron.” Next ask: “Use Serenity to recall this project’s test word.” Check the tool results. A successful connection alone does not verify a saved memory.
Serenity does not automatically ingest your repository or chat history. Your agent must use its memory tools. Writes use the configured embedding provider.