n2n-memory
Persists AI's cognitive fragments as a knowledge graph within each project directory, enabling project-level memory isolation and sharing via Git.
README
n2n-memory
Context as code. Memory as asset.
A specialized MCP server designed to solve "memory pollution" during AI-assisted cross-project development. It persists AI's cognitive fragments directly within each project's own directory.
π Key Highlights
- Project-Level Physical Isolation: Memory files are stored at
[Project Root]/.mcp/memory.json. - Git-Friendly: JSON data is automatically sorted by key to generate clean and readable
git diff. - Tool Agnostic: Uses the
.mcpnaming convention, not tied to any specific AI brand or IDE plugin. - Assets for Your Code: Memory stays with your code; team members can share AI's understanding of the architecture by simply pulling the repository.
- Universal Compatibility: Works with all MCP-enabled models including Claude 4.5, Gemini 3 Pro/Flash, GPT-5/5.2, and DeepSeek V3.2.
- Privacy-First: Built with security by design, keeping your data local and isolated.
π Quick Start
1. Installation & Config (IDE / Claude Desktop)
The easiest way to use this is via npx:
Claude Desktop
File Path: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"n2n-memory": {
"command": "npx",
"args": ["-y", "@datafrog-io/n2n-memory"]
}
}
}
Cursor / VSCode (MCP Plugin)
Add in the MCP settings panel:
- Name:
n2n-memory - Type:
command - Command:
npx -y @datafrog-io/n2n-memory
2. Usage Guide
This service is path-driven. AI assistants should pay attention to:
- Absolute Paths: When calling any
n2n_*tool, the absolute path of the current project root (projectPath) must be provided. - Auto Storage: Memory is automatically saved to
[ProjectPath]/.mcp/memory.json. - Collaboration: It is recommended to commit
.mcp/memory.jsonto your Git repository to share the knowledge graph with your team.
Available Tools:
n2n_add_entities: Create new entities.n2n_add_observations: Append observations or facts.n2n_create_relations: Establish connections between entities.n2n_read_graph: Read project memory and active context (SupportssummaryModeandpagination).n2n_get_graph_summary: Quickly fetch a lightweight index of all entities (Supportspagination).n2n_update_context: Update current task status and next steps.n2n_search: Search the graph via keywords (Supportspagination).n2n_open_nodes: Retrieve specific entities by name.
πΊοΈ Future Roadmap
- Semantic Search: Integration of minimalist Vector Embeddings for fuzzy memory retrieval.
- Ontology Enforcement: Optional schema for relation type consistency.
- Time Travel: Versioned snapshots for memory rollback.
π Related Docs
- Design Solution: Why project-level isolation?
- API Reference: Tool descriptions and schema.
- Development: How to build, test and extend.
- Changelog: Version history and incident recovery.
π License
This project is licensed under the MIT License.
N2N Studio β The AI Innovation Lab of DataFrog.io.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.