Claude Conversation Memory System
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.
Universal Memory MCP ā AI Conversation Memory
A Model Context Protocol (MCP) server that provides persistent, searchable conversation memory across multiple AI platforms. Store, search, and retrieve conversation history with fast full-text search powered by SQLite FTS5.
Features
š Fast full-text search via SQLite FTS5 with relevance ranking ā ~10x faster than a linear scan (measured)
š·ļø Automatic topic extraction ā 574+ unique topics across 2,000+ associations
š Weekly summaries with insights and patterns
šļø Organized file storage by date and topic
š¤ Multi-platform support ā Claude, ChatGPT, Cursor AI, and custom formats
š MCP integration for Claude Desktop and Claude Code
Related MCP server: Claude Memory MCP
Quick Start
Prerequisites
Python 3.10+ (CI runs 3.14)
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/universal-memory-mcp && python3 src/server_fastmcp.py"Important: Replace $HOME/Code/universal-memory-mcp with the actual path where you cloned this repository.
Examples for different locations:
# If cloned to ~/Code/universal-memory-mcp (default)
claude mcp add --transport stdio claude-memory -- sh -c "cd $HOME/Code/universal-memory-mcp && python3 src/server_fastmcp.py"
# If cloned to ~/projects/universal-memory-mcp
claude mcp add --transport stdio claude-memory -- sh -c "cd $HOME/projects/universal-memory-mcp && python3 src/server_fastmcp.py"
# If cloned to ~/dev/universal-memory-mcp
claude mcp add --transport stdio claude-memory -- sh -c "cd $HOME/dev/universal-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/adamkwhite/universal-memory-mcp.git cd universal-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
MCP Server Mode
# Run as MCP server (from project root)
python3 src/server_fastmcp.py
# Or from src directory
cd src && python3 server_fastmcp.pyBulk Import
# Import conversations from JSON export
python3 scripts/bulk_import_enhanced.py your_conversations.jsonMCP Tools
search_conversations(query, limit=5)
Full-text search across all stored conversations with relevance ranking.
search_by_topic(topic, limit=10)
Find conversations tagged with a specific topic.
add_conversation(content, title, date)
Store a new conversation with automatic topic extraction and FTS indexing.
generate_weekly_summary(week_offset=0)
Generate insights and patterns from recent conversations.
get_search_stats()
View search engine statistics ā index size, topic counts, and engine status.
update_conversation(conversation_id, content=None, title=None, add_tags=None, remove_tags=None, set_tags=None, conversation_type=None, session_id=None, user_id=None, change_note=None)
Update fields on an existing conversation in place. Pass conversation_id plus any subset of fields to change; unspecified fields are left alone. The first line of the stored content is rewritten with a self-documenting audit line ā [update <iso-timestamp> ā <change_note>] ā chained across repeated updates. If change_note is omitted, it's auto-derived from which fields changed.
Tag operations: set_tags replaces the full tag list and is mutually exclusive with add_tags/remove_tags (pass set_tags=[] to clear all tags); add_tags/remove_tags mutate the existing list.
Returns a status string. On success: Status: success plus a summary message and the audit line. On failure (malformed ID, conversation not found, no changes provided, conflicting tag ops, or an I/O error): Status: error plus a message describing the problem.
search_by_tag(tag, limit=10)
Find conversations tagged with a specific tag ā a universal metadata field populated by importers or set via update_conversation (e.g. starred, archived, workspace:my-project). Exact match, case-sensitive. Requires SQLite FTS to be enabled; without it, returns an error message.
search_by_session_id(session_id, limit=10)
Find all conversations sharing a session_id, useful for reconstructing a multi-turn session that spans several stored conversation records (e.g. a Cursor working session, a Claude thread continued across days). Results are sorted chronologically (oldest first). Requires SQLite FTS to be enabled; without it, returns an error message.
search_by_conversation_type(conversation_type, limit=10)
Find conversations by conversation_type (e.g. chat, code, analysis). Exact match, most recent first. Requires SQLite FTS to be enabled; without it, returns an error message.
Architecture
~/claude-memory/
āāā conversations/
ā āāā 2025/
ā ā āāā 06-june/
ā ā āāā 2025-06-01_topic-name.md
ā āāā index.json # Search index
ā āāā topics.json # Topic frequency
āāā summaries/
āāā weekly/
āāā week-2025-06-01.mdConfiguration
Claude Desktop Integration
Add to your Claude Desktop MCP config:
{
"mcpServers": {
"claude-memory": {
"command": "python",
"args": ["/absolute/path/to/universal-memory-mcp/src/server_fastmcp.py"],
"cwd": "/absolute/path/to/universal-memory-mcp"
}
}
}Configuration Precedence
Settings are resolved by src/config.py's Config.load(), consulted in this
order (highest wins):
Environment variables (
CLAUDE_MEMORY_*/CLAUDE_MCP_*)Config file (default
~/.claude-memory/config.json)Platform profile (
default,claude,chatgpt, orcursorā selects a partial set of defaults, e.g.log_format)Built-in defaults
Environment Variables
Variable | Purpose | Default |
| Conversation storage directory |
|
| Set | unset (SQLite enabled) |
| Log output format: |
|
| Log level: |
|
| Enable/disable SQLite FTS search (boolean: |
|
| Echo logs to stdout in addition to the log file (boolean) |
|
| Platform profile to apply: |
|
When CLAUDE_MEMORY_PATH is set explicitly, the path may live outside your
home directory (e.g. a separate data drive on Windows: D:\claude-memory).
Paths that are not explicitly configured are still restricted to the home
or project directory for safety.
Config File
As an alternative to environment variables, settings can be placed in
~/.claude-memory/config.json. The file is optional ā a missing file falls
back to platform-profile/built-in defaults. Example:
{
"storage_path": "~/claude-memory",
"log_format": "json",
"log_level": "INFO",
"enable_sqlite": true,
"console_output": false,
"platform_profile": "default"
}Unknown keys in the file raise a configuration error rather than being silently ignored. Environment variables still override anything set here.
Disabling SQLite
SQLite FTS5 search is enabled by default. On platforms where SQLite/FTS5 is unavailable (e.g. some Windows Python builds), disable it to fall back to JSON-based linear search:
export CLAUDE_MEMORY_DISABLE_SQLITE=trueLogging Configuration
Log Format
Switch between human-readable text logs (default) and structured JSON logs for production:
# JSON format (for production log aggregation)
export CLAUDE_MCP_LOG_FORMAT=json
# Text format (default, for development)
export CLAUDE_MCP_LOG_FORMAT=textJSON Log Example:
{
"timestamp": "2025-01-15T10:30:45",
"level": "INFO",
"logger": "claude_memory_mcp",
"function": "add_conversation",
"line": 145,
"message": "Added conversation successfully",
"context": {
"type": "performance",
"duration_seconds": 0.045,
"conversation_id": "conv_abc123"
}
}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
universal-memory-mcp/
āāā src/
ā āāā server_fastmcp.py # Main MCP server
ā āāā conversation_memory.py # Core memory engine + SQLite FTS5
ā āāā format_detector.py # Auto-detect AI platform format
ā āāā validators.py # Input validation
ā āāā logging_config.py # Structured logging (text/JSON)
ā āāā importers/ # Platform-specific importers
ā ā āāā chatgpt_importer.py
ā ā āāā claude_importer.py
ā ā āāā cursor_importer.py
ā ā āāā generic_importer.py
ā āāā schemas/ # JSON schema validation
āāā tests/ # 435 tests, 98.68% coverage
āāā data/ # Consolidated app data
āāā scripts/ # Import and utility scripts
āāā docs/ # DocumentationPerformance
scripts/benchmark_search.py was broken (unawaited async calls, measuring
coroutine construction instead of real search time) from October 2025 until
this was found and fixed. The previous numbers below were never actually
measured and have been replaced with real ones. Reproduce with:
python scripts/generate_test_data.py --conversations 159
python scripts/benchmark_search.py --storage-path ~/claude-memory-test --iterations 5Measured on a 159-conversation / 7.7MB local dataset (WSL2, Python 3.12) ā treat as order-of-magnitude, not a precise SLA, results vary by machine:
Search Speed (SQLite FTS5): mean 15ā18ms, median 10ā13ms per query, range 0.5ā82ms across 12 query types (was claimed 0.2ā0.5ms; that figure was never measured)
Search vs. linear JSON scan: SQLite FTS5 is ~10x faster (mean 14.7ms vs 154.2ms; median 10.5ms vs 152.0ms) ā the old "4.4x" claim had the right direction but was also never actually measured
Topic Search: mean 3.4ms, median 2.5ms (was claimed 0.3ā0.4ms; that figure was never measured)
Write Speed: mean 14ms, median 14ms per ~49KB conversation, SQLite indexing included (was claimed ~33ms; that figure was never measured)
Capacity: 371 conversations in production use over 10 months
Test Coverage: 98.68% (435 tests) ā 0 code smells, 0 security hotspots (SonarCloud verified)
Last benchmarked: July 2026 | Detailed Report
Note for Developers: Performance benchmarks create a ~/claude-memory-test directory for isolated testing. Normal MCP usage only uses ~/claude-memory/. If you see ~/claude-memory-test, it can be safely deleted.
Search Examples
# Technical topics
search_conversations("terraform azure")
search_conversations("mcp server setup")
search_conversations("python debugging")
# Project discussions
search_conversations("interview preparation")
search_conversations("product management")
search_conversations("architecture decisions")
# Specific problems
search_conversations("dependency issues")
search_conversations("authentication error")
search_conversations("deployment configuration")Development
Adding New Features
Topic Extraction: Modify
_extract_topics()inConversationMemoryServerSearch Algorithm: Enhance
search_conversations()methodSummary Generation: Improve
generate_weekly_summary()logic
Testing
# Run validation suite
python3 tests/validate_system.py
# Run full test suite with coverage
python3 -m pytest tests/ --cov=src --cov-report=term
# Import test data
python3 scripts/bulk_import_enhanced.py test_data.json --dry-runTest 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:
rm -rf ~/claude-memory-testOr using the Makefile cleanup target:
make clean-test-dataTroubleshooting
Common Issues
MCP Import Errors:
pip install mcp[cli] # Include CLI extrasSearch 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.10+ (CI runs 3.14)
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: April 2026 Version: 2.0.0
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that makes Claude Code conversation history searchable and proactively useful by indexing past sessions with hybrid BM25+TF-IDF search, extracting decisions and solutions, and auto-injecting relevant project context at session start.9765MIT
- FlicenseAqualityDmaintenanceA lightweight MCP server that provides Claude Desktop with persistent memory across conversations by storing, summarizing, and retrieving conversation history.3
- Alicense-qualityDmaintenanceAn MCP server that gives Claude persistent memory by storing conversation context, entities, and enabling semantic search across sessions.201MIT
- Alicense-qualityDmaintenanceAn MCP server that enables semantic and keyword search over Claude Code conversation history stored locally, using hybrid search, local embeddings, and time-decay scoring.23MIT
Related MCP Connectors
Hosted MCP memory: save sessions/decisions once, search from Claude, Cursor, ChatGPT. EU-hosted FTS.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Cloud-hosted MCP server for durable AI memory
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/adamkwhite/universal-memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server