The Memory Management Server for Claude is an implementation of the Model Context Protocol (MCP) designed to help Claude (and other MCP clients) manage inter-chat context using a memory text file. Each line in the file represents a memory, and the server provides tools to add, search, delete, and list memories during a chat session.
The server offers the following tools for memory management:
memory_add(memory: string)
: Appends a new memory to the file.memory_search(query: string)
: Returns memories that match the query (substring exact match).memory_delete(query: string)
: Deletes memories that match the query (substring exact match).memory_list()
: Returns all memories stored in the file.For example:
- Mentioning a name could add "talking to Wes".
- Mentioning a daughter's age could add "Wes's daughter is 8".
- Correcting a name could involve searching for the old name, deleting it, and adding the new name.
The server uses a simple memory text file for several reasons:
- Inspired by ChatGPT's memory system, which presents memories as a text file.
- Unstructured text simplifies tooling and parameters, reducing complexity.
- Testing with mcp-server-commands
showed success when Claude had access to reminders.
The server is particularly useful for maintaining context across chat sessions. When a new chat begins, Claude can automatically retrieve recent memories or request specific ones. These memories can then influence responses, tool usage, and other interactions.
memory_add
to store relevant information during a chat.memory_search
to retrieve specific memories based on a query.memory_delete
to remove outdated or incorrect information.memory_list
to view all stored memories.Potential future enhancements include:
- Recency Factor: Rearrange memories based on recency to prioritize recent information.
- Fade Out Old Memories: Gradually deprecate older memories to keep the file relevant.
This project is a mirror of g0t4/mcp-server-memory-file.