Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Claude Conversation Memory Systemsearch my history for what we discussed about the project architecture"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Code Quality
Overall Scorecard
Code Quality
Security
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:
Important: Replace $HOME/Code/claude-memory-mcp with the actual path where you cloned this repository.
Examples for different locations:
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
MCP Server Mode
Bulk Import
MCP Tools
The system provides three main tools:
search_conversations(query, limit=5)
Search through stored conversations by topic or content.
Example:
add_conversation(content, title, date)
Add a new conversation to the memory system.
Example:
generate_weekly_summary(week_offset=0)
Generate insights and patterns from conversations.
Example:
Architecture
Configuration
Claude Desktop Integration
Add to your Claude Desktop MCP config:
Storage Location
Default storage: ~/claude-memory/
Override with environment variable:
Logging Configuration
Log Format
Switch between human-readable text logs (default) and structured JSON logs for production:
JSON Log Example:
JSON logging is ideal for:
Production deployments with log aggregation (Datadog, ELK, CloudWatch)
Automated monitoring and alerting
Structured log analysis and querying
Performance tracking and debugging
See docs/json-logging.md for detailed JSON logging documentation.
File Structure
Performance
Performance validated through automated benchmarks:
Search Speed: 0.05s average (159 conversations)
Capacity: Tested with 159 conversations (7.8MB)
Memory Usage: 40MB peak during operations
Accuracy: 80%+ search relevance
Write Performance: 1-12MB/s throughput
Last benchmarked: June 2025 |
Note for Developers: The development team uses performance benchmarks that create a ~/claude-memory-test directory for isolated testing. Normal MCP usage does NOT create this directory - it only uses ~/claude-memory/. If you see ~/claude-memory-test, it was created by running development scripts and can be safely deleted.
Search Examples
Development
Adding New Features
Topic Extraction: Modify
_extract_topics()inConversationMemoryServerSearch Algorithm: Enhance
search_conversations()methodSummary Generation: Improve
generate_weekly_summary()logic
Testing
Test Data Storage (Developers Only): If you run performance benchmarks or test data generators, they create a ~/claude-memory-test directory to isolate test data from your production ~/claude-memory directory. This is only for development/testing - normal MCP usage does not create this directory.
To clean up test data after running benchmarks:
Or using the Makefile cleanup target:
Troubleshooting
Common Issues
MCP Import Errors:
Search Returns No Results:
Check conversation indexing:
ls ~/claude-memory/conversations/index.jsonVerify file permissions
Run validation:
python3 tests/validate_system.py
Weekly Summary Timezone Errors:
Ensure all datetime objects use consistent timezone handling
Recent fix addresses timezone-aware vs naive comparison
System Requirements
Python: 3.11+ (tested with 3.11.12)
Disk Space: ~10MB per 100 conversations
Memory: <100MB RAM usage
OS: Ubuntu/WSL recommended, macOS/Windows compatible
Contributing
Fork the repository
Create a feature branch:
git checkout -b feature-nameCommit changes:
git commit -am 'Add feature'Push to branch:
git push origin feature-nameSubmit a Pull Request
License
MIT License - see LICENSE file for details
Acknowledgments
Built with Model Context Protocol (MCP)
Designed for Claude Desktop integration
Inspired by the need for persistent conversation context
Status: Production ready ā
Last Updated: June 2025
Version: 1.0.0