Your memory. Your tools.
Codex
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
Add the server, then sign in. Codex opens the browser for Serenity’s consent page, where you choose the brain and access level.
codex mcp add serenity --url https://serenity.sire.run/mcp
codex mcp login serenitySign-in through this flow has succeeded in local testing. An actual OAuth-backed recall call has also passed against the local service with synthetic data. This does not qualify cloud clients or production retrieval quality.
Fallback: bearer token
Create a token for the brain in Your project memories, then merge this into the project’s .codex/config.toml. Load SERENITY_TOKEN privately into the environment that launches Codex, and trust the project so its configuration can load.
[mcp_servers.serenity]
url = "https://serenity.sire.run/mcp"
bearer_token_env_var = "SERENITY_TOKEN"Check /mcp in Codex. Select a different brain when switching to a project that should have separate memory.
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.