Back to MCP Catalog

Knowledge Graph Memory MCP Server

Knowledge & MemoryTypeScript
A persistent memory system using a local knowledge graph
Available Tools

create_entities

Create multiple new entities in the knowledge graph with names, types, and observations

entities

create_relations

Create multiple new relations between entities in the knowledge graph

relations

add_observations

Add new observations to existing entities in the knowledge graph

observations

delete_entities

Remove entities and their relations from the knowledge graph

entityNames

delete_observations

Remove specific observations from entities in the knowledge graph

deletions

delete_relations

Remove specific relations from the knowledge graph

relations

read_graph

Read the entire knowledge graph with all entities and relations

search_nodes

Search for nodes in the knowledge graph based on a query string

query

open_nodes

Retrieve specific nodes by name from the knowledge graph

names

Knowledge Graph Memory provides a robust implementation of persistent memory for AI assistants using a local knowledge graph. It enables Claude and other AI models to remember information about users across conversations, creating a more personalized and contextually aware experience. The server stores information as entities, relations, and observations in a structured knowledge graph. This approach allows for sophisticated information retrieval and relationship tracking, making it ideal for applications where maintaining user context over time is essential.

Overview

Knowledge Graph Memory Server provides persistent memory capabilities for AI assistants through a structured knowledge graph. This allows Claude and other AI models to remember information about users across multiple conversations, creating a more personalized experience.

Core Concepts

The memory system is built around three key components:

  1. Entities: Primary nodes in the knowledge graph with unique names, entity types (e.g., "person", "organization"), and associated observations.

  2. Relations: Directed connections between entities that describe how they interact or relate to each other (e.g., "works_at", "lives_in").

  3. Observations: Discrete pieces of information about entities stored as strings. These should be atomic (one fact per observation) and can be added or removed independently.

Installation

You can install the Knowledge Graph Memory Server using either NPX or Docker.

Using NPX

Add this configuration to your client settings:

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ]
    }
  }
}

Using Docker

Add this configuration to your client settings:

{
  "mcpServers": {
    "memory": {
      "command": "docker",
      "args": ["run", "-i", "-v", "claude-memory:/app/dist", "--rm", "mcp/memory"]
    }
  }
}

Custom Configuration

You can customize the memory storage location using environment variables:

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ],
      "env": {
        "MEMORY_FILE_PATH": "/path/to/custom/memory.json"
      }
    }
  }
}
  • MEMORY_FILE_PATH: Path to the memory storage JSON file (default: memory.json in the server directory)

VS Code Installation

For VS Code users, you can install the server by adding the configuration to your User Settings (JSON) file. Press Ctrl + Shift + P and type Preferences: Open Settings (JSON), then add one of the configurations shown above under the "mcp" key.

Alternatively, you can add it to a file called .vscode/mcp.json in your workspace (without the "mcp" key) to share the configuration with others.

Usage

Once installed, the Knowledge Graph Memory Server provides tools for creating, reading, updating, and deleting information in the knowledge graph. The AI model can use these tools to maintain context about users, their preferences, and other important information across conversations.

To effectively use the memory system, you'll need to customize your system prompt to instruct the AI on when and how to create and retrieve memories. The specific prompt will depend on your use case, but should guide the model on the frequency and types of memories to create.

Related MCPs

MemoryMesh
Knowledge & MemoryTypeScript

A knowledge graph server for structured memory persistence in AI models

Cognee
Knowledge & MemoryPython

Knowledge management and retrieval system with code graph capabilities

Wolfram Alpha
Knowledge & MemoryPython

Connect your chat to Wolfram Alpha computational intelligence

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.