Claude Memory MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install -r requirements.txt
./setup.sh
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "MEMORY_FILE_PATH=${MEMORY_FILE_PATH}" claude-memory-066c -- node "<FULL_PATH_TO_CLAUDE_MEMORY_MCP_CF>/dist/index.js"

Replace <FULL_PATH_TO_CLAUDE_MEMORY_MCP_CF>/dist/index.js with the actual folder you prepared in step 1.

Required:MEMORY_FILE_PATH
README.md

Persistent memory architecture for Claude to capture and retrieve user facts.

Claude Memory MCP Server

An MCP (Model Context Protocol) server implementation that provides persistent memory capabilities for Large Language Models, specifically designed to integrate with the Claude desktop application.

Overview

This project implements optimal memory techniques based on comprehensive research of current approaches in the field. It provides a standardized way for Claude to maintain persistent memory across conversations and sessions.

Features

  • Tiered Memory Architecture: Short-term, long-term, and archival memory tiers
  • Multiple Memory Types: Support for conversations, knowledge, entities, and reflections
  • Semantic Search: Retrieve memories based on semantic similarity
  • Automatic Memory Management: Intelligent memory capture without explicit commands
  • Memory Consolidation: Automatic consolidation of short-term memories into long-term memory
  • Memory Management: Importance-based memory retention and forgetting
  • Claude Integration: Ready-to-use integration with Claude desktop application
  • MCP Protocol Support: Compatible with the Model Context Protocol
  • Docker Support: Easy deployment using Docker containers

Quick Start

Option 1: Using Docker (Recommended)

# Clone the repository
git clone https://github.com/WhenMoon-afk/claude-memory-mcp.git
cd claude-memory-mcp

# Start with Docker Compose
docker-compose up -d

Configure Claude Desktop to use the containerized MCP server (see Docker Usage Guide for details).

Option 2: Standard Installation

  1. Prerequisites:

    • Python 3.8-3.12
    • pip package manager
  2. Installation:

    # Clone the repository
    git clone https://github.com/WhenMoon-afk/claude-memory-mcp.git
    cd claude-memory-mcp
    
    # Install dependencies
    pip install -r requirements.txt
    
    # Run setup script
    chmod +x setup.sh
    ./setup.sh
    
  3. Claude Desktop Integration:

    Add the following to your Claude configuration file:

    {
      "mcpServers": {
        "memory": {
          "command": "python",
          "args": ["-m", "memory_mcp"],
          "env": {
            "MEMORY_FILE_PATH": "/path/to/your/memory.json"
          }
        }
      }
    }
    

Using Memory with Claude

The Memory MCP Server enables Claude to remember information across conversations without requiring explicit commands.

  1. Automatic Memory: Claude will automatically:

    • Remember important details you share
    • Store user preferences and facts
    • Recall relevant information when needed
  2. Memory Recall: To see what Claude remembers, simply ask:

    • "What do you remember about me?"
    • "What do you know about my preferences?"
  3. System Prompt: For optimal memory usage, add this to your Claude system prompt:

    This Claude instance has been enhanced with persistent memory capabilities.
    Claude will automatically remember important details about you across
    conversations and recall them when relevant, without needing explicit commands.
    

See the User Guide for detailed usage instructions and examples.

Documentation

Examples

The examples directory contains scripts demonstrating how to interact with the Memory MCP Server:

  • store_memory_example.py: Example of storing a memory
  • retrieve_memory_example.py: Example of retrieving memories

Troubleshooting

If you encounter issues:

  1. Check the Compatibility Guide for dependency requirements
  2. Ensure your Python version is 3.8-3.12
  3. For NumPy issues, use: pip install "numpy>=1.20.0,<2.0.0"
  4. Try using Docker for simplified deployment

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Environment Variables

MEMORY_FILE_PATHrequiredThe file path where the memory JSON data is stored.

Configuration

claude_desktop_config.json
{"mcpServers": {"memory": {"command": "python", "args": ["-m", "memory_mcp"], "env": {"MEMORY_FILE_PATH": "/path/to/your/memory.json"}}}}

Try it

What do you remember about me?
What do you know about my preferences?
Can you recall the project details we discussed last week?
Store this fact: I prefer using VS Code for all my Python development.

Frequently Asked Questions

What are the key features of Claude Memory?

Tiered memory architecture including short-term, long-term, and archival tiers. Semantic search capabilities for retrieving relevant memories. Automatic memory capture and consolidation without explicit commands. Support for diverse memory types like conversations, knowledge, and entities. Importance-based memory retention and forgetting mechanisms.

What can I use Claude Memory for?

Maintaining user preferences across multiple coding sessions. Recalling specific project context or facts shared in previous conversations. Building a long-term knowledge base of user-specific information. Automating the consolidation of important details from daily chats.

How do I install Claude Memory?

Install Claude Memory by running: docker-compose up -d

What MCP clients work with Claude Memory?

Claude Memory works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Claude Memory docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare