Citadel
Local encrypted memory for agents with hybrid recall and key-destroying erasure
- Pricing
- Open source
- Platforms
- CLI, macOS, Windows
- Runs
- Locally
- Version
- 2.7.0
- Listing updated
- 1 day ago
About Citadel
Citadel is an open-source MCP server for knowledge and memory. It runs locally on your machine and is started by your AI client.
Memory is stored in a local, encrypted Citadel region on your own machine. Recall blends vector search, keyword matching, recency and importance over a PRISM nearest-neighbour index, and memories are linked by a typed edge graph. Forgetting works by destroying keys rather than overwriting data, which the project calls cryptographic erasure, and the engine can issue erasure receipts.
Setup needs a passphrase in the CITADEL_KEY environment variable. For semantic recall the README recommends pulling the e5-large embedder and ms-marco-minilm reranker once with uvx; models are never downloaded automatically and pulls are checked against pinned revisions and SHA-256 digests. The server speaks stdio JSON-RPC and supports several MCP protocol revisions.
Behind it is an embedded database with SQL, key-value access, JSON and vector columns, ACID transactions with shadow paging, and encrypted peer-to-peer sync. The site reports historical scores of 87.2% on LoCoMo and 86.2% on LongMemEval-S, and lists 15 MCP tools. A desktop client, Citadel Studio, can open and inspect vaults.
Install
Run in a terminal
claude mcp add mcp --env CITADEL_KEY='<CITADEL_KEY>' -- uvx citadeldb-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"mcp": {
"command": "uvx",
"args": [
"citadeldb-mcp"
],
"env": {
"CITADEL_KEY": "<CITADEL_KEY>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp": {
"command": "uvx",
"args": [
"citadeldb-mcp"
],
"env": {
"CITADEL_KEY": "<CITADEL_KEY>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"citadeldb-mcp"
],
"env": {
"CITADEL_KEY": "<CITADEL_KEY>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp": {
"command": "uvx",
"args": [
"citadeldb-mcp"
],
"env": {
"CITADEL_KEY": "<CITADEL_KEY>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp": {
"command": "uvx",
"args": [
"citadeldb-mcp"
],
"env": {
"CITADEL_KEY": "<CITADEL_KEY>"
}
}
}
}Configuration
CITADEL_KEYPassphrase used to unlock the encrypted Citadel databaseRequired
Tools this server provides (14)
Taken from the project documentation; the running server may differ.
- mem_recall
- Hybrid retrieval over memory with filters and graph expansion.
- mem_fetch
- Cursor-based listing of a kind.
- mem_get
- Exact-id batch retrieval.
- mem_edges
- Introspect typed graph edges.
- mem_profile
- Recall plus graph neighbourhood for a query.
- mem_summarize
- Per-kind digest of a region.
- mem_verify
- Re-authenticate atoms and return integrity verdicts.
- mem_remember
- Store one atom.
- mem_remember_batch
- Atomically store an ordered batch.
- mem_update
- Replace an atom's payload in place.
- mem_link
- Add a typed edge.
- mem_unlink
- Remove a typed edge.
- mem_evolve
- Recompute an atom's neighbour links and importance.
- mem_evict
- Selective forgetting by policy.
What it does
- Encrypted memory
- Memory is AES-256 encrypted at rest and each atom is sealed and authenticated.
- Hybrid recall
- Combines vector, keyword, recency and importance scores.
- Memory graph
- Typed edges link atoms and can be expanded during recall.
- Cryptographic forgetting
- Destroys keys to erase an atom or region.
- Integrity checks
- mem_verify reports whether atoms are authentic, tampered or erased.
- Local-first
- No API keys; data stays on your machine.
Good for
- Give a desktop assistant private long-term memory
- Erase a memory with a verifiable receipt
- Link and summarise what an agent knows about a topic
- Keep project knowledge encrypted on disk
- Store notes with idempotent writes
Pricing
Open source
Open source; no API keys needed
Prices change. Check citadeldb.dev before you buy.
Citadel FAQ
Does it need API keys?
No; set the CITADEL_KEY passphrase and run it locally.
How does forgetting work?
By destroying the keys for an atom or region, not overwriting it.
Are embedding models downloaded automatically?
No, you pull them explicitly and they are verified against pinned digests.
How do I install it?
Run uvx citadeldb-mcp, or install with pip or cargo.
Is Citadel free?
Yes. Citadel is open source, so you can use and self-host it for free.
How do I add Citadel to Claude Code?
Run this command in your terminal: claude mcp add mcp --env CITADEL_KEY='<CITADEL_KEY>' -- uvx citadeldb-mcp
What are the best alternatives to Citadel?
The closest alternatives to Citadel are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and Midplane.
Alternatives to Citadel

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Claude Code Ultimate Guide
MCP serverMCP server for searching the Claude Code Ultimate Guide from any MCP client
Runs locally- Open source
- 6.5K GitHub stars
- AI models and LLM tooling

Nautilus Compass Memory
MCP serverLocal-first long-term memory layer for AI agents, served over MCP
Not checked yet- 5 tools
- Remote
- Open source
- 1.3K GitHub stars
- Knowledge and memory

Midplane
MCP serverPostgres gateway for AI agents with table grants, column masking and approval for writes
Runs locally- Open source
- 5 GitHub stars
- Databases

note1
MCP serverMCP server giving AI assistants search and summaries across your note1 meetings
- 4 tools
- Remote
- Free trial
- 1 GitHub star
- Productivity