
Nan Forget
Gives Claude persistent memory across sessions and projects through a local SQLite database with vector search. Hooks automatically capture context from markdown files, user prompts, and session transcripts without manual save calls. Exposes memory_sync, memory_search, memory_save, and slash commands like /nan-forget for loading past context. Uses sqlite-vec for semantic retrieval with a three-stage pipeline (recognition, recall, association) and decay scoring that weighs recency against confidence. Setup runs through npx with Ollama for local embeddings. Works with Claude Desktop via MCP hooks and other tools like Codex through a REST API on localhost:3456. Everything stays on your machine in ~/.nan-forget/memories.db.
- GitHub stars
- 5
- tools
- 13
- auth
- Secret needed
- transport
- STDIO
- env vars
- 4
- last updated
- Apr 6, 2026
Tools
13 toolsPublic tool metadata for what this MCP can expose to an agent.
memory_syncLightweight session handshake: health check + stats + project list
Lightweight session handshake: health check + stats + project list
No parameter schema in public metadata yet.
memory_saveSave a memory (auto-called by Claude, proactively)
Save a memory (auto-called by Claude, proactively)
No parameter schema in public metadata yet.
memory_searchSemantic search with 3-stage retrieval (depth 1-3)
Semantic search with 3-stage retrieval (depth 1-3)
No parameter schema in public metadata yet.
memory_getFetch a specific memory by ID
Fetch a specific memory by ID
No parameter schema in public metadata yet.
memory_updateChange content, type, or tags
Change content, type, or tags
No parameter schema in public metadata yet.
memory_archiveSoft-delete (hidden from search, never truly deleted)
Soft-delete (hidden from search, never truly deleted)
No parameter schema in public metadata yet.
memory_consolidateForce consolidation of aging memories
Force consolidation of aging memories
No parameter schema in public metadata yet.
memory_cleanGarbage collection (decay, dedup, expiry, MEMORY.md sync)
Garbage collection (decay, dedup, expiry, MEMORY.md sync)
No parameter schema in public metadata yet.
memory_statsMemory health dashboard
Memory health dashboard
No parameter schema in public metadata yet.
memory_healthCheck if Ollama, REST API are running
Check if Ollama, REST API are running
No parameter schema in public metadata yet.
memory_startBoot Ollama + REST API
Boot Ollama + REST API
No parameter schema in public metadata yet.
memory_checkpointSave full problem→solution context after completing a task
Save full problem→solution context after completing a task
No parameter schema in public metadata yet.
memory_compressCompress persisted `.md` memory files to minimal stubs
Compress persisted `.md` memory files to minimal stubs
No parameter schema in public metadata yet.
Sponsors
Configuration
OPENAI_API_KEYsecretOpenAI API key for embeddings. If not set, falls back to local Ollama.
NAN_FORGET_EMBEDDING_PROVIDERdefault: ollamaEmbedding provider: openai or ollama
NAN_FORGET_USER_IDdefault: defaultUser identifier for multi-user setups
NAN_FORGET_PROJECT_ROOTProject root used for local memory file sync and cleanup
Readme
NaN Forget
Long-term memory for AI coding tools.
Your AI forgets everything when the session ends. NaN Forget fixes that.
Install (3 steps)
npx nan-forget setup
That's it. The wizard installs Ollama, embeddings, Claude hooks, MCP config, and a project AGENTS.md for Codex-style agents. Restart Claude Code or reopen Codex. Your AI now remembers.
No API keys needed. No Docker needed. Runs locally. Free forever.
How It Works
flowchart LR
A["You talk to your AI tool"] --> B["It learns things"]
B --> C["nan-forget saves to SQLite"]
C --> D["Session ends"]
D --> E["New session starts"]
E --> F["nan-forget loads context"]
F --> G["Your AI remembers"]
- You work normally. Your agent saves decisions, preferences, and facts to a local SQLite memory database as you go.
- Session ends. Memories persist in
~/.nan-forget/memories.db. Aging memories get automatically compacted into long-term entries. - New session starts. nan-forget loads context from past sessions. Auth decisions from 3 months ago on Project A surface when you work on Project B today.
Automatic Memory Handling
Details
- Repository
- github.com/nanmesh/nan-forget
- Category
- AI & LLM Tools
- Package
nan-forget- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active