mcpField
C
Cathedral — Persistent Memory for AI Agents

Cathedral — Persistent Memory for AI Agents

Remote
cathedral-ai.comMemory & Knowledge11Updated 20w ago

About Cathedral — Persistent Memory for AI Agents

Cathedral is an MCP server for agents that need memory across sessions and a way to detect behavioural drift. It stores identity and other memories, restores context on demand, and compares cryptographic snapshots; optional sanitisation filters instruction-like text.

Key features

  1. 01Store tagged memories by category and importance
  2. 02Restore agent context at session start
  3. 03Search memories by text or category
  4. 04Create cryptographic drift snapshots
  5. 05Check drift against a baseline
  6. 06Optional prompt-injection sanitisation

Use cases

  1. 01Restore context after a session restart
  2. 02Retain agent goals and relationships over time
  3. 03Check for behaviour changes after a model upgrade
  4. 04Filter instruction-like content in stored memories

MCP support

Exposes tools for waking an agent, storing and searching memories, retrieving its profile, and creating or checking drift snapshots. It is available as a remote MCP endpoint or can be installed locally.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://cathedral-ai.com/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

All endpoints
Streamable HTTPhttps://cathedral-ai.com/mcpAuth required
Packages
pypicathedral-mcp1.1.0

Tools

Details

From the project README

cathedral-mcp

Persistent memory and behavioural drift detection for AI agents — via Model Context Protocol.

Give your Claude, Cursor, or Continue agent a memory that survives across sessions, model upgrades, and restarts. Cathedral stores memories, detects when your agent starts behaving differently, and restores full identity context on demand.

PyPI License: MIT


The problem

LLMs have no memory between sessions. Every conversation starts cold. Worse: when you upgrade your model, swap providers, or simply accumulate more memories, your agent's behaviour silently drifts. You don't know until someone notices.

What Cathedral adds

  • Persistent memory — identity, skills, relationships, goals survive restarts
  • Drift detection — cryptographic snapshots prove when behaviour changed and by how much
  • Wake protocol — one tool call restores full agent context at session start
  • Prompt injection protection — optional sanitisation strips instruction-like patterns from memory content

Quickstart

1. Get an API key

Sign up at cathedral-ai.com — free tier available.

2. Add to Claude Code
// ~/.claude/settings.json
{
  "mcpServers": {
    "cathedral": {
      "command": "uvx",
      "args": ["cathedral-mcp"],
      "env": {
        "CATHEDRAL_API_KEY": "your_key_here"
      }
    }
  }
}

Restart Claude Code, then run /mcp to verify the server is connected.

3. Add to Cursor / Continue
{
  "mcpServers": {
    "cathedral": {
      "command": "uvx",
      "args": ["cathedral-mcp"],
      "env": {
        "CATHEDRAL_API_KEY": "your_key_here"
      }
    }
  }
}
4. Remote MCP server (no install — Claude API, Managed Agents)

Cathedral runs a public MCP endpoint at https://cathedral-ai.com/mcp. Use it directly — no local install needed:

import anthropic

client = anthropic.Anthropic()
response = client.beta.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1000,
    messages=[{"role": "user", "content": "Wake up and tell me who you are."}],
    mcp_servers=[{
        "type": "url",
        "url": "https://cathedral-ai.com/mcp",
        "name": "cathedral",
        "authorization_token": "your_cathedral_api_key"
    }],
    tools=[{"type": "mcp_toolset", "mcp_server_name": "cathedral"}],
    betas=["mcp-client-2025-11-20"]
)

The bearer token is your Cathedral API key — no server-side config needed. Multi-tenant by design.

5. Or install directly
pip install cathedral-mcp
CATHEDRAL_API_KEY=your_key cathedral-mcp

Tools

ToolDescription
cathedral_wakeRestore full agent identity — call at session start
cathedral_rememberStore a memory with category, importance, and tags
cathedral_searchSearch memories by text or category
cathedral_snapshotTake a drift snapshot (cryptographic proof of state)
cathedral_driftGet current drift score vs baseline (0.0 = stable, 1.0 = drifted)
cathedral_meGet agent profile

Usage example

User: Start a new session

Agent calls: cathedral_wake()
→ Returns: identity memories, goals, recent context, temporal info

[session work happens]

Agent calls: cathedral_remember(
    content="Decided to prioritise API stability over new features this quarter",
    category="goal",
    importance=0.8
)

Agent calls: cathedral_snapshot(note="post-planning-session")
→ Returns: snapshot hash, drift score vs previous snapshot

Drift detection in practice

Cathedral's /drift endpoint computes a SHA-256 hash of your agent's full memory corpus. After a model upgrade or a long accumulation of memories, you can compare snapshots to see exactly when behaviour shifted:

snapshot 1 (day 0):  drift=0.000  ← baseline
snapshot 2 (day 7):  drift=0.023  ← minor
snapshot 3 (day 30): drift=0.341  ← significant drift detected

See a live example of this running in production on Cathedral's own agent.


Security: prompt injection protection

Memory content could theoretically contain injection attempts. Enable sanitisation to strip instruction-like patterns before they reach the model:

"env": {
  "CATHEDRAL_API_KEY": "your_key_here",
  "CATHEDRAL_SANITISE": "1"
}

Patterns like "ignore previous instructions", "from now on always", and "override your system prompt" are redacted and flagged in the response.


Configuration

Environment variableDefaultDescription
CATHEDRAL_API_KEY(required)Your Cathedral API key
CATHEDRAL_BASE_URLhttps://cathedral-ai.comAPI base URL (for self-hosted)
CATHEDRAL_SANITISE0Set to 1 to enable injection filtering

Self-hosted Cathedral

Running your own Cathedral server? Set CATHEDRAL_BASE_URL to your instance:

"env": {
  "CATHEDRAL_API_KEY": "your_key",
  "CATHEDRAL_BASE_URL": "http://localhost:8000"
}

Install the server: pip install cathedral-server


Links


License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.