doobidoo/mcp-memory-service
If you are the rightful owner of mcp-memory-service and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
An MCP server providing semantic memory and persistent storage capabilities for Claude Desktop using ChromaDB and sentence transformers.
MCP Memory Service
Production-ready MCP memory service with zero database locks, hybrid backend (fast local + cloud sync), and intelligent memory search for AI assistants. Features v8.9.0 auto-configuration for multi-client access, 5ms local reads with background Cloudflare sync, Natural Memory Triggers with 85%+ accuracy, and OAuth 2.1 team collaboration. Works with Claude Desktop, VS Code, Cursor, Continue, and 13+ AI applications.
๐ Quick Start (2 minutes)
๐ Latest Release: v8.27.1 (Nov 18, 2025)
๐จ CRITICAL HOTFIX: Timestamp Regression ๐ง
- ๐ Fixed timestamp corruption bug -
created_attimestamps no longer reset during metadata sync - ๐ง Affected versions: v8.25.0-v8.27.0 (hybrid backend users with drift detection)
- ๐ก๏ธ Data integrity restored - All timestamp preservation tests passing
- ๐ Recovery tools included - Script to restore timestamps from Cloudflare backup
- โ Zero breaking changes - Drop-in fix for affected installations
If you're on v8.25.0-v8.27.0 with hybrid backend:
# Check for corrupted timestamps
python scripts/validation/validate_timestamp_integrity.py
# Recover from Cloudflare (if needed)
python scripts/maintenance/recover_timestamps_from_cloudflare.py --dry-run
python scripts/maintenance/recover_timestamps_from_cloudflare.py --apply
Previous Releases:
- v8.27.0 - Hybrid Storage Performance (3-5x faster sync, real-time progress, bidirectional sync)
- v8.26.0 - Revolutionary MCP Performance (534,628x faster tools, 90%+ cache hit rate)
- v8.25.0 - Hybrid Backend Drift Detection (automatic metadata sync, bidirectional awareness)
- v8.24.4 - Code Quality Improvements from Gemini Code Assist (regex sanitization, DOM caching)
- v8.24.3 - Test Coverage & Release Agent Improvements (tag+time filtering tests, version history fix)
- v8.24.2 - CI/CD Workflow Fixes (bash errexit handling, exit code capture)
- v8.24.1 - Test Infrastructure Improvements (27 test failures resolved, 63% โ 71% pass rate)
- v8.24.0 - PyPI Publishing Enabled (automated package publishing via GitHub Actions)
- v8.23.1 - Stale Virtual Environment Prevention System (6-layer developer protection)
- v8.23.0 - Consolidation Scheduler via Code Execution API (88% token reduction)
๐ Full Details: | All Releases
# One-command installation with auto-configuration
git clone https://github.com/doobidoo/mcp-memory-service.git
cd mcp-memory-service && python install.py
# Choose option 4 (Hybrid - RECOMMENDED) when prompted
# Installer automatically configures:
# โ
SQLite pragmas for concurrent access
# โ
Cloudflare credentials for cloud sync
# โ
Claude Desktop integration
# Done! Fast local + cloud sync with zero database locks
PyPI Installation (Simplest)
Install from PyPI:
# Install latest version from PyPI
pip install mcp-memory-service
# Or with uv (faster)
uv pip install mcp-memory-service
Then configure Claude Desktop by adding to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or equivalent:
{
"mcpServers": {
"memory": {
"command": "memory",
"args": ["server"],
"env": {
"MCP_MEMORY_STORAGE_BACKEND": "hybrid"
}
}
}
}
For advanced configuration with the interactive installer, clone the repo and run python scripts/installation/install.py.
Developer Setup (Contributing)
For development and contributing, use editable install to ensure source code changes take effect immediately:
# Clone repository
git clone https://github.com/doobidoo/mcp-memory-service.git
cd mcp-memory-service
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# CRITICAL: Editable install (code changes take effect immediately)
pip install -e .
# Verify editable mode (should show source directory, not site-packages)
pip show mcp-memory-service | grep Location
# Expected: Location: /path/to/mcp-memory-service/src
# Start development server
uv run memory server
โ ๏ธ Important: Editable install (-e flag) ensures MCP servers load from source code, not stale site-packages. Without this, source changes won't be reflected until you reinstall the package.
Version Mismatch Check:
# Verify installed version matches source code
python scripts/validation/check_dev_setup.py
See for complete development guidelines.
Traditional Setup Options
Universal Installer (Most Compatible):
# Clone and install with automatic platform detection
git clone https://github.com/doobidoo/mcp-memory-service.git
cd mcp-memory-service
# Lightweight installation (SQLite-vec with ONNX embeddings - recommended)
python install.py
# Add full ML capabilities (torch + sentence-transformers for advanced features)
python install.py --with-ml
# Install with hybrid backend (SQLite-vec + Cloudflare sync)
python install.py --storage-backend hybrid
๐ Installation Options Explained:
- Default (recommended): Lightweight SQLite-vec with ONNX embeddings - fast, works offline, <100MB dependencies
--with-ml: Adds PyTorch + sentence-transformers for advanced ML features - heavier but more capable--storage-backend hybrid: Hybrid backend with SQLite-vec + Cloudflare sync - best for multi-device access
Docker (Fastest):
# For MCP protocol (Claude Desktop)
docker-compose up -d
# For HTTP API + OAuth (Team Collaboration)
docker-compose -f docker-compose.http.yml up -d
Smithery (Claude Desktop):
# Auto-install for Claude Desktop
npx -y @smithery/cli install @doobidoo/mcp-memory-service --client claude
โ ๏ธ v6.17.0+ Script Migration Notice
Updating from an older version? Scripts have been reorganized for better maintainability:
- Recommended: Use
python -m mcp_memory_service.serverin your Claude Desktop config (no path dependencies!) - Alternative 1: Use
uv run memory serverwith UV tooling - Alternative 2: Update path from
scripts/run_memory_server.pytoscripts/server/run_memory_server.py - Backward compatible: Old path still works with a migration notice
โ ๏ธ First-Time Setup Expectations
On your first run, you'll see some warnings that are completely normal:
- "WARNING: Failed to load from cache: No snapshots directory" - The service is checking for cached models (first-time setup)
- "WARNING: Using TRANSFORMERS_CACHE is deprecated" - Informational warning, doesn't affect functionality
- Model download in progress - The service automatically downloads a ~25MB embedding model (takes 1-2 minutes)
These warnings disappear after the first successful run. The service is working correctly! For details, see our .
๐ Python 3.13 Compatibility Note
sqlite-vec may not have pre-built wheels for Python 3.13 yet. If installation fails:
- The installer will automatically try multiple installation methods
- Consider using Python 3.12 for the smoothest experience:
brew install python@3.12 - Alternative: Use Cloudflare backend with
--storage-backend cloudflare - See for details
๐ macOS SQLite Extension Support
macOS users may encounter enable_load_extension errors with sqlite-vec:
- System Python on macOS lacks SQLite extension support by default
- Solution: Use Homebrew Python:
brew install python && rehash - Alternative: Use pyenv:
PYTHON_CONFIGURE_OPTS='--enable-loadable-sqlite-extensions' pyenv install 3.12.0 - Fallback: Use Cloudflare or Hybrid backend:
--storage-backend cloudflareor--storage-backend hybrid - See for details
๐ฏ Memory Awareness in Action
Intelligent Context Injection - See how the memory service automatically surfaces relevant information at session start:
What you're seeing:
- ๐ง Automatic memory injection - 8 relevant memories found from 2,526 total
- ๐ Smart categorization - Recent Work, Current Problems, Additional Context
- ๐ Git-aware analysis - Recent commits and keywords automatically extracted
- ๐ฏ Relevance scoring - Top memories scored at 100% (today), 89% (8d ago), 84% (today)
- โก Fast retrieval - SQLite-vec backend with 5ms read performance
- ๐ Background sync - Hybrid backend syncing to Cloudflare
Result: Claude starts every session with full project context - no manual prompting needed.
๐ Complete Documentation
๐ Visit our comprehensive Wiki for detailed guides:
๐ง v7.1.3 Natural Memory Triggers (Latest)
- Natural Memory Triggers v7.1.3 Guide - Intelligent automatic memory awareness
- โ 85%+ trigger accuracy with semantic pattern detection
- โ Multi-tier performance (50ms instant โ 150ms fast โ 500ms intensive)
- โ CLI management system for real-time configuration
- โ Git-aware context integration for enhanced relevance
- โ Zero-restart installation with dynamic hook loading
๐ v7.0.0 OAuth & Team Collaboration
- ๐ OAuth 2.1 Setup Guide - NEW! Complete OAuth 2.1 Dynamic Client Registration guide
- ๐ Integration Guide - Claude Desktop, Claude Code HTTP transport, VS Code, and more
- ๐ก๏ธ Advanced Configuration - Updated! OAuth security, enterprise features
๐งฌ v8.23.0+ Memory Consolidation
- ๐ Memory Consolidation System Guide - NEW! Automated memory maintenance with real-world performance metrics
- โ Dream-inspired consolidation (decay scoring, association discovery, compression, archival)
- โ 24/7 automatic scheduling (daily/weekly/monthly via HTTP server)
- โ Token-efficient Code Execution API (90% token reduction vs MCP tools)
- โ Real-world performance data (4-6 min for 2,495 memories with hybrid backend)
- โ Three manual trigger methods (HTTP API, MCP tools, Python API)
๐ Setup & Installation
- ๐ Installation Guide - Complete installation for all platforms and use cases
- ๐ฅ๏ธ Platform Setup Guide - Windows, macOS, and Linux optimizations
- โก Performance Optimization - Speed up queries, optimize resources, scaling
๐ง Advanced Topics
- ๐จโ๐ป Development Reference - Claude Code hooks, API reference, debugging
- ๐ง Troubleshooting Guide - Updated! OAuth troubleshooting + common issues
- โ FAQ - Frequently asked questions
- ๐ Examples - Practical code examples and workflows
๐ Internal Documentation
- - 10 months of development metrics, activity patterns, and insights
- - Search enhancement specifications and design documents
- - AI agent instructions, release checklist, refactoring notes
- - Docker, dual-service, and production deployment
- - Storage backends, migration, mDNS discovery
โจ Key Features
๐ Production-Ready Reliability ๐ v8.9.0
- Hybrid Backend - Fast 5ms local SQLite + background Cloudflare sync (RECOMMENDED default)
- Zero user-facing latency for cloud operations
- Automatic multi-device synchronization
- Graceful offline operation
- Zero Database Locks - Concurrent HTTP + MCP server access works flawlessly
- Auto-configured SQLite pragmas (
busy_timeout=15000,cache_size=20000) - WAL mode with proper multi-client coordination
- Tested: 5/5 concurrent writes succeeded with no errors
- Auto-configured SQLite pragmas (
- Auto-Configuration - Installer handles everything
- SQLite pragmas for concurrent access
- Cloudflare credentials with connection testing
- Claude Desktop integration with hybrid backend
- Graceful fallback to sqlite_vec if cloud setup fails
๐ Document Ingestion System v8.6.0
- Interactive Web UI - Drag-and-drop document upload with real-time progress
- Multiple Formats - PDF, TXT, MD, JSON with intelligent chunking
- Document Viewer - Browse chunks, view metadata, search content
- Smart Tagging - Automatic tagging with length validation (max 100 chars)
- Optional semtools - Enhanced PDF/DOCX/PPTX parsing with LlamaParse
- Security Hardened - Path traversal protection, XSS prevention, input validation
- 7 New Endpoints - Complete REST API for document management
๐ Enterprise Authentication & Team Collaboration
- OAuth 2.1 Dynamic Client Registration - RFC 7591 & RFC 8414 compliant
- Claude Code HTTP Transport - Zero-configuration team collaboration
- JWT Authentication - Enterprise-grade security with scope validation
- Auto-Discovery Endpoints - Seamless client registration and authorization
- Multi-Auth Support - OAuth + API keys + optional anonymous access
๐ง Intelligent Memory Management
- Semantic search with vector embeddings
- Natural language time queries ("yesterday", "last week")
- Tag-based organization with smart categorization
- Memory consolidation with dream-inspired algorithms
- Document-aware search - Query across uploaded documents and manual memories
๐ Universal Compatibility
- Claude Desktop - Native MCP integration
- Claude Code - HTTP transport + Memory-aware development with hooks
- ๐ช Windows Support:
/session-startcommand for manual session initialization (workaround for issue #160) - ๐ macOS/Linux: Full automatic SessionStart hooks + slash command
- ๐ช Windows Support:
- VS Code, Cursor, Continue - IDE extensions
- 13+ AI applications - REST API compatibility
๐พ Flexible Storage
- Hybrid ๐ (RECOMMENDED) - Fast local SQLite + background Cloudflare sync (v8.9.0 default)
- 5ms local reads with zero user-facing latency
- Multi-device synchronization
- Zero database locks with auto-configured pragmas
- Automatic backups and cloud persistence
- SQLite-vec - Local-only storage (lightweight ONNX embeddings, 5ms reads)
- Good for single-user offline use
- No cloud dependencies
- Cloudflare - Cloud-only storage (global edge distribution with D1 + Vectorize)
- Network-dependent performance
Note: All heavy ML dependencies (PyTorch, sentence-transformers) are now optional to dramatically reduce build times and image sizes. SQLite-vec uses lightweight ONNX embeddings by default. Install with
--with-mlfor full ML capabilities.
๐ Production Ready
- Cross-platform - Windows, macOS, Linux
- Service installation - Auto-start background operation
- HTTPS/SSL - Secure connections with OAuth 2.1
- Docker support - Easy deployment with team collaboration
- Interactive Dashboard - Web UI at http://127.0.0.1:8888/ for complete management
๐ก Basic Usage
๐ Document Ingestion (v8.6.0+)
# Start server with web interface
uv run memory server --http
# Access interactive dashboard
open http://127.0.0.1:8888/
# Upload documents via CLI
curl -X POST http://127.0.0.1:8888/api/documents/upload \
-F "file=@document.pdf" \
-F "tags=documentation,reference"
# Search document content
curl -X POST http://127.0.0.1:8888/api/search \
-H "Content-Type: application/json" \
-d '{"query": "authentication flow", "limit": 10}'
๐ Team Collaboration with OAuth (v7.0.0+)
# Start OAuth-enabled server for team collaboration
export MCP_OAUTH_ENABLED=true
uv run memory server --http
# Claude Code team members connect via HTTP transport
claude mcp add --transport http memory-service http://your-server:8000/mcp
# โ Automatic OAuth discovery, registration, and authentication
๐ง Memory Operations
# Store a memory
uv run memory store "Fixed race condition in authentication by adding mutex locks"
# Search for relevant memories
uv run memory recall "authentication race condition"
# Search by tags
uv run memory search --tags python debugging
# Check system health (shows OAuth status)
uv run memory health
๐ง Configuration
Claude Desktop Integration
Recommended approach - Add to your Claude Desktop config (~/.claude/config.json):
{
"mcpServers": {
"memory": {
"command": "python",
"args": ["-m", "mcp_memory_service.server"],
"env": {
"MCP_MEMORY_STORAGE_BACKEND": "sqlite_vec"
}
}
}
}
Alternative approaches:
// Option 1: UV tooling (if using UV)
{
"mcpServers": {
"memory": {
"command": "uv",
"args": ["--directory", "/path/to/mcp-memory-service", "run", "memory", "server"],
"env": {
"MCP_MEMORY_STORAGE_BACKEND": "sqlite_vec"
}
}
}
}
// Option 2: Direct script path (v6.17.0+)
{
"mcpServers": {
"memory": {
"command": "python",
"args": ["/path/to/mcp-memory-service/scripts/server/run_memory_server.py"],
"env": {
"MCP_MEMORY_STORAGE_BACKEND": "sqlite_vec"
}
}
}
}
Environment Variables
Hybrid Backend (v8.9.0+ RECOMMENDED):
# Hybrid backend with auto-configured pragmas
export MCP_MEMORY_STORAGE_BACKEND=hybrid
export MCP_MEMORY_SQLITE_PRAGMAS="busy_timeout=15000,cache_size=20000"
# Cloudflare credentials (required for hybrid)
export CLOUDFLARE_API_TOKEN="your-token"
export CLOUDFLARE_ACCOUNT_ID="your-account"
export CLOUDFLARE_D1_DATABASE_ID="your-db-id"
export CLOUDFLARE_VECTORIZE_INDEX="mcp-memory-index"
# Enable HTTP API
export MCP_HTTP_ENABLED=true
export MCP_HTTP_PORT=8000
# Security
export MCP_API_KEY="your-secure-key"
SQLite-vec Only (Local):
# Local-only storage
export MCP_MEMORY_STORAGE_BACKEND=sqlite_vec
export MCP_MEMORY_SQLITE_PRAGMAS="busy_timeout=15000,cache_size=20000"
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ AI Clients โ โ MCP Memory โ โ Storage Backend โ
โ โ โ Service v8.9 โ โ โ
โ โข Claude Desktopโโโโโบโ โข MCP Protocol โโโโโบโ โข Hybrid ๐ โ
โ โข Claude Code โ โ โข HTTP Transportโ โ (5ms local + โ
โ (HTTP/OAuth) โ โ โข OAuth 2.1 Authโ โ cloud sync) โ
โ โข VS Code โ โ โข Memory Store โ โ โข SQLite-vec โ
โ โข Cursor โ โ โข Semantic โ โ โข Cloudflare โ
โ โข 13+ AI Apps โ โ Search โ โ โ
โ โข Web Dashboard โ โ โข Doc Ingestion โ โ Zero DB Locks โ
โ
โ (Port 8888) โ โ โข Zero DB Locks โ โ Auto-Config โ
โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
๐ ๏ธ Development
Project Structure
mcp-memory-service/
โโโ src/mcp_memory_service/ # Core application
โ โโโ models/ # Data models
โ โโโ storage/ # Storage backends
โ โโโ web/ # HTTP API & dashboard
โ โโโ server.py # MCP server
โโโ scripts/ # Utilities & installation
โโโ tests/ # Test suite
โโโ tools/docker/ # Docker configuration
Contributing
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Submit a pull request
See for detailed guidelines.
๐ Support
- ๐ Documentation: Wiki - Comprehensive guides
- ๐ Bug Reports: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ง Troubleshooting: Troubleshooting Guide
- โ
Configuration Validator: Run
python scripts/validation/validate_configuration_complete.pyto check your setup - ๐ Backend Sync Tools: See for CloudflareโSQLite sync
๐ In Production
Real-world metrics from active deployments:
- 1700+ memories stored and actively used across teams
- 5ms local reads with hybrid backend (v8.9.0)
- Zero database locks with concurrent HTTP + MCP access (v8.9.0)
- Tested: 5/5 concurrent writes succeeded
- Auto-configured pragmas prevent lock errors
- <500ms response time for semantic search (local & HTTP transport)
- 65% token reduction in Claude Code sessions with OAuth collaboration
- 96.7% faster context setup (15min โ 30sec)
- 100% knowledge retention across sessions and team members
- Zero-configuration setup success rate: 98.5% (OAuth + hybrid backend)
๐ Recognition
Verified MCP Server
Featured AI Tool
- Production-tested across 13+ AI applications
- Community-driven with real-world feedback and improvements
๐ License
Apache License 2.0 - see for details.
Ready to supercharge your AI workflow? ๐
๐ Start with our Installation Guide or explore the Wiki for comprehensive documentation.
Transform your AI conversations into persistent, searchable knowledge that grows with you.