Long-term memory for AI coding tools via vector search (Qdrant).
Nan MCP server exists for a simple reason — assistants are far more useful when they can act on Nan directly instead of describing what you should do. Long-term memory for AI coding tools via vector search (Qdrant).
Your AI forgets everything when the session ends. NaN Forget fixes that.
Installation goes through your MCP client rather than a global install: point it at nan-forget on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
Once Nan is connected, these are the calls the assistant has available:
Retrieval — Three-stage pipeline (recognition → recall → spreading activation) with decay-weighted scoring, rather than flat vector searchStructure — Memories carry problem, solution, concepts, and files fields — searches find related context even when keywords don't matchCost — Memory operations (save, search, dedup, consolidation, GC) are all deterministic — no LLM calls, no API costsSetup — One command (npx nan-forget setup), no Docker, no containers, no services to managememory_sync — Lightweight session handshake: health check + stats + project listmemory_save — Save a memory (auto-called by Claude, proactively)memory_search — Semantic search with 3-stage retrieval (depth 1-3)memory_get — Fetch a specific memory by IDmemory_update — Change content, type, or tagsmemory_archive — Soft-delete (hidden from search, never truly deleted)memory_consolidate — Force consolidation of aging memoriesmemory_clean — Garbage collection (decay, dedup, expiry, MEMORY.md sync)You will need one environment variable: OPENAI_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
Among the knowledge and memory options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Nan's toolset — Retrieval, Structure, Cost and 11 more — is a fair guide to whether it matches your workflow. It is maintained by NaNMesh; worth a glance at recent repository activity before you build anything load-bearing on it.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| Retrieval | Three-stage pipeline (recognition → recall → spreading activation) with decay-weighted scoring, rather than flat vector search |
| Structure | Memories carry problem, solution, concepts, and files fields — searches find related context even when keywords don't match |
| Cost | Memory operations (save, search, dedup, consolidation, GC) are all deterministic — no LLM calls, no API costs |
| Setup | One command (npx nan-forget setup), no Docker, no containers, no services to manage |
| memory_sync | Lightweight session handshake: health check + stats + project list |
| memory_save | Save a memory (auto-called by Claude, proactively) |
| memory_search | Semantic search with 3-stage retrieval (depth 1-3) |
| memory_get | Fetch a specific memory by ID |
| memory_update | Change content, type, or tags |
| memory_archive | Soft-delete (hidden from search, never truly deleted) |
| memory_consolidate | Force consolidation of aging memories |
| memory_clean | Garbage collection (decay, dedup, expiry, MEMORY.md sync) |
| memory_stats | Memory health dashboard |
| memory_health | Check if Ollama, REST API are running |
{
"mcpServers": {
"nan-forget": {
"command": "npx",
"args": ["-y", "nan-forget"],
"env": {
"OPENAI_API_KEY": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| OPENAI_API_KEY | Credential the server authenticates with. | Yes |
A knowledge graph your assistant keeps between sessions — entities, relations and observations that persist.
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Your workspace, on speaking terms with AI — search, read and write Notion pages and databases.
A structured scratchpad for hard problems — stepwise reasoning with revisions, branches and visible logic.
Symbol-level code navigation, refactoring and memory for coding agents — the IDE brain your assistant has been missing.
Chat with your second brain — search, read and write vault notes through the Local REST API.