Searchable local storage for Claude conversation history
Claude Conversation Memory System
A Model Context Protocol (MCP) server that provides searchable local storage for Claude conversation history, enabling context retrieval during current sessions.
Features
- 🔍 Full-text search across conversation history
- 🏷️ Automatic topic extraction and categorization
- 📊 Weekly summaries with insights and patterns
- 🗃️ Organized file storage by date and topic
- ⚡ Fast retrieval with relevance scoring
- 🔌 MCP integration for seamless Claude Desktop access
Quick Start
Prerequisites
- Python 3.11+ (tested with 3.11.12)
- Ubuntu/WSL environment recommended
- Claude Desktop (for MCP integration)
Installation
Option 1: Install with Claude Code (Recommended)
Quick Install - Copy and paste this into Claude Code:
claude mcp add --transport stdio claude-memory -- sh -c "cd $HOME/Code/claude-memory-mcp && python3 src/server_fastmcp.py"
Important: Replace $HOME/Code/claude-memory-mcp with the actual path where you cloned this repository.
Examples for different locations:
# If cloned to ~/Code/claude-memory-mcp (default)
claude mcp add --transport stdio claude-memory -- sh -c "cd $HOME/Code/claude-memory-mcp && python3 src/server_fastmcp.py"
# If cloned to ~/projects/claude-memory-mcp
claude mcp add --transport stdio claude-memory -- sh -c "cd $HOME/projects/claude-memory-mcp && python3 src/server_fastmcp.py"
# If cloned to ~/dev/claude-memory-mcp
claude mcp add --transport stdio claude-memory -- sh -c "cd $HOME/dev/claude-memory-mcp && python3 src/server_fastmcp.py"
What this does:
--transport stdio: Uses standard input/output for local processesclaude-memory: Server identifier name--: Separates Claude CLI flags from the server commandsh -c "cd ... && python3 ...": Changes to project directory before running server
This adds the MCP server to your Claude Desktop configuration automatically.
Documentation: https://code.claude.com/docs/en/mcp
Option 2: Manual Installation
Clone the repository:
git clone https://github.com/yourusername/claude-memory-mcp.git cd claude-memory-mcpSet up virtual environment:
python3 -m venv .venv source .venv/bin/activateInstall dependencies:
pip install -e .This installs the package in editable mode along with all required dependencies:
mcp[cli]>=1.9.2- Model Context Protocoljsonschema>=4.0.0- JSON schema validationaiofiles>=24.1.0- Async file operations
Test the system:
python3 tests/validate_system.py
Basic Usage
Standalone Testing
# Test core functionality
python3 tests/standalone_test.py
MCP Server Mode
# Run as MCP server (from project root)
python3 src/server_fastmcp.py
# Or from src directory
cd src && python3 server_fastmcp.py
Bulk Import
# Import conversations from JSON export
python3 scripts/bulk_import_enhanced.py your_conversations.json
MCP Tools
The system provides three main tools:
`search_conversations(query, limit=5)`
Search through stored conversations by topic or content.
Example:
search_conversations("terraform azure deployment")
search_conversations("python debugging", limit=10)
`add_conversation(content, title, date)`
Add a new conversation to the memory system.
Example:
add_conversation(
content="Discussion about MCP server setup...",
title="MCP Server Configuration",
date="2025-06-01T14:30:00Z"
)
`generate_weekly_summary(week_offset=0)`
Generate insights and patterns from conversations.
Example:
generate_weekly_summary() # Current week
Tools (3)
search_conversationsSearch through stored conversations by topic or content.add_conversationAdd a new conversation to the memory system.generate_weekly_summaryGenerate insights and patterns from conversations.Configuration
{"mcpServers": {"claude-memory": {"command": "python3", "args": ["/path/to/claude-memory-mcp/src/server_fastmcp.py"]}}}