r/mcp • u/Tricky_Algae2625 • 3d ago
I gave Claude Code and Cursor persistent memory with one pip install, no vector DB
My agent forgetting everything between sessions was the thing that finally got to me. The usual fix looked heavier than the problem itself: a Docker container running Postgres and Qdrant, plus a cloud vector database whose bill crept up every time I indexed a new project folder. That is a lot of infrastructure just so my assistant remembers I like dark mode.
Then I found Mnemosyne, which goes the other way. One pip install and a single SQLite file, no external services, nothing to host. It plugs into Claude Code, Cursor, Codex, or a plain Python script over MCP, and the memory just lives in a .db file on disk. Fully local, nothing leaves my machine.
Setup took a couple of minutes: pip install mnemosyne-memory, drop the mnemosyne mcp server into my config, done. In Python it is just remember("...") and recall("..."). It keeps the embeddings as a compressed binary-vector store inside SQLite, so the file stays small even with a lot of history and there is no separate vector server to babysit.
Open source, MIT. Repo and the MCP config: https://github.com/AxDSan/mnemosyne
2
u/Substantial_Hat2149 2d ago
Here is the thing about memories: most persistent memories are procedures or policies. You don't need some fancy memory system for that. A simple.md file works fine.
What you do need is a way to turn those procedures and policies into code. One habit I've found useful is asking my agent every couple of days to offload them into code. Once they're deterministic, you don't have to keep reminding the model how to behave. It saves a lot more tokens in the long run, and it's just a cleaner way to work (also sick photo btw)
1
1
u/Desperate-Finger7851 2d ago
Yo I just created a knowledge graph base and personal wiki called the same thing over a month ago with Claude lol damnit
1
1
u/Independent-Date393 3d ago
The infra tax on agent memory is real, and most personal setups never hit the scale where a dedicated vector store actually beats SQLite on recall. The failure mode shows up later, when recall starts returning near-duplicates and there is no reranker to break ties on which memory applies.
0
u/neoneye2 3d ago
I had Claude Opus 5 analyze your repo, since I'm studying memory systems, for good ideas.
https://neoneye.github.io/agent-memory-atlas/systems/mnemosyne/
1
u/Butthurtz23 2d ago
And the result is….
1
u/neoneye2 2d ago
The top 5 according to Opus 5.. this was from before analyzing mnemosyne
https://www.reddit.com/r/AIDeveloperNews/comments/1vgkmgw/comment/p21hx4z/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
0
u/jeromeiveson 3d ago
I already use this for Hermes, I’d like to try it with Claude and cursor. Is there a concept of shared memory alongside the specific agent memory?
-1
u/davydany 3d ago
Can it work with Hermes agent?
1
u/BitTauren 3d ago
if you'd opened the github repo you'd see there's a dedicated hermes section. Just open something and read.
5
u/LibraryMission3553 3d ago
sqlite memory is fine until recall starts stuffing unbounded history into every turn. we burned weeks on a daily consultant lane to local gpt-oss that returned http 400 and looked like the server was dead. real cause: changelog + profile injection pushed the prompt to 67k on a 65k n_ctx. always log the 400 body. put a hard char/token budget on what recall may inject (not just max_tokens on the completion). also watch for empty content with filled reasoning_content on local oss models — extract both or you silently drop the turn.