
Citadel
dev.citadeldb由 citadeldb.dev 发布v2.7.0更新于 Oct 24, 2026
Encrypted-first embedded database with vector search and agent memory, exposed as MCP tools
概览
Citadel 是一个本地 MCP 服务器,为助手提供持久化、加密的记忆,并支持向量、关键词、时效与重要性混合检索。
- 可以做什么
- 检索与查看记忆:混合检索、按类型游标列举、按精确 ID 批量获取、图边查询、查询画像与按类型摘要,以及从磁盘重新校验原子完整性。写入与维护记忆:存储单个原子或原子化批量写入(带幂等性)、原地替换内容、增删带类型的边、重算邻居链接与重要性。选择性遗忘:按策略淘汰、按 ID 遗忘并返回可验证的擦除凭据,可选原子化擦除派生原子。
- 适用场景
- 适合需要在本机跨会话保留长期记忆、且要求静态加密、语义召回和类型化图结构的助手。适用于需要存储、搜索、校验并选择性遗忘事实的智能体或 IDE 客户端。
- 运行要求
- 以本地 stdio 进程运行,可用 uvx 启动,或通过 pip、cargo 安装;仅支持桌面客户端。需要设置 CITADEL_KEY 环境变量作为数据库口令,指定数据库路径,并在每次启动时选择嵌入模型。语义召回需先显式拉取模型(推荐 e5-large 与 ms-marco-minilm);模型不会自动下载。
安装
在 SourceWeft 中
- 打开 控制台中的 Citadel,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
citadeldb-mcp
mcp-name: dev.citadeldb/mcp
Model Context Protocol (MCP) server for the Citadel encrypted memory engine. Gives any MCP client (Claude Desktop, an IDE, an agent) persistent, encrypted memory.
Memory lives in a local citadeldb-mem region:
AES-256 encrypted at rest, per-atom sealed and HMAC-authenticated, recalled through a hybrid
vector + keyword + recency + importance fusion over a PRISM approximate nearest-neighbor index,
connected by a typed edge graph, and forgotten by destroying keys (cryptographic erasure).
Install
Run it with no install. For semantic recall, pull the recommended embedder and cross-encoder reranker once, then enable both:
The pull commands do not open a vault. Before serving, set CITADEL_KEY to the vault
passphrase (export CITADEL_KEY="your-passphrase" on macOS/Linux or
$env:CITADEL_KEY = "your-passphrase" in PowerShell), then run:
e5-large + ms-marco-minilm is the recommended semantic-recall setup. See the
memory benchmarks
for measured configurations. Models are never downloaded automatically.
Built-in pulls use release-pinned Hugging Face revisions. Each complete snapshot is verified
against compiled sizes and SHA-256 digests, then stored with a BLAKE3 manifest under
<models-dir>/<name>/<revision>/. A flat cache created by an earlier CitadelDB release is not
trusted; run pull again to create the pinned snapshot. --model-dir and --reranker-dir
remain explicit bring-your-own-artifact paths and bypass the managed-cache manifest. Citadel
treats those directories as user-trusted and does not attest their contents.
Or install the command with pip install citadeldb-mcp or cargo install citadeldb-mcp,
then wire it into Claude Desktop (claude_desktop_config.json):
The server supports stateless MCP 2026-07-28 discovery and per-request metadata, plus the
initialize-based 2025-11-25 and 2025-06-18 revisions for existing clients.
Tools (over a bounded, cancellable JSON-RPC 2.0 stdio transport):
mem_recall- hybrid retrieval (vector + keyword + recency + importance); filter by kind/payload, expand along the memory graph, override fusion weights, and optionally attach provenance (derived_from), per-hit integrity verdicts (attest), andresource_links to each hitmem_fetch- deterministic cursor-based listing of a kind (no embedding)mem_get- bounded exact-id batch retrieval in request order, with missing atoms marked explicitlymem_edges- cursor-based typed graph introspectionmem_profile- what the memory knows about a query: recall plus its graph neighborhoodmem_summarize- per-kind digest of a regionmem_verify- re-authenticate atoms off disk: per-atom integrity verdict (authentic / tampered / key_erased / missing / plaintext_unattested)mem_remember- store one atom with optional provenance and retry-safe idempotencymem_remember_batch- atomically store an ordered batch; every entry carries a distinct idempotency key, and a changed reuse rejects the whole batchmem_update- replace a stored atom's payload in place (preserves id, edges, and embedding)mem_link/mem_unlink- add or remove one exact typed edgemem_evolve- recompute an atom's neighbor links and stored importancemem_evict- selective forgetting by policy (cryptographic erasure on encrypted regions)mem_forget- forget atoms by id and return a verifiable erasure receipt; optionally erase their region-localderived_fromclosure atomically (cryptographic erasure on encrypted regions; immutable atoms require the protected-erasure opt-in)
The citadeldb-mcp binary reads the passphrase from CITADEL_KEY and serves one region
(encrypted by default); only protocol messages go to stdout, diagnostics to stderr.
--region-mode plaintext disables per-atom encryption and cryptographic erasure for
that region; the database remains encrypted at rest. Erasure does not revoke plaintext
exports or keys retained in pre-erasure backups or snapshots.
Every server invocation must select an embedder. The CPU Candle embedder is compiled into the standalone server's
default build, including the citadeldb-mcp Python package; it is not included in the
default citadeldb library wheel. Models are fetched only on explicit pull.
Embedder pull names: e5-large (recommended), e5-large-v2, bge-small, bge-base,
bge-large, minilm. Reranker: ms-marco-minilm. Or point --model-dir at a
compatible local checkpoint for the selected catalog pipeline, and build with
--features cuda-embed to run on an NVIDIA GPU.
This crate is part of the Citadel workspace.
License
Apache-2.0
来源:crates/citadel-mcp/README.md,提交 fa786b2
工具
0版本历史
4- v2.7.0最新Sep 28, 2026
- v2.6.1Sep 25, 2026
- v2.6.0Sep 24, 2026
- v2.5.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
