Nan MCP Server

Long-term memory for AI coding tools via vector search (Qdrant).

Local serverstdioGo

What is the Nan MCP server?

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).

What you get

Your AI forgets everything when the session ends. NaN Forget fixes that.

Setting it up

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.

What the assistant can call

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 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)

Configuration and credentials

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.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Nan.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the nan mcp server does with a few real requests.

Choosing this one

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.

Available tools

ToolWhat it does
RetrievalThree-stage pipeline (recognition → recall → spreading activation) with decay-weighted scoring, rather than flat vector search
StructureMemories carry problem, solution, concepts, and files fields — searches find related context even when keywords don't match
CostMemory operations (save, search, dedup, consolidation, GC) are all deterministic — no LLM calls, no API costs
SetupOne command (npx nan-forget setup), no Docker, no containers, no services to manage
memory_syncLightweight session handshake: health check + stats + project list
memory_saveSave a memory (auto-called by Claude, proactively)
memory_searchSemantic search with 3-stage retrieval (depth 1-3)
memory_getFetch a specific memory by ID
memory_updateChange content, type, or tags
memory_archiveSoft-delete (hidden from search, never truly deleted)
memory_consolidateForce consolidation of aging memories
memory_cleanGarbage collection (decay, dedup, expiry, MEMORY.md sync)
memory_statsMemory health dashboard
memory_healthCheck if Ollama, REST API are running

How to install the Nan MCP server

{
  "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.

Configuration

VariableDescriptionRequired
OPENAI_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Nan to Retrieval.
  • Use Nan to Structure.
  • Use Nan to Cost.

Frequently asked questions

It connects Nan to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (Retrieval, Structure, Cost, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Nan directly.