g0t4_mcp-server-memory-file

g0t4_mcp-server-memory-file

3.4

The mcp-server-memory is an MCP server designed to interact with a memory text file to assist Claude with inter-chat context management.

The mcp-server-memory is a Model Context Protocol (MCP) server that facilitates interaction with a memory text file, enabling Claude and other MCP clients to manage memories during chats. Each line in the text file represents a memory, which can be added, searched, deleted, or listed. This server is particularly useful for maintaining context across multiple interactions, allowing the model to recall previous conversations and details. The design is inspired by ChatGPT's memory system, which is essentially a text file, simplifying the management of memories as a list of strings. The server also includes a cueing mechanism to determine when memories should be stored, which may involve training, prompts, or tool specifications. The server's functionality is critical for tasks such as correcting information, updating details, and influencing responses based on past interactions.

Features

  • Memory Management: Allows adding, searching, deleting, and listing memories.
  • Inter-Chat Context: Helps maintain context across multiple interactions.
  • Simple Design: Utilizes a text file for memory storage, simplifying management.
  • Cueing Mechanism: Determines when to store memories using training, prompts, or tools.
  • Tool Integration: Works with Claude and other MCP clients for seamless memory management.

MCP Tools

  • {'memory_add': 'Appends a new memory to the text file.'}
  • {'memory_search': 'Returns matching memories based on a query.'}
  • {'memory_delete': 'Deletes memories that match a given query.'}
  • {'memory_list': 'Returns all stored memories.'}

Usage with Different Platforms

python

python
# Example script to interact with mcp-server-memory
import requests

# Add a memory
response = requests.post('http://mcp-server-memory/memory_add', json={'memory': 'talking to Wes'})
print(response.json())

# Search for a memory
response = requests.get('http://mcp-server-memory/memory_search', params={'query': 'Wes'})
print(response.json())

# Delete a memory
response = requests.post('http://mcp-server-memory/memory_delete', json={'query': 'Wes'})
print(response.json())

# List all memories
response = requests.get('http://mcp-server-memory/memory_list')
print(response.json())