lean-memory
Embedded, local-first agent memory: one SQLite file per namespace, no server, no cloud.
Connector by Wuesteon · GitHub account verified by the MCP Registry
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/wuesteon-lean-memory
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 26, 2026.
- Tools
- 1 read · 5 write · 1 delete
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Tools by what they do 7
Read from the source code; the running server may list different tools.
Read 1 · Look things up without changing anything.
memory_maintenance_status
Write 5 · Create, change, send or run things.
memory_addmemory_maintenance_runmemory_review_decidememory_review_queuememory_search
Delete 1 · Delete, drop, revoke or wipe things.
memory_clear
Secrets and settings it asks for
Other settings (environment variables or headers).
LM_DATA_ROOT
Network hosts it talks to 5
github.com· found in codeglama.ai· found in codehuggingface.co· found in codeopenrouter.ai· found in coderaw.githubusercontent.com· found in code
Files it touches
~/.cache/huggingface/hub/models--fastino--gliner2-base-v1~/.lean_memory- Any path the agent passes to its tools
Tools (7)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
memory_addDistill durable facts from text and write them to a namespace's memory. The raw text is NOT stored verbatim: an extraction pass distills it into discrete facts, which are embedded and indexed for memory_search. Returns the new fact ids and how many prior facts they superseded. Additive only — nothing is overwritten or deleted; a contradiction supersedes the older fact and the full history is retained. Being the console's OBSERVING wrapper, every call also records an 'add' event (timing, fact ids, supersessions) in the console event log — that is what makes the write visible in the console UI.…
memory_clearcan change or delete dataDelete ALL memory for a namespace by removing its SQLite file. Irreversible. Use only when the namespace's entire history should be forgotten; there is no per-fact deletion. Idempotent — clearing a missing namespace succeeds as a no-op. Other namespaces are untouched. Refuses (returns an explanatory message, changing nothing) while a LIVE maintenance lease with a fresh heartbeat is held for the namespace (spec §7.3): a POSIX unlink cannot safely interrupt an in-flight maintenance run — the run's open handle would keep committing to the unlinked (ghost) inode, silently losing that work. So cl…
memory_maintenance_runRun one sleep-time maintenance pass over a namespace (§6.3). DRY-RUN by default (apply=False): computes the would-do report with ZERO writes — no ledger row, no proposals. apply=True runs the provably-safe auto band and stages judgment-call proposals for human review. Symmetric with the CLI. NOTE: the LM_MAINT_AUTO auto-spawn path runs `--apply --auto-only` (auto band only, no proposals) — only interactive apply=True grows the review queue. Returns the run summary. Use it when memory_maintenance_status says a pass is due: run it first with apply=False to see what it would do, then with apply…
memory_maintenance_statusread-onlyReport the namespace's maintenance ledger — runs + pending proposals (§6.3). A pure model-free ledger read, shaped identically to the core server's status tool ({namespace, runs, pending_proposals, last_run}). It never writes and never builds the embedder/reranker, so asking "when did maintenance last run?" stays cheap. Use it to see whether maintenance is due (then memory_maintenance_run) and how many proposals wait for a human (then memory_review_queue). It is the cheapest of the maintenance tools — prefer it for polling.
memory_review_decideDecide a maintenance proposal: approve | reject | edit | promote (§6.3). approve applies at decide-time with apply-time re-validation; reject leaves the spine byte-identical; edit (summarize only) approves the human-edited text; promote (evict only) rejects the eviction and lifts the fact to the hot tier. Never destructive — the spine is ADD-only, so an approval supersedes rather than erases. Use it once per proposal listed by memory_review_queue, and ONLY for a verdict the user stated explicitly: silence is not consent, and unreviewed proposals expire on their own.
memory_review_queueList pending maintenance proposals, grouped by entity, with evidence (§6.3). `kind` filters to 'dedup_near' | 'summarize' | 'evict'. Each proposal includes its parsed evidence payload — the before/after texts, cosine for near-dups, source facts for summaries, value signals for evictions — so the reviewer sees exactly what would change. NOT fully read-only: overdue proposals lazily expire (are marked expired) as a side effect of listing. Use it after memory_maintenance_run(apply=True) staged proposals, or whenever memory_maintenance_status reports pending ones. Show the evidence to the user a…
memory_searchRetrieve the facts most relevant to a query from a namespace's memory. It never adds, supersedes or deletes a FACT — but it is NOT read-only: being the console's observing wrapper, every call appends a 'search' event (query, k, hits, timing) to the console event log, and searching a namespace that does not exist yet creates its empty store file as a side effect (and returns no hits). Stored memory itself is unchanged. Always latest-only — superseded facts are never returned (the latest_only flag is REST-only, §6). Returns up to k hits, each with its fact text and final score, most relevant fi…
Signals
- Stars
- 43
- Forks
- 40
- Open issues
- 2
- Contributors
- 1
- Weekly downloads
- 41
- Last commit
- Aug 7, 2026 (2 months ago)
- Last release
- Aug 7, 2026 (2 months ago)
- Last package publish
- Aug 7, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026) and the package registry.
Details
- Registry name
io.github.Wuesteon/lean-memory- Version
- 0.3.0
- Auth
- No auth
- Packages
- pypi lean-memory
- License
- Apache-2.0
- Repository
- github.com/Wuesteon/lean-memory
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
Cite this page
lean-memory MCP server. Agent Mart. https://agentmart.dev/connectors/wuesteon-lean-memory (last updated 2026-10-24)