n2n-memory
Project-local knowledge-graph memory MCP server from N2NS Lab for AI coding agents.
エージェントを強化
公開元自身のコマンドです。PlugMCP のエンドポイントではありません。
キーとログ付きでコピーをホスト。
npx -y [email protected]Claude Code にはローカルコマンド用のインストールリンクがありません。下のコマンドをコピーして、ターミナルで実行してください。
claude mcp add n2ns-n2n-memory -- npx -y n2n-memory@1.2.2ターミナルで実行します。
{ "mcpServers": { "n2ns-n2n-memory": { "command": "npx", "args": [ "-y", "[email protected]" ] } }}claude_desktop_config.json
リモート URL か、手元のマシンのコマンドか 2 つのインストール方法の違い
PlugMCP で実行
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.
起動Context 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 MCP memory server for AI coding agents. Knowledge graph stored in .mcp/ inside each repo — isolated per project, Git-friendly JSON, dual-buffer (durable graph + active context).
{ "mcpServers": { "n2ns-n2n-memory": { "command": "npx", "args": [ "-y", "[email protected]" ] } }}ツール
ツール一覧はまだありません。リモートサーバーは、最初のヘルスチェック後に取得されます。
よくある質問
このページで Cursor、Claude Desktop、Claude Code、VS Code 用の stdio 設定をコピーできます。PlugMCP のプロキシではなく、公開元のインストール方法を使います。
このレコードに必須の環境変数は記載されていません。
N2n Memory は stdio 経由でローカル実行されます。
最終チェックは 2026-10-28 です。 Project-local MCP memory server for AI coding agents. Knowledge graph stored in .mcp/ inside each repo — isolated per project, Git-friendly JSON, dual-buffer (durable graph + active context).