MCP Connector

Enhance Claude with Persistent Memory

MCP server for persistent memory - a local knowledge graph of entities, relations, and observations across chats.


89
Spark score
out of 100
Updated 7 months ago
Version 1.0.0
Models
claude

Add to Favorites

Why it matters

Empower Claude with persistent memory by storing user interactions and knowledge in a local knowledge graph. This allows Claude to recall information across conversations, creating a more personalized and context-aware experience.

Outcomes

What it gets done

01

Store user preferences and facts as entities, relations, and observations.

02

Retrieve and utilize past conversation data for contextually relevant responses.

03

Build a dynamic knowledge graph for long-term memory recall.

04

Integrate with Claude to provide a seamless, memory-enhanced chat experience.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-memory | bash

Capabilities

Tools your agent gets

create_entities

Create multiple new entities in the knowledge graph.

create_relations

Create relations between entities in the knowledge graph.

add_observations

Add new observations to existing entities.

delete_entities

Remove entities and their associated relations from the graph.

delete_observations

Remove specific observations from entities.

delete_relations

Remove specific relations from the knowledge graph.

read_graph

Read the entire knowledge graph.

search_nodes

Search for nodes by query across names, types, and observations.

open_nodes

Retrieve specific nodes by name with their relations.

Overview

Memory MCP

An MCP server giving Claude persistent memory via a local knowledge graph of entities, relations, and observations, with tools to create, search, and delete graph data. Use it when Claude needs to remember user facts across chats, not as a general-purpose database or vector-search store.

What it does

This MCP server gives Claude persistent memory using a local knowledge graph, letting it remember information about users across chats through three core concepts. Entities are the primary nodes - a unique name, an entity type, and a list of observations, for example a person entity named John_Smith with the observation "Speaks fluent Spanish." Relations are directed connections between entities expressed in active voice, such as John_Smith works_at Anthropic. Observations are discrete, atomic pieces of information attached to an entity, stored and removed independently of the entity itself.

The memory file defaults to a bundled location but can be redirected via the MEMORY_FILE_PATH environment variable to a custom .jsonl path.

When to use - and when NOT to

Use it when Claude needs to remember facts about a user - identity, preferences, relationships, goals, or recurring people and organizations - across separate conversations. It is not a general-purpose database or vector-search memory store - it is scoped to a local, structured entity-relation-observation knowledge graph.

Capabilities

Nine tools operate on the graph: create_entities (create multiple new entities), create_relations (create relations between entities), add_observations (add new observations to existing entities), delete_entities (remove entities and their associated relations), delete_observations (remove specific observations), delete_relations (remove specific relations), read_graph (read the entire knowledge graph), search_nodes (search nodes by query across names, types, and observations), and open_nodes (retrieve specific named nodes with their relations). A recommended system prompt directs Claude to identify the user each interaction, begin chats by saying "Remembering..." while retrieving relevant information, refer to the knowledge graph as its "memory," and proactively create entities, relations, and observations from new information about identity, behaviors, preferences, goals, and relationships. A usage example has the user telling Claude to remember a meeting-time preference and a favorite programming language.

How to install

npm install -g @modelcontextprotocol/server-memory

Then register it in your Claude Code settings:

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

To use a custom memory file location, add "env": {"MEMORY_FILE_PATH": "/path/to/custom/memory.jsonl"} to the server configuration.

Who it's for

Users and developers who want Claude to retain facts about them - preferences, relationships, goals - persistently across chat sessions.

Source README

The Memory MCP server provides Claude with persistent memory using a local knowledge graph. This lets Claude remember information about users across chats through entities, relations, and observations.

Installation

npm install -g @modelcontextprotocol/server-memory

Configuration

Add to your Claude Code settings:

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

Custom Memory File Path

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"],
      "env": {
        "MEMORY_FILE_PATH": "/path/to/custom/memory.jsonl"
      }
    }
  }
}

Core Concepts

Entities

Primary nodes in the knowledge graph with a unique name, type, and observations.

{
  "name": "John_Smith",
  "entityType": "person",
  "observations": ["Speaks fluent Spanish"]
}

Relations

Directed connections between entities in active voice.

{
  "from": "John_Smith",
  "to": "Anthropic",
  "relationType": "works_at"
}

Observations

Discrete, atomic pieces of information attached to entities.

Available Tools

create_entities

Create multiple new entities in the knowledge graph.

create_entities(entities: Entity[]): void

create_relations

Create relations between entities.

create_relations(relations: Relation[]): void

add_observations

Add new observations to existing entities.

add_observations(observations: ObservationInput[]): AddedObservations[]

delete_entities

Remove entities and their associated relations.

delete_entities(entityNames: string[]): void

delete_observations

Remove specific observations from entities.

delete_observations(deletions: DeletionInput[]): void

delete_relations

Remove specific relations from the graph.

delete_relations(relations: Relation[]): void

read_graph

Read the entire knowledge graph.

read_graph(): KnowledgeGraph

search_nodes

Search for nodes by query across names, types, and observations.

search_nodes(query: string): SearchResults

open_nodes

Retrieve specific nodes by name with their relations.

open_nodes(names: string[]): NodeResults

Recommended System Prompt

Add this to your Claude project for optimal memory usage:

Follow these steps for each interaction:

1. User Identification:
   - Assume you are interacting with default_user
   - Proactively try to identify the user if unknown

2. Memory Retrieval:
   - Begin chats by saying "Remembering..." and retrieve relevant information
   - Refer to the knowledge graph as your "memory"

3. Memory Updates:
   - Be attentive to new information: identity, behaviors, preferences, goals, relationships
   - Create entities for recurring people, organizations, and events
   - Connect them using relations and store facts as observations

Usage Example

Claude, remember that I prefer morning meetings and
my favorite programming language is Python.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.