N2N Memory
N2N Memory is an open-source MCP server that gives AI coding assistants a memory of each project. It stores the key information in a code repository, such as modules, design decisions, interfaces and how they relate, as a knowledge graph inside the project folder, and keeps a separate record of the current task's progress, blockers and next steps. In a new session the assistant can search and read this memory and carry on where the previous work left off instead of learning the project again. The memory files live in the same repository as the code, can be shared with the team through Git, and never mix between projects.
What it does
An AI coding assistant usually starts each new session without knowing what was decided in the previous one or how the project is organized, so it has to read the code and ask the same questions again. N2N Memory lets the assistant record what it learns about a project, such as its modules, design decisions, interfaces and how they relate to each other, and search and read that information when it is needed later.
How it works
The memory is kept as ordinary files in a .mcp folder inside the project: one file holds the knowledge graph and another holds the record of the current task. Each repository therefore has its own memory, the memory stays with the code, and it can be shared with the team through Git. The assistant names the project root folder with every request; in a project that has no memory yet, the assistant first has to confirm that folder before any memory files are created.
Who it is for
Developers who use AI coding assistants on long-running projects and want the assistant to keep its knowledge of the project from one session to the next, and teams who want that knowledge stored next to the code and reviewed like any other change.
What you need
- Node.js 20 or later.
- An AI coding assistant or editor that supports MCP servers over stdio. N2N Memory is started with
npxusing the configuration below; no account or API key is required.
N2N Memory is open source under the MIT license.
Main features
Made for Git and teams
The memory is stored as plain JSON files that are sorted before every save, so changes appear in Git as small, readable diffs. Several sessions can write to the same project at the same time without overwriting each other. Teams can commit the memory files to share them or keep them out of version control.
Knowledge graph and task record
The assistant records modules, decisions, interfaces and other items as entries with notes and links them with relations; a note that repeats or closely resembles an existing one is kept only once, in its fuller form. The current task, its status (planning, in progress, blocked or completed), the reason and the next steps are recorded separately, and when the assistant reads the memory it is reminded to update this record before each commit.
Search, upkeep and export
Entries can be searched by name, type or content, and the search tolerates typing errors. The memory can be read in full, as an overview of names only, entry by entry or page by page. Outdated entries, notes and relations can be removed, and the whole knowledge graph can be exported to a Markdown file in the project for people to read.
One memory per project
Each project keeps its memory in its own folder. Memory is only created in a folder that is recognizable as a project, for example one containing .git, package.json, go.mod or Cargo.toml, and only after the assistant confirms it, so the knowledge of different projects never mixes.
MCP client setup
{
"mcpServers": {
"n2n-memory": {
"command": "npx",
"args": ["-y", "n2n-memory"]
}
}
}