home / mcp / knowledge graph memory server
MCP server enabling persistent memory for Claude through a local knowledge graph - fork focused on local development
Configuration
View docs{
"mcpServers": {
"itseasy21-mcp-knowledge-graph": {
"command": "npx",
"args": [
"-y",
"@itseasy21/mcp-knowledge-graph"
],
"env": {
"MEMORY_FILE_PATH": "YOUR_MEMORY_FILE_PATH"
}
}
}
}You can run a Knowledge Graph Memory Server to persistently remember user information across chats. It stores entities, their relationships, and observations in a structured memory that your MCP client can read and update over time, enabling personalized and continuous conversations.
Connect your MCP client to the Memory Server using a stdio configuration. The server runs locally as a small, persistent memory store that your client can query for entities, relations, and observations. Use it to create, read, update, and search memory as your conversation flows. You can configure the memory path to store data at a specific location on your machine and use an environment variable to point the server to that file.
Key capabilities you can leverage include creating entities, defining relations between them, adding observations, and querying or updating memory as you chat. The memory graph supports search across entity names, types, and observations, and it can retrieve specific nodes along with their connected relations.
Prerequisites you need on your system before installing are Node.js and npm (or you can use npx directly if you have Node installed). Ensure you have internet access to fetch the MCP package from the registry.
Install and run the Memory Server client locally using the provided MCP command configuration. The recommended approach is to install via a client installer and then start the memory server as a standard MCP server.
npx -y @smithery/cli install @itseasy21/mcp-knowledge-graph --client claudeMemory data is stored in a local file. You can specify the memory file path when you configure the MCP server in your client. The default path is memory.jsonl in the server’s installation directory if you do not provide a custom path.
{
"mcpServers": {
"memory": {
"command": "npx",
"args": [
"-y",
"@itseasy21/mcp-knowledge-graph"
],
"env": {
"MEMORY_FILE_PATH": "/path/to/your/memory.jsonl"
}
}
}
}If you need to point to a custom memory file path using CLI arguments instead of an environment variable, you can pass the memory path through the argument list as follows.
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@itseasy21/mcp-knowledge-graph", "--memory-path", "/path/to/your/memory.jsonl"]
}
}
}Use a clear memory management strategy in your conversations. The memory system should capture basic identity, behaviors, preferences, goals, and relationships while keeping the data atomic and easy to update or remove.
Create multiple new entities in the knowledge graph with names, types, and initial observations.
Create multiple new relations between existing entities using source, target, and relation type.
Add new observations to existing entities and return the added facts.
Remove entities and their related connections from the graph.
Remove specific observations from entities.
Remove specific relationships between entities.
Read and return the entire knowledge graph with all entities and relations.
Search for nodes by name, type, or observations and return matching entities with their relations.
Retrieve specific nodes by name and include their relations.