
MemVault - Local-First Agent Memory
io.github.dreamor由 GitHub 账号 dreamor 发布v0.7.0更新于 Nov 7, 2026
Local-first memory for AI agents: save, recall, dedupe, and share across MCP clients.
发布方自己的服务:Memory.fit
概览
自托管的本地优先记忆库,让任何支持 MCP 的助手跨会话、跨代理保存、检索、去重并共享持久记忆。
- 可以做什么
- 保存、抽取并导入记忆、技能以及其它代理的记忆文件,可设优先级、类型与过期时间
- 以混合、关键词或语义方式检索记忆,并支持按时间点与事件时间窗口查询
- 记录任务结果与经验教训,并运行去重、衰减、归档与提升流程
- 提议、审核、批准、驳回、软删除或永久清除记忆,并提供待审核收件箱
- 在会话开始时注入感知代理的上下文,并报告注入记忆的遵循率与有效性
- 追踪记忆背后的证据链,并提供用户画像与项目上下文资源
- 适用场景
- 适合同时使用一个或多个支持 MCP 的代理,希望偏好、项目约定和过往决策跨会话保留、不必反复重述的场景。也适合需要在混合代理环境中保持一致上下文,或希望使用私有自托管记忆层而非托管服务的团队。
- 运行要求
- 以本地进程运行(stdio,或在端口上提供 SSE/HTTP),使用本地数据库文件。可通过安装脚本、Homebrew、Docker 镜像或 cargo 安装;预编译 Linux 二进制需 glibc 2.39 及以上,源码构建需 GCC 13 级工具链。可选的 Ollama 或 OpenAI 兼容服务通过 MEMVAULT_* 环境变量或本地 env 文件配置;默认原生嵌入模型首次启动时会从 HuggingFace 下载权重。
安装
在 SourceWeft 中
- 打开 控制台中的 MemVault - Local-First Agent Memory,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
MemVault
The Shared Memory Layer for Every AI Agent You Run
Not "agent learns to search memory" — memory finds the agent.
MCP Native · Hybrid Retrieval · Auto-Injection · Zero-Config Sync
Open Source · Self-Hosted · Private · MIT Licensed
[Crates.io] [GitHub Release] [CI] [License: MIT] [Rust] [MCP] [Glama] [Status]
English · 简体中文
If MemVault solves a real problem for you, a star helps others find it.
Every AI agent session starts from scratch. Claude Desktop doesn't know what Cursor just learned. DeepSeek Harness (dsh) doesn't know what you told Claude Code yesterday. Whatever agent you're running — international or domestic, IDE plugin or CLI harness — it forgets your preferences every time you start a new conversation.
You've been manually repeating context — project conventions, personal preferences, past decisions — across agents that should already know. This isn't a limitation of the models. It's a missing infrastructure layer.
MemVault is that layer. A lightweight, self-hosted memory router that sits between your agents and their context. It speaks plain MCP — no MemVault-specific SDK, no per-agent API integration. Any MCP-compatible agent, from any vendor, automatically shares the same persistent memory the moment it connects.
Who it's for:
- Anyone running an MCP-capable agent — Claude Code, Claude Desktop, Cursor, Cline, Continue, DeepSeek Harness (dsh), or any other MCP client, domestic or international — who wants preferences, project context, and past decisions to persist across sessions without repeating yourself
- Multi-agent power users running several of the above side by side, on different models, from different vendors — all sharing the same memory without configuration
- Platform teams deploying AI-assisted workflows where consistency matters across a mixed agent fleet: code review conventions, architecture decisions, project-specific preferences
- Anyone tired of telling their AI the same thing twice — MemVault works the way your brain should: you say it once, it's there when you need it, no matter which agent is asking
Quick Start · How It Works · What MemVault Gives You · Why MemVault · MCP Server · CLI Reference · Integrations · Architecture · Project Status · Testing · Documentation · Contributing · License
Quick Start
Don't install MemVault by hand — paste this one prompt into Claude Code, Codex, Cursor, dsh, or any other MCP-capable agent. It points the agent at a machine-readable install guide, so the agent does the whole setup itself:
Or install manually:
System requirements:
- Prebuilt Linux binaries (install script / GitHub release): glibc ≥ 2.39 + GLIBCXX_3.4.31 (GCC 13-era runtime — Ubuntu 24.04+ / Fedora 40+ / Arch). Release builds are pinned to Ubuntu 24.04 runners, and the release workflow gates the highest glibc/GLIBCXX symbol version every binary may require plus a startup smoke test, so this floor cannot silently drift upward (0.6.9 shipped x86_64 binaries requiring glibc 2.43 that way). TLS is rustls, so no OpenSSL dependency. Ubuntu 22.04 / RHEL or EL8/EL9 users: use the Docker image (
dreamor/memvault) or build from source.- Building from source (
cargo install/cargo build): links fastembed's prebuilt ONNX Runtime static library and needs a GCC 13-class toolchain. Older toolchains (e.g. GCC 8, CentOS 7/8-era libstdc++) fail at link time with missing C++20/23 stdlib symbols (std::format,std::to_chars). macOS / Windows (MSVC) / Homebrew / Docker are unaffected.
Verify your install in 5 seconds:
Local Ollama Demo (Zero Cost, Stays on Your Machine)
MemVault is plug-and-play with a local Ollama: unconfigured LLM extraction (full-text understanding / failure reflection / relation extraction) auto-detects a local Ollama; embeddings use the local model with the ollama or auto provider.
With no configuration at all (neither env vars nor ~/.memvault/.env), LLM extraction auto-detects a local Ollama and enables itself (default model qwen2.5:7b; pull it in advance with ollama pull qwen2.5:7b, or point MEMVAULT_LLM_EXTRACTION_MODEL at an installed model). Embeddings still default to the in-process native embedder; set MEMVAULT_EMBEDDING_PROVIDER=auto in ~/.memvault/.env to prefer Ollama and fall back to native when it isn't running. The native model's first launch downloads the weights from HuggingFace silently in the background — the server/dashboard come up immediately and hot-swap to semantic search once the download finishes, so a fresh install never blocks on it (set MEMVAULT_EMBEDDING_PROVIDER=none to run pure keyword and skip the download).
How It Works
MemVault is a pipeline, not a single script. Every stage below is a shipping module:
- Storage: SQLite with bundled FTS5 (full-text search); embeddings stored int8-quantized (~1/4 the size of f32 at near-identical ranking quality, legacy f32 rows still readable)
- Retrieval: BM25 keyword search over FTS5 with CJK bigram tokenization (Chinese two-character words match correctly) and tiered match fallback (strict → relaxed unigram → synonym OR; relaxations are reported, never silent), local-first embedding (in-process native by default — switch to local Ollama or any OpenAI-compatible model), RRF fusion with per-result recall provenance (
kw#2/vec#5), synonym expansion, relevance scoring, soft intent filtering - Pipeline: Automatic entity extraction, delta-write on save (near-duplicates skipped, similar memories absorb only the residual), semantic deduplication, time-based decay, archive of stale memories
- Sync: Zero-invasion file generation —
memvault-cli syncproduces CLAUDE.md, AGENTS.md, etc. directly from database contents
What MemVault Gives You
- Auto-Injected Context: Session start automatically pulls relevant memory by agent identity — MUST-level rules land as instructions, not just chat history
- Hybrid Retrieval: BM25 + vector + RRF fusion with synonym expansion, relevance scoring, and per-result provenance (which path recalled each memory, at what rank) — available via CLI, MCP tool, and REST API
- Explainable Injection: every candidate dropped on the way into an agent's context is recorded with a reason (budget, caps, intent/type penalties) — "why didn't the agent get this memory?" always has an answer
- Degrade Before Dropping: when the token budget runs out, a memory is shortened — excerpt, then summary — rather than cut, so more of the ranked list stays reachable at a lower per-memory cost. Shortened text always carries a
[…]marker and the level is reported separately from the dropped list, because an abbreviation that looks complete is worse than a drop. MUST is never shortened: a binding rule with its qualifying clause summarised away is worse than one that overflowed - MUST Enforcement: MUST-priority memories are never filtered or truncated. Always in context, always obeyed — trust comes from provenance (human-authored/reviewed), with an opt-in fallback for memories independently corroborated by multiple identity-verified agents (
MEMVAULT_CORROBORATION_GATE), so a single spoofed/compromised agent can't unilaterally inject a binding MUST - Multi-Agent Awareness: Agent Registry with type/tag-based soft filtering (score demotion, not hard exclusion)
agent_idIs Provenance, Not a Filter: retrieval never filters byagent_id— the field only records which agent wrote a memory (source_agent). Every agent searches the same shared corpus; per-agent differences apply only at injection time (type/tag soft scoring viaagents.yamlinject_rules)- MCP Proxy: Transparent proxy that injects memory into ANY upstream MCP server's responses — zero client changes
- Compliance Tracking:
inject_session_idtraces what was injected and measures follow-through rate - Cross-Platform: CLI + MCP Server (stdio & SSE) + Web Dashboard (browser) + Obsidian Plugin
- Zero-Invasion Sync: Generate AGENTS.md / CLAUDE.md from memory — no per-agent config files to edit. Applies the same exclusions as session injection (unreviewed drafts behind the review gate, superseded facts, pending edit proposals, expired memories) and reports how many it held back and why, so "why isn't this rule in my AGENTS.md" has an answer
- Contextual Extraction, Local-First: Rule-based keyword extraction by default; optionally understands a full user+assistant exchange via an LLM, auto-detecting a local Ollama for free before ever touching a remote API
- History & Rollback: Every update/delete is snapshotted into
memory_history—memvault-cli checkpoints+memvault-cli restoreroll one memory back without touching the rest - Time Travel (
as_of): ask what MemVault believed at any past instant —memvault-cli as-of <id> --at 2026-08-01T00:00:00Z,list --as-of,search --as-of,search_memory,POST /api/search. Reconstructed from the same snapshot chain that powers rollback, so it needed no new version schema. Memories deleted or superseded after that instant still come back, because they were the current truth then. Search also recalls from a historical full-text index, so a memory reworded sinceas_ofis still found by the words it had — those hits are taggedhist-kw#Nto keep "matched today" distinct from "matched then". Each answer says where it came from (live row vs. a named history snapshot), so a far-back result is never mistaken for a current one - Two Time Axes, Never Folded:
as_ofasks what did MemVault believe in March;--occurred-from/--occurred-toask what happened in March. A memory can be true for both answers at once, so they are separate parameters rather than onesince/untilrange — folding them is what makes one of the two questions permanently unanswerable. Undated memories never match an event-time window, and the CLI says so whenever the flag is used rather than only when the result comes back empty - Self-Expiring Facts (
expires_at): a temporary fact ("the deploy freeze runs until Friday") retires itself instead of decaying slowly and being re-injected as stale truth.save --expires-at <RFC3339>or--ttl 7d. Past the bound it leaves retrieval and injection but stays inspectable and restorable — expiry retires a fact, onlyforgeterases one. Honored even for MUST: an explicit bound is not the inferred disuse signal thatmust_exemptprotects against - Self-Diagnostics:
memvault-cli statusreports exactly which features are degraded when no embedding provider is configured, plus a schema fingerprint (migration version + checksum) for cross-database comparison - Episodic Memory:
record_outcomerecords task results; failures are distilled into lessons and auto-injected next time (REFERENCE → MUST only with human approval), so the same trap isn't hit twice - Procedural Skill Activation: skills whose
triggermatches intent are injected as structured[SKILL]blocks with success-rate stats (shown after ≥3 runs); failures flag the skill for revision (version++on human edit), repeated successes auto-draft new skills into the review inbox - Semantic Knowledge Links: lightweight relation triples, repeated facts consolidated into a linked semantic fact with provenance, and superseded facts archived (never re-injected, still listable & restorable)
- Team Shared Pool & SOP Import: memories marked
sharedare injected into every session (capped at 20); Markdown SOPs can be batch-imported as verifiable skills - Delta-Write on Save: every save is checked against its namespace first — near-duplicates are skipped, similar memories absorb only the residual (what's genuinely new) and get their strength refreshed, so the library converges instead of accumulating near-copies;
--force/force_insertbypasses - Task-Level Evaluation:
memvault-cli benchsamples your own failure history (episodes that distilled a lesson) and measures lesson retrieval/injection rates — and with--judge, an LLM scores "plan without vs. with memory" against the known failure cause, so you see task-success lift, not just retrieval recall - Two-Phase Injection (never blocks): MUST rules resolve deterministically with zero embedding calls and are served immediately; the semantic pipeline prefetches in the background and lands within a short window (250ms) — if it doesn't, the deterministic baseline is served and the request moves on (two-phase design)
- Conversation-N-Gram Retrieval: retrieval keys are conditioned on the recent turn window, weighted by recency so the current focus dominates — not a single flat query
- Single Canonical Injection Channel: per-agent
inject_channel(mcp/proxy/syncinagents.yaml) restricts automatic injection to one delivery path, so the same memory is never sent to the same agent twice - Data You Own: Single SQLite file. Full export/import. No cloud dependency. Your data, your machine.
- The Index Is Disposable, the Memory Is Not: every derived structure in MemVault can be thrown away and rebuilt, so a corrupt or stale index is never a data-loss event.
- markdown backend — the
.mdfiles are the memory;.memvault-cache.dbis a shadow index derived from them. Delete the cache and the next open rebuilds it from the vault. Edit a file by hand in Obsidian, in an editor, or viagit checkout, andmemvault-cli reindex(or--watch) reconciles it — content is diffed against the cached row and resynced on any mismatch. Your memories are plain text you cangrep,git blame, and take to any other tool. - sqlite backend —
data.dbis the source of truth, and the derived parts inside it still self-heal: the FTS index is rebuilt automatically on open whenever its row count disagrees withmemories, and the embedding column can be dropped and backfilled (switch embedding models, or run with no provider configured and add vectors later). - What is never derived: your content, your review state, your provenance, and the
memory_historysnapshot chain that powers rollback andas_oftime travel. Note the one asymmetry — history snapshots live in the cache, so on the markdown backend a rebuilt cache loses the version chain and point-in-time reads fall back to the live row (docs/DESIGN.md§9.6). Expiry and everything else survive a rebuild intact.
- markdown backend — the
Why MemVault
Storing and retrieving memories is solved — a dozen products do it well, and since 2025 the Code Agents do it natively. What is not solved is the part after retrieval: getting one shared corpus into every agent you run, deciding what entitles a memory to bind that agent, and knowing whether it obeyed.
The claims below come from a 15-product survey refreshed 2026-11
(docs/DESIGN.md §2). They
are falsifiable — the table there names every product and every source.
What only MemVault does
What MemVault does differently
On that latency comparison, honestly. The two numbers are not measured the same way and should not be read as a like-for-like win. Mem0's published p50 covers its whole retrieval pipeline; ours is the
/api/sessioninjection call alone, from a 20-probe plumbing run against a local debug build with no embedding provider configured. The defensible claim is narrower and still worth making: MUST resolution does not touch an embedding model at all, so its latency does not depend on one being installed, warm, or reachable — that is §17.3's two-phase design, and it is whyedge-litecan turn embeddings off without losing MUST injection. A comparable end-to-end number needs the BEAM scored run, which has not happened.
Platform-native memory is the real competition now, and it is good — zero infrastructure, zero configuration. Its structural ceiling is that each platform only loads its own silo: Claude Code's memory directory is invisible to Cursor, and Codex's memories do not leave Codex. If you run more than one agent, that is the gap.
Where MemVault is behind
Stated plainly, because a comparison that only lists wins is not a comparison:
Everything in that table is tracked in §16 with either a plan or a reason it is not being done.
MemVault complements your existing agent setup rather than replacing it. Keep your LLM, your IDE, and your workflow exactly as they are. MemVault adds the memory layer underneath — and the part that checks whether it was used.
MCP Server
Tier-1 agents (Claude Code, OpenCode, dsh, Gemini CLI, Codex) have one-command plugin installs — see Installing into your agents first. Everything below is the universal fallback for any other MCP client.
stdio (any standard MCP client)
MemVault speaks plain MCP stdio — the same mcpServers JSON works verbatim in Claude Desktop, Cursor, Cline, Continue, and any other client that reads this format:
A couple of clients use their own one-liner instead of hand-editing JSON:
DeepSeek Harness (dsh) — a domestic (China) agent harness — gets deeper treatment than a generic stdio config: a native Cordis plugin (dsh-plugin/) that auto-injects memory into the system prompt and auto-extracts at turn end, with no per-turn cooperation required from the agent. See docs/INSTALL.md §2.5 for both the zero-code MCP route and the deep-integration plugin.
Other MCP-compatible agents — international or domestic, IDE plugin or CLI harness — should work the same way: any client implementing standard MCP stdio/SSE can connect without MemVault-side changes. The ones above are the ones we've actually verified; if you get MemVault working with another one, a PR to this list is welcome.
SSE (multi-client, network-accessible)
SSE features: multi-client simultaneous connections, auto-triggered embedding backfill on initialization, HTTP remote access.
Note:
--transport sseonly mounts the MCP-over-HTTP endpoint (/mcp) — it does not expose the REST API (/api/*). The Web Dashboard is served by the REST backend (memvault-mcp --transport http --serve-web <dist>), and the Obsidian plugin also uses the REST API and requires--transport httpinstead. See docs/INSTALL.md §2.6.
21 MCP Tools
2 MCP Resources
Configuration (.env file & environment variables)
Copy .env.example to ~/.memvault/.env and uncomment what you need — it is also the single source of truth documenting every key.
Precedence (high → low): CLI flags > process environment > ~/.memvault/.env > MEMVAULT_PROFILE scenario profile > built-in defaults. Every binary loads the env file first thing at startup; --env-file <path> or MEMVAULT_ENV_FILE points elsewhere, and a missing file is silently skipped. memvault-cli status prints where each setting came from (env / file / profile / default).
Don't want to read fourteen switches? memvault-cli init --profile <name> writes a coherent bundle instead — coding-agent, assistant, team, edge-lite — with each line commented by its rationale (init --list shows them all, --dry-run previews). A profile is the lowest-precedence layer: it fills only keys your shell and env file leave unset, so leaving one configured permanently can never silently undo your own tuning. It writes no secrets, only provider names. See .env.example for what each profile sets and why.
Two groups are intentionally not in the table below: the host installation contract (MEMVAULT_AGENT_ID, MEMVAULT_HOOK_EXTRACT, … — per-agent values authored in each host's plugin/mcpServers config), and the proxy's upstreams topology (structured data, lives in ~/.memvault/proxy.yaml).
CLI Reference
save · outcome · search · list · review · delete · session-start · compliance-enqueue · compliance-finalize · resource · extract · dedup · decay · forget · forget-log · doctor · promote · backup · export · export-skill · import · import-skills · import-agent · ingest · confirm-read · backfill-embeddings · sync · reindex · migrate-to-markdown · checkpoints · restore · supersede · status · bench · eval-history · server start|status|stop · dashboard
Key Commands
Integrations
Installing into your agents
MemVault ships native adapters for most agents — one shared store, per-host identity via MEMVAULT_AGENT_ID, four tiers (Tier 1/2/3 details below; per-client registration snippets in integrations/mcp-clients/).
Core packages & versions:
Shipped plugins & versions — each bumps on its own schedule:
Tier 1 — one-command native plugins (memory injected by hooks; extraction opt-in where the host exposes lifecycle hooks):
⚠️ = the host has no injection hooks; recall is rule-driven (the agent calls session_start once) with the bundled canonical rule text.
Tier 2 — paste an MCP snippet. Strict-JSON registrations with per-host identities in integrations/mcp-clients/ (target paths in its README): Cursor · Windsurf · Cline/Roo · Continue · Zed · JetBrains AI/Junie · VS Code (Copilot Chat) · Claude Desktop.
Tier 3 — native manifests. Qoder (.qoder/rules/ + .qoder-plugin/ + a UserPromptSubmit hook template), Grok Build (grok plugin install dreamor/memvault --trust), the Hermes Python plugin (integrations/hermes/, pre_llm_call recall + extraction helper) and the pi extension (pi-extension/, declared by the root package.json pi manifest; pi install git:github.com/dreamor/memvault) ship in-repo; OpenClaw and Swival consume the generated root skills/ (also exported to .openclaw/skills/); Devin stays a manual recipe in integrations/README.md.
Tier 4 — instruction-only rule copies. Canonical text + scripts/gen-rule-copies.sh (parity-checked in CI) produce AGENTS.md/CLAUDE.md blocks, .cursor/rules/, .clinerules/, .kiro/steering/, Junie guidelines; memvault-cli sync --watch keeps them fresh from the store.
Any other MCP-speaking client (domestic or international, IDE plugin or CLI harness) connects with zero MemVault-side changes via the standard stdio config below — not individually verified; PRs adding a verified entry are welcome.
GUI surfaces are independent of agent installs: Web Dashboard (9 tabs) · Obsidian plugin (α — Vault sync + browse/capture) · MCP Proxy (transparent memory injection for any upstream server).
Architecture
Project Status
MemVault is in beta. The Rust core (storage / search / injection) is CI-gated and stable; plugin adapters and GUI surfaces evolve faster. All configuration is environment-driven (see .env.example), and every change is recorded in CHANGELOG.md.
Testing
The unit and integration suites are the primary gate, but e2e-release-check.sh
exists because several defects were visible only by running the built binaries
end to end — an edit that approved cleanly and changed no behaviour, a second
injection channel that bypassed the review gate, a provenance field dropped by the
reranker. All of them lived in the wiring between layers, where every layer's own
tests passed. It needs no LLM key and no embedding provider, so it is safe to gate
a release on, and CI runs it on every push.
Documentation
Contributing
- 🐛 Bugs: Issue Tracker
- 💡 Ideas: Feature Request
- 📖 Guide: CONTRIBUTING.md
- 🔒 Security: SECURITY.md
- ♿ Accessibility: ACCESSIBILITY.md
License
MemVault is released under the MIT License.
来源:README.md,提交 6997c12
工具
0版本历史
11- v0.7.0最新Nov 7, 2026
- v0.6.12Nov 4, 2026
- v0.6.11Oct 30, 2026
- v0.6.10Oct 29, 2026
- v0.6.4Oct 25, 2026
- v0.6.3Oct 22, 2026
- v0.6.1Oct 21, 2026
- v0.6.0Oct 20, 2026
- v0.5.0Oct 16, 2026
- v0.4.3Oct 15, 2026
- v0.3.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Memory 集成

Memory.fit
fit.memory官方发布者
托管式 Memory.fit 服务器,让 AI 读取你的训练、睡眠、恢复与饮食数据,并写回每周计划、每日目标和饮食计划。
pg.ddx.io: the PostgreSQL community's memory
io.ddx.pg官方发布者
pg.ddx.io: the PostgreSQL community's memory 的托管 MCP 服务,由 pg.ddx.io 发布;无需登录;Streamable HTTP;29 个工具。
var.gg Naming Memory
gg.var官方发布者
远程 MCP 服务器,可根据领域概念推荐并检索韩、日、中、越、英多语言的代码标识符名称,并提供 ERD 结构查询。

Counterparts
ai.counterparts
面向 Claude Code 与 Claude Desktop 的本地优先长期记忆:助手自行写下关于你和项目的笔记,并在之后的会话中回忆起来。

LAHZE - Persian AI Memory Platform
由 GitHub 账号 pedramgholizadeh 发布
以波斯语为先的地理记忆平台:发现地点,起草并发布仅限波斯语的记忆。AI 翻译