Show HN: MCP Memory – Fast Agent Memory Using Google's OKF and SQLite FTS5
TL;DR Highlight
MCP server gives agents long-term memory via OKF markdown files indexed with SQLite FTS5
Who Should Read
A developer whose Claude Code or Cursor agent forgets context every session and who keeps writing handoff prompts
Core Mechanics
- Memory is attached as an MCP server
- MCP-Memory gives agents like Claude Desktop, Cursor, Windsurf, and Codex long-term memory.
- Agents can read, store, search, and delete memories.
- Memory lives in both markdown files and a DB
- Each memory is saved as an OKF v0.2 markdown file with YAML frontmatter in the project's memory/ folder.
- The same content is indexed in SQLite at .mcp_memory/memories.db for search.
- SQLite FTS5 handles search
- The README claims key lookups under 20ms and instant keyword search.
- You can filter by key, tag, and namespace.
- Six MCP tools
- They are memory_store, memory_retrieve, memory_search, memory_delete, memory_get_last, and memory_update_last.
- get_last and update_last read and update a session checkpoint at system/last_memory.
- Per-project isolation and one-step setup
Community Reactions
- Why not just markdown plus grep?
- One commenter said MCP tools have tended to slow agents down and waste tokens in their experience.
- Others criticized it as grep over a memory/ directory and asked how it differs from Claude's built-in memory or mem0.
- A single MEMORY.md works well for some
- One commenter has the agent read a root MEMORY.md at the start of each conversation.
- At the end of a task the agent updates it with lessons and removes stale info, so handoff prompts are no longer needed.
- Claude Code reportedly under-uses external memory tools
- A commenter who built a similar tool stores coding standards and decisions in it.
- They said Codex and OpenCode with OpenAI models use it very well, while Claude Code seems to prefer its own memory tooling.
- They said it got worse with Opus 5 and needed more detailed setup instructions.
- Vector search and git-backed alternatives suggested
- One commenter thought distilling conversations into embeddings in pgvector would likely be more accurate than FTS.
How to Apply
- Register the memory server in Claude Code
- Clone the repo and run claude mcp add --scope user memory -- /ABSOLUTE/PATH/TO/run.sh.
- In a small project, save a coding style with memory_store, then find it with memory_search in a new session.
- Add session start and end rules to your instructions
- In CLAUDE.md or the system prompt, call memory_get_last at start and memory_update_last at each milestone.
- If the agent skips the tools, make the instructions more specific.
- Compare against the MEMORY.md approach
- Run the same task once with MEMORY.md and once with this server, then compare token usage and context recovery.
- If results are similar, keep the simpler file approach.
- Switch to a global store when projects share memory
- Set MCP_MEMORY_DB_PATH=~/.mcp_memory/memories.db in your MCP config.
- Also set MCP_MEMORY_DIR=~/.mcp_memory/memory.
Try It
# Run in a terminal (install and register)
git clone https://github.com/fellowgeek/mcp-memory
cd mcp-memory
python3 setup.py
# Or register directly with the Claude Code CLI
claude mcp add --scope user memory -- $(pwd)/run.sh
# Instructions to paste into a Claude Code session
# At session start, call memory_get_last to read the last checkpoint.
# When you finish a milestone, save a summary with memory_update_last.
# Now call memory_store with key user/preferences/coding_style and content {{your preferred coding style}}.
# Next step: open a new session and run memory_search with query="{{keyword}}".Terminology
Related Papers
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.