n2n-memory
Project-local knowledge-graph memory MCP server from N2NS Lab for AI coding agents.
Agenten stärken
Der eigene Befehl des Herausgebers. Kein PlugMCP-Endpunkt.
Host a copy with our keys and logs.
npx -y [email protected]Claude Code hat keinen Installationslink für einen lokalen Befehl. Kopieren Sie den Befehl unten und führen Sie ihn in einem Terminal aus.
claude mcp add n2n-memory -- npx -y n2n-memory@1.2.2In einem Terminal ausführen.
{ "mcpServers": { "n2n-memory": { "command": "npx", "args": [ "-y", "[email protected]" ] } }}claude_desktop_config.json
Remote-URL oder ein Befehl auf Ihrem Rechner? Worin sich die beiden Installationen unterscheiden
Auf PlugMCP ausführen
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
StartenContext as code. Memory as asset.
n2n-memory is an open-source, local-first Model Context Protocol (MCP) memory server for AI coding assistants. It prevents cross-project memory pollution by storing durable project knowledge in .mcp/memory.json and active task context in .mcp/context.json inside each repository.
n2n-memory gives AI coding tools a project-local knowledge graph they can read and update through MCP. Memory and context are stored inside each repository under .mcp/, keeping them isolated, Git-friendly, and reviewable.
File Path: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"n2n-memory": {
"command": "npx",
"args": ["-y", "n2n-memory"]
}
}
}
Add in the MCP settings panel:
n2n-memorycommandnpx -y n2n-memoryN2N_LOG_LEVEL=debug only when troubleshooting local path resolution.This service is path-driven. AI assistants should pay attention to:
n2n_* tool, provide the absolute path of the current project root or workspace top-level directory (projectPath)..mcp/ yet does not create anything. The server detects the project root and replies with status: "AWAITING_CONFIRMATION" and a detectedRoot. Call the same tool again with confirmNewProjectRoot set to that exact detectedRoot to initialize memory. Folders without a real project marker (.git, package.json, language build files, …) are rejected outright, so memory is never created in an arbitrary directory.[ProjectPath]/.mcp/memory.json; active task context is saved to [ProjectPath]/.mcp/context.json..mcp/memory.json when the knowledge graph should be shared with the team. Commit context.json only if your workflow wants active task state shared.Storage layout inside each project:
<project-root>/
└── .mcp/
├── memory.json # durable knowledge graph — commit to share with the team
└── context.json # active task context — usually kept local
Recommended .gitignore policy for teams that want to share durable memory:
.mcp/context.json
!.mcp/
!.mcp/memory.json
If your project memory may contain private implementation details, keep the whole .mcp/ directory ignored.
n2n_add_entities, n2n_add_observations, n2n_create_relations): add entities, observations, and relations to build the knowledge graph.n2n_read_graph, n2n_get_graph_summary, n2n_search, n2n_open_nodes): read the full graph, get a lightweight summary, search, or open specific entities.n2n_update_context): update active task state before commits and handoffs.n2n_delete_entities, n2n_delete_observations, n2n_delete_relations, n2n_export_markdown): delete entities, observations, or relations; export the graph to Markdown.See Tools reference for parameter schemas and usage notes.
n2n-memory runs as a stdio MCP server with no CLI subcommands — start it with npx -y n2n-memory (or n2n-memory once installed). Storage location is derived from the projectPath you pass to each tool, not from configuration.
n2n_delete_entities, n2n_delete_observations, and n2n_delete_relations are destructive and should be governed by review workflows.context.json uncommitted by default, and commit .mcp/memory.json only when team sharing is intentional..git, package.json, or language-specific build files.N2N_LOG_LEVEL=debug when diagnosing path issues.This project is licensed under the Apache-2.0 License.
Built by N2NS Lab, the open-source lab of datafrog.io for practical AI developer tools.
Project-local knowledge-graph memory MCP server from N2NS Lab for AI coding agents.
{ "mcpServers": { "n2n-memory": { "command": "npx", "args": [ "-y", "[email protected]" ] } }}Tools
Noch keine Tool-Liste. Remote-Server erhalten eine nach dem ersten Health-Check.
FAQ
Kopieren Sie auf dieser Seite die stdio-Konfiguration für Cursor, Claude Desktop, Claude Code oder VS Code. Sie nutzt die Installation des Herausgebers, keinen PlugMCP-Proxy.
In diesem Eintrag ist keine erforderliche Umgebungsvariable aufgeführt.
N2n Memory läuft lokal über stdio.
Zuletzt geprüft: 2026-11-14. Project-local knowledge-graph memory MCP server from N2NS Lab for AI coding agents.