The problem: You explain a codebase to Claude on Monday. Friday, it has no idea what you were working on.
This recipe: Claude remembers Monday on Friday. No re-explaining. No losing the thread mid-project.
Adds 5 tools to every Claude Code session:
memory_save — persist a decision, pattern, or findingmemory_read — retrieve it by keymemory_search — full-text search across everything savedsession_save — save a structured end-of-session summary with next stepssession_get — load last session’s context at the start of a new oneMemory persists in a local SQLite file. Nothing leaves your machine.
Requirements: Node.js 18+
1. Clone and install
git clone https://github.com/shukumei7/research-server-patterns
cd research-server-patterns/recipes/memory-persistence
npm install
2. Add to Claude Code
claude mcp add research-memory node /absolute/path/to/recipes/memory-persistence/mcp-memory.js
Replace /absolute/path/to/ with the actual path on your machine.
Windows example:
claude mcp add research-memory node "D:\research-server-patterns\recipes\memory-persistence\mcp-memory.js"
3. That’s it. Start a Claude Code session. The memory_save, memory_read, memory_search, session_save, and session_get tools are now available.
Monday: At the end of your session, tell Claude:
“Save a session summary for this project.”
Claude calls session_save with what was accomplished and next steps.
Friday: At the start of your new session, tell Claude:
“Load last session for my-project.”
Claude calls session_get and picks up exactly where you left off — decisions made, context intact, next steps ready.
Any time: Save a specific decision so it survives context compaction:
“Remember that we’re using JWT with 24h expiry for auth — save that as a memory.”
Claude calls memory_save. Every future session in that project can retrieve it.
You: We decided to use edge caching for the API responses. Save that.
Claude: [calls memory_save: key="caching-decision", content="Use edge caching for all GET /api/* routes. TTL=300s. Invalidate on write."]
[two weeks later, fresh session]
You: What did we decide about caching?
Claude: [calls memory_search: query="caching"]
Result: "Use edge caching for all GET /api/* routes. TTL=300s. Invalidate on write."
Set MEMORY_DB_PATH to an absolute path to control where the SQLite file lives:
MEMORY_DB_PATH=/Users/you/memory/projects.db claude
Or add to your shell profile to make it permanent.
If you want semantic search and cross-device sync, Mem0 is the cloud-hosted alternative with a free tier. This recipe trades those features for:
.db file with any SQLite browser and read every memory directlyResearch Server is a full autonomous back-office system for solo founders — email triggers, scheduled agents, SR&ED diary automation, and more. This recipe is the memory layer, standalone.