Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"io-github-nanmesh-nan-forget": {
"args": [
"-y",
"nan-forget"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Your AI forgets everything when the session ends. NaN Forget fixes that.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y 'nan-forget' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked nan-forget against OSV.dev.
Click any tool to inspect its schema.
memories_databaseSQLite database with sqlite-vec for semantic search and memory storage
~/.nan-forget/memories.db
AGENTS.mdGenerated instruction file for Codex-style agents to use nan-forget automatically
{project_root}/AGENTS.md
REST_APIREST API endpoints for memory operations
http://localhost:3456/memories/{endpoint}
nan-forget system promptSystem prompt that tells Codex-style agents exactly what endpoints to call and how to use nan-forget
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml
Dynamic problem-solving through sequential thought chains
Persistent memory using a knowledge graph
An autonomous agent that conducts deep research on any data using any LLM providers
🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, distributed swarm intelligence, RAG integration, and native Claude Code / Codex Integration
MCP Security Weekly
Get CVE alerts and security updates for io.github.NaNMesh/nan-forget and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Long-term memory for AI coding tools.
Your AI forgets everything when the session ends. NaN Forget fixes that.
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.
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"]
~/.nan-forget/memories.db. Aging memories get automatically compacted into long-term entries.You never call save or search manually. Here's what happens behind the scenes:
| Event | What fires | What happens |
|---|---|---|
| Session starts | memory_sync | Lightweight handshake — checks health, loads stats, lists projects. No heavy search. |
| You send a message | UserPromptSubmit hook | nan-forget recall auto-searches memory for relevant context and injects it into the conversation. |
| You discuss a topic | memory_search | Claude searches the DB dynamically whenever relevant context might exist — like how you recall things on-demand. |
| Claude learns something | memory_save | Claude saves decisions, preferences, and facts immediately. Tool descriptions tell Claude "you MUST call this." |
Claude writes a .md file | PostToolUse hook | memory-sync.js intercepts the write, parses frontmatter, and auto-saves it to SQLite via nan-forget add. |
| Session ends | SessionEnd hook | session-end.js scans the conversation transcript for unsaved decisions/facts and saves the top 5 to the DB. |
| Every 10 saves or 24h | Auto-consolidate | Aging memories get clustered and compacted into long-term entries. Originals are archived. |
Four layers of protection ensure nothing is lost:
Codex and similar agents work well with nan-forget, but they usually need instruction files or shell/API fallbacks instead of Claude's hook model:
npx nan-forget setupAGENTS.md in your repo. It tells Codex-style agents to sync, search, save, and checkpoint automatically.localhost:3456 or local commands like nan-forget sync, nan-forget search, nan-forget add, and nan-forget checkpoint.The REST API and CLI now mirror the important memory workflows closely enough that memories saved by Claude are searchable from Codex and vice versa.
# Start the REST API
nan-forget api
# The system prompt tells your agent exactly what endpoints to call
nan-forget prompt
Type these in Claude Code:
| Command | What it does |
|---|---|
/nan-forget | Load context from past sessions |
/nan-forget stats | Show memory health |
/nan-forget clean | Run garbage collection |
/nan-forget compact | Force memory consolidation |
/nan-forget health | Check if services are running |
/nan-forget start | Start all services |