nMEMORY — Claude Code MCP server: what it does, how to install
A persistent memory MCP server for coding agents that links every stored item to an exact anchor. When information is missing, it explicitly states so.
Open on GitHubWhat nMEMORY does
The server keeps state across runs inside a single local SQLite store. Every recorded entry requires an anchor, such as a file path with a line number, a quotation, or a pull request link. Search queries return one of three explicit results: grounded, missing_evidence, or abstain. It never guesses when data falls short.
The toolset exposes 27 MCP handlers covering record ingestion, recall, handoffs, and audit inspection. BM25 keyword matching operates on the local machine with no external accounts. Vector embeddings run only after setting credentials such as GEMINI_API_KEY or configuring NOTT_NMEMORY_EMBED_PROVIDER for servers like Ollama or vLLM.
The database file never initializes itself in the background. You must create the initial store manually via uv run nmemory database create. The project environment relies on Python 3.14 or later managed through uv.
What it helps with
- preserve project decisions across sessions with exact file references
- stop agent hallucinations by returning explicit missing-evidence statuses
- pass working context across coding sessions using structured handoffs
- inspect an auditable hash-chained record of all memory modifications
Example prompts for the agent
- Store our database choice in memory with an anchor to
docs/adr/0001-storage.md - Search memory for our data storage decisions and verify their sources
- Finalize the current session and write a handoff summary for the next agent
How to install nMEMORY
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about nMEMORY
How to install nMEMORY in Claude Code?
Clone the repository with git clone https://github.com/menot-you/n-memory, enter the directory, run uv sync, and create the database via uv run nmemory database create. After that, register the MCP server with claude mcp add nmemory -- uv run --directory "$PWD" nmemory mcp serve.
What does nMEMORY do?
It equips your coding agent with an SQLite-backed memory store across sessions. Every recalled decision points to an exact source file or quote, preventing the model from acting on unfounded assumptions.
Does nMEMORY require an external embedding API key?
No, keyword search with BM25 functions offline without any remote keys. An external provider like Gemini is used only when GEMINI_API_KEY is present in your environment.