
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 分
