All How-To Guides

4 Ways to Give Claude Memory

How to give Claude memory?

4 MCP servers featured

Claude's context window resets between sessions, but MCP servers can provide persistent memory through knowledge graphs, vector stores, and RAG systems. This lets Claude remember past conversations, access your knowledge base, and maintain context across sessions. Here are the best options for adding memory.

Recommended MCP Servers

Mem0 MCP

mem0ai/mem0-mcp

>1k

Memory manager for AI apps and agents using various graph and vector stores with ingestion from 30+ data sources.

Key Features

  • Graph and vector store support
  • 30+ data source ingestion
  • Persistent memory across sessions
  • Semantic search capabilities

Installation

pip install mem0-mcp

Mem0 is purpose-built for giving AI agents memory. It combines graph and vector storage, ingests from dozens of sources, and provides semantic search. The go-to choice for building agents that remember everything.

Best for: Full-featured persistent memory View on GitHub

ApeRAG

apecloud/ApeRAG

>500

Production-ready RAG platform combining Graph RAG, vector search, and full-text search for knowledge graphs and context engineering.

Key Features

  • Graph RAG + vector search
  • Full-text search support
  • Knowledge graph building
  • Production-ready architecture

Installation

See GitHub for deployment options

ApeRAG is a serious RAG platform for organizations that need production-grade knowledge management. It combines multiple search strategies (graph, vector, full-text) for comprehensive retrieval. Best for building your own knowledge graph.

Best for: Building knowledge graphs View on GitHub

Neo4j MCP

neo4j-labs/neo4j-mcp

>400

Neo4j integration for knowledge graph memory with query support and Aura instance management.

Key Features

  • Knowledge graph storage
  • Cypher query support
  • Neo4j Aura integration
  • Relationship-based memory

Installation

npx neo4j-mcp

Neo4j MCP brings the power of graph databases to Claude's memory. Perfect for storing and querying relationship-heavy knowledge where connections between concepts matter as much as the concepts themselves.

Best for: Relationship-heavy knowledge View on GitHub

Memory Server (Anthropic)

anthropics/mcp-server-memory

>2k

Official Anthropic MCP server for persistent memory storage using a simple key-value approach.

Key Features

  • Simple key-value storage
  • Official Anthropic support
  • Lightweight and fast
  • File-based persistence

Installation

npx @modelcontextprotocol/server-memory

The official memory server from Anthropic provides simple, reliable memory storage. It's not as feature-rich as Mem0 or ApeRAG, but it's officially supported and perfect for basic persistent memory needs.

Best for: Basic persistent memory View on GitHub

Quick Comparison

MCPStarsBest ForProsCons
Mem0>1kFull memory system30+ data sourcesMore complex setup
ApeRAG>500Knowledge graphsEnterprise-gradeRequires deployment
Neo4j MCP>400Relationship dataGraph queriesNeo4j dependency
Memory Server>2kSimple memoryOfficial supportBasic features

Getting Started

To give Claude memory:

  1. For simple persistent memory, use the official Memory Server:

    npx @modelcontextprotocol/server-memory
    
  2. For full-featured memory, install Mem0:

    pip install mem0-mcp
    
  3. Configure Claude Code to use the memory server and start building persistent context.

Example prompt: "Remember that my preferred coding style is functional programming and I work primarily in TypeScript."

Related Guides