nanmesh avatar

Nan Forget

nanmesh/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 tools

Public 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_KEYsecret

OpenAI API key for embeddings. If not set, falls back to local Ollama.

NAN_FORGET_EMBEDDING_PROVIDERdefault: ollama

Embedding provider: openai or ollama

NAN_FORGET_USER_IDdefault: default

User identifier for multi-user setups

NAN_FORGET_PROJECT_ROOT

Project 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"]
  1. You work normally. Your agent saves decisions, preferences, and facts to a local SQLite memory database as you go.
  2. Session ends. Memories persist in ~/.nan-forget/memories.db. Aging memories get automatically compacted into long-term entries.
  3. 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


View the full README on GitHub

Details

Repository
github.com/nanmesh/nan-forget
Category
AI & LLM Tools
Package
nan-forget
Transport
STDIO
Auth
Required
Registry
MCP registry, active

More from nanmesh

Related AI & LLM Tools MCP servers

View all
11clawai avatar1Claw Vault1clawai/1claw-mcpHSM-backed vault secrets for AI agents (JIT fetch) plus prompt-injection and threat scanning.4stars
2adelelo13 avatarNeuromcpadelelo13/neuromcpSemantic memory for AI agents with hybrid search, knowledge graph, and consolidation4stars
3retrogradelabs avatarLune Researchretrogradelabs/lune-mcp-serverSearch peer-reviewed papers and research methodology guidance from your AI agent.4stars
4garagon avatarAguara MCPgaragon/aguara-mcpSecurity scanner for AI agent skills and MCP servers4stars
5go-ports avatarEchoVault Memorygo-ports/echovaultLocal-first memory for coding agents; stores decisions, bugs, and context across sessions.4stars
6iamvirul avatarWso2 Docs Mcp Serveriamvirul/wso2-docs-mcp-serverSemantic search over WSO2 docs (APIM, IS, MI, Choreo, Ballerina) via RAG and pgvector.4stars