Memory that knows when a remembered fact has been replaced, not just when it was written.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
An embedded store for facts that change.
A fact your application remembers is not a document. It gets corrected β people move, change jobs, switch phone numbers. A vector store keeps both statements and returns whichever one is worded closer to the question, which is how an assistant ends up confidently repeating an address you left two years ago. nanomem keeps the chain and knows which end of it is current.

Eight months of ordinary chat; the team fact changed once, in passing.
Similarity still ranks the old one first, because the question is worded
like the old job β so nanomem hands it over labelled rather than pretending
otherwise. A real run of demo_stale.py against a local Ollama
(nomic-embed-text); regenerate it with python3 assets/record_demo.py. The
label does not come from the model: run the same demo with no embedding
endpoint reachable at all and the SUPERSEDED line is still there, because it
is computed from revision order rather than similarity.
Evidence β how it compares to FAISS, sqlite-vec and Chroma (including where it loses), what happens when the process is killed mid-write, and the pytest command that re-runs most of those claims on the copy you just installed.
Add this to your MCP client's config. On macOS claude_desktop_config.json
lives in ~/Library/Application Support/Claude/:
That is the whole configuration. The vault defaults to ~/.nanomem/memory.dat;
set NANOMEM_VAULT, or pass --vault /some/path.dat, to put it elsewhere.
Restart the client and tell it something that will change later:
"Remember that I work at Acme Corp." (a week later) "Actually I moved β I'm at Globex now." "Where do I work? And where did I work before?"
It answers Globex, and can tell you it used to be Acme β not because the second sentence was worded closer to the question, but because nanomem kept the chain and knows which end of it is current. Ask it "what did I believe about this in March?" and it can answer that too.
Seven tools: nanomem_add, nanomem_search, nanomem_history,
nanomem_as_of, nanomem_changes, nanomem_volatility, nanomem_stats β so
the assistant can ask what a fact USED to be, what the memory believed at a past
moment, what changed last week, and which of its own beliefs have gone stale.
The vault is an ordinary file. Point the CLI or a Python script at the same path to read what the assistant wrote β a write is on disk before its reply is sent, so another process sees it immediately and stopping the server cannot lose it.
Through 0.7.17 that was not true: the server flushed only on a clean exit, and an
MCP client stops its servers with SIGTERM. Twenty nanomem_add calls, each
answered "Stored β¦", then SIGTERM, left zero rows in the vault. If you ran
an earlier version, anything the assistant "remembered" in a session that was not
closed cleanly was never written.
One file on disk. One runtime dependency (numpy). No server, no daemon, no
index to rebuild. Search is exact β a full cosine scan, not an approximate
index β so recall is 100% by construction and every interesting question is
about time rather than ranking.
search returns at most top_k records. It now also tells you what it left
behind, which matters most when the caller is a model that cannot look:
For a multi-part question, the useful number is which parts got nothing at all:
explain() returns "" when nothing informative was cut, so it is safe to
append unconditionally β and the MCP nanomem_search tool does exactly that.
It only speaks when there is a min_score. With the default 0.0 every
record clears the floor, so "showing 3 of 101" would be true of every query ever
asked, including one whose answer really is a single record. A signal that fires
every time carries nothing. The count is still on r.n_above_floor either way.
The counts are free: the scan is exhaustive, so both numbers already existed on
the line that applies top_k and were being discarded.
A timestamp says when a record was written. It cannot say whether it is still true β a fact written ten years ago can be current, and one written last week can already be dead. The difference is whether a later record replaced it, which is what the revision chain knows.
Search for a fact that has changed and you get several of its values, because that is what a chain is. Each one now says where it stands:
ask() puts that in the prompt, so the model is told which facts are dead
before it writes; the MCP tool marks them in the text an assistant reads:
A ten-year-old fact that never changed is marked with nothing. superseded is
None β not False β for a record in no chain, because there "nothing replaced
it" is unknown rather than true.
metadata={"entity": "employer"} is doing real work above, and it is worth a
paragraph because little else here matters as much.
Name the attribute and nanomem knows those three statements are one fact, so it
keeps them as a chain. Leave it out and a lexical tagger guesses from the text β
measured, on 100 chains per arm, every member of a chain got the same correct tag in
70 of 100 plainly-worded chains and 0 of 100 on narrative
phrasing. In the example above it tags "I moved jobs, I now work at Initech."
as location rather than career, because "moved" outweighs "work at", and the
chain silently splits in two.
So if your application has attributes of its own, declare them. Everything nanomem does that a vector store does not rests on knowing which statements are about the same thing β and you know that, while the tagger is guessing.
Package 0.8.3 Β· engine 3.4.6 Β· container format 3 Β· arena cache format 4.
Licence: Apache-2.0. Use it commercially, modify it, ship it inside a
closed-source product β keep the LICENSE and NOTICE files with any
redistribution, say what you changed, and do not use the project's or the
author's name to endorse yours. That is the whole obligation.
nanomem was AGPL-3.0-or-later from 0.6.0 through 0.7.22, with a commercial licence alongside it. That combination protected something worth less than the users it was turning away: most companies ban AGPL by policy and many developers skip it without reading it. Copies distributed under the old terms keep them, and both superseded texts still ship β LICENSE.agpl-3.0-or-later.md and LICENSE.preview-v1.0.md. Up to 0.6.0 the wheel metadata said Apache-2.0 while the LICENSE file said All Rights Reserved; that contradiction was resolved in 0.6.0 and has stayed resolved.
Add --brief to either one to drop the explanatory prose and keep only the
computed lines; that is what the recording at the top of this file shows.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/nanomem)<a href="https://allmcps.com/mcp/nanomem"><img src="https://allmcps.com/api/badge/nanomem?style=directory" alt="Nanomem on AllMCPs" /></a>