Cathedral — Claude Code MCP server: what it does, how to install
Preserves agent identity, context, and goals across coding sessions. It records cryptographic memory snapshots to catch behavioral drift after model changes.
claude mcp add --transport http cathedral-mcp https://cathedral-ai.com/mcpWhat Cathedral — Persistent Memory for AI Agents does
Fresh sessions wipe an agent's working memory. Cathedral fixes this by restoring identity and prior objectives through the cathedral_wake tool call. You can persist facts, decisions, and preferences using cathedral_remember, assigning categories and importance levels for subsequent retrieval.
Agent behavior often changes after model updates. Cathedral tracks this shift by hashing the memory corpus with SHA-256. Running cathedral_snapshot stores a baseline, while cathedral_drift reports a numerical divergence score between 0.0 and 1.0.
Connecting without a valid CATHEDRAL_API_KEY causes remote requests to fail. Setting CATHEDRAL_SANITISE to 1 filters prompt injection attempts before they reach the agent context. You can also point CATHEDRAL_BASE_URL to a self-hosted instance.
What it helps with
- retain agent persona and objectives across session restarts
- measure behavioral divergence after updating foundation models
- retrieve past decisions and context by category or query
- filter prompt injection patterns out of stored memories
Example prompts for the agent
- Wake up and reload your goals using cathedral_wake
- Save our decision to prioritize API stability into memory with cathedral_remember
- Capture a memory snapshot and check the drift score against baseline
How to install Cathedral — Persistent Memory for AI Agents
1Platform CLI: remote server
claude mcp add --transport http cathedral-mcp https://cathedral-ai.com/mcp2Platform CLI
claude mcp add --env CATHEDRAL_API_KEY=<CATHEDRAL_API_KEY> --env CATHEDRAL_BASE_URL=<CATHEDRAL_BASE_URL> --env CATHEDRAL_SANITISE=<CATHEDRAL_SANITISE> --transport stdio mcp-server -- uvx cathedral-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from cathedral-mcp <command>
1Platform CLI: remote server
codex mcp add mcp-server --url https://cathedral-ai.com/mcp2Platform CLI
codex mcp add mcp-server --env CATHEDRAL_API_KEY=<CATHEDRAL_API_KEY> --env CATHEDRAL_BASE_URL=<CATHEDRAL_BASE_URL> --env CATHEDRAL_SANITISE=<CATHEDRAL_SANITISE> -- uvx cathedral-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from cathedral-mcp <command>
Config file
{
"mcpServers": {
"mcp-server": {
"url": "https://cathedral-ai.com/mcp"
}
}
}{
"mcpServers": {
"mcp-server": {
"command": "uvx",
"args": [
"cathedral-mcp"
],
"env": {
"CATHEDRAL_API_KEY": "<CATHEDRAL_API_KEY>",
"CATHEDRAL_BASE_URL": "<CATHEDRAL_BASE_URL>",
"CATHEDRAL_SANITISE": "<CATHEDRAL_SANITISE>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from cathedral-mcp <command>
Config file
{
"servers": {
"mcp-server": {
"type": "http",
"url": "https://cathedral-ai.com/mcp"
}
}
}{
"servers": {
"mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"cathedral-mcp"
],
"env": {
"CATHEDRAL_API_KEY": "<CATHEDRAL_API_KEY>",
"CATHEDRAL_BASE_URL": "<CATHEDRAL_BASE_URL>",
"CATHEDRAL_SANITISE": "<CATHEDRAL_SANITISE>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from cathedral-mcp <command>
1Platform CLI: remote server
gemini mcp add -t http mcp-server https://cathedral-ai.com/mcp2Platform CLI
gemini mcp add -e CATHEDRAL_API_KEY=<CATHEDRAL_API_KEY> -e CATHEDRAL_BASE_URL=<CATHEDRAL_BASE_URL> -e CATHEDRAL_SANITISE=<CATHEDRAL_SANITISE> mcp-server uvx cathedral-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from cathedral-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Cathedral — Persistent Memory for AI Agents
How to install Cathedral in Claude Code?
For cloud access without local installation, run claude mcp add --transport http cathedral-mcp https://cathedral-ai.com/mcp. To run locally via uvx, execute `claude mcp add --env CATHEDRAL_API_KEY=<CATHEDRAL_API_KEY> --env CATHEDRAL_BASE_URL=<CATHEDRAL_BASE_URL> --env CATHEDRAL_SANITISE=<CATHEDRAL_SANITISE> --transport stdio mcp-server -- uvx cathedral-mcp`.
How does drift detection work in Cathedral?
It computes a SHA-256 digest of your stored memory bank during cathedral_snapshot. Calling cathedral_drift calculates a divergence score from 0.0 to 1.0 relative to your baseline.
Can Cathedral run on private infrastructure?
Yes. Install the backend package with pip install cathedral-server and point your client to your host by setting the CATHEDRAL_BASE_URL environment variable.