-
-
Notifications
You must be signed in to change notification settings - Fork 101
08 FAQ
Common questions and answers about MCP Memory Service usage, configuration, and troubleshooting.
- General Questions
- Installation & Setup
- Performance & Scaling
- Claude Code Integration
- Troubleshooting
MCP Memory Service is a Model Context Protocol server that provides semantic memory and persistent storage capabilities for AI assistants like Claude. It allows you to store, search, and retrieve information across conversations and sessions.
- SQLite-vec (recommended): Fast, single-file database perfect for individual use
- ChromaDB: Great for multi-client scenarios and team collaboration
- Cloudflare: Production-ready distributed storage for enterprise use
MCP Memory Service uses sentence transformers to convert your content into vector embeddings. When you search, it finds semantically similar content, not just exact text matches. This means searching for "authentication issues" will also find memories about "login problems" or "JWT errors."
Yes! MCP Memory Service implements the standard Model Context Protocol, so it works with any MCP-compatible client. It also provides REST APIs for custom integrations.
Yes. Data is stored locally by default (SQLite-vec backend), or in your chosen infrastructure (ChromaDB, Cloudflare). The service supports HTTPS, API key authentication, and you have full control over your data.
- Python: 3.10+ (with sentence-transformers support)
- Memory: 2GB+ recommended for embedding models
- Disk Space: Varies by usage (~1GB for 100K memories)
- OS: Windows, macOS, Linux supported
No, but it helps. MCP Memory Service automatically detects and uses:
- CUDA (NVIDIA GPUs)
- MPS (Apple Silicon M1/M2)
- DirectML (Windows GPU acceleration)
- CPU fallback for systems without GPU support
# Export from current backend
python scripts/export_memories.py --format json > backup.json
# Switch backend in config
export MCP_MEMORY_STORAGE_BACKEND=sqlite_vec
# Import to new backend
python scripts/import_memories.py --file backup.json
Yes! Enable the HTTP server and configure for multi-client access:
export MCP_HTTP_ENABLED=true
export MCP_HTTPS_ENABLED=true
export MCP_HTTP_PORT=8443
export MCP_MEMORY_STORAGE_BACKEND=chroma # Better for multi-client
Performance varies by backend:
- SQLite-vec: ~5ms average
- ChromaDB: ~15ms average
- Cloudflare: Network dependent
- Base service: ~500MB
- Embedding models: ~1GB
- Memory cache: ~200MB per 1000 memories
- Total: 2GB typical for active development use
Yes, configure resource limits:
export MCP_MAX_MEMORY_MB=2048
export MCP_MAX_CONCURRENT_OPERATIONS=10
export MCP_EMBEDDING_BATCH_SIZE=50
- Use appropriate result limits in searches
- Implement memory cleanup routines
- Consider database partitioning for >1M memories
- Monitor performance with built-in metrics
- Download the hook system from the MCP Memory Service repository
- Configure
claude-hooks/config.json
with your settings - Test with
node test-hooks.js
- Start using Claude Code normally
Check these common issues:
- Memory service not running:
curl -k https://localhost:8443/api/health
- Hook configuration error: Check
claude-hooks/config.json
- Project not detected: Verify git repository and package files
- No memories found: Check if you have relevant memories stored
The algorithm uses four factors:
- Time decay (25%): Recent memories weighted higher
- Tag relevance (35%): Project and technology tag matches
- Content relevance (15%): Semantic similarity to current context
- Conversation relevance (25%): Related to ongoing conversation
Yes! Configure in claude-hooks/config.json
:
{
"memoryService": {
"maxMemoriesPerSession": 8,
"minRelevanceScore": 0.3
},
"memoryScoring": {
"weights": {
"timeDecay": 0.25,
"tagRelevance": 0.35,
"contentRelevance": 0.15,
"conversationRelevance": 0.25
}
}
}
Common causes:
-
Port conflict: Check if port 8443 is in use
netstat -tlnp | grep 8443
-
Missing dependencies: Reinstall with
python install.py
-
Python version: Requires Python 3.10+
python --version
- Disk space: Ensure sufficient space for models and data
Troubleshooting steps:
-
Check if memories exist:
curl -k "https://localhost:8443/api/memories/count"
- Try exact text search: Use quotes for exact matching
-
Check tag search:
search_by_tags(["your-tag"])
- Verify embedding model: Check if sentence transformers loaded correctly
This typically happens with SQLite-vec under high load:
# Enable WAL mode for better concurrent access
sqlite3 your_db.db "PRAGMA journal_mode=WAL;"
# Check for hanging connections
lsof | grep your_db.db
# Restart service if needed
systemctl restart mcp-memory-service
Solutions:
-
Reduce cache sizes:
export MCP_EMBEDDING_CACHE_SIZE=500 export MCP_QUERY_CACHE_SIZE=50
-
Enable garbage collection:
import gc gc.collect() # Add to periodic maintenance
-
Implement memory cleanup:
# Remove old temporary memories python scripts/cleanup_memories.py --older-than 30 --tag temporary
Debug checklist:
-
Verify hook installation:
node claude-hooks/test-hooks.js
-
Check Claude Code CLI version:
claude --version # Should be recent version
-
Test memory service connection:
curl -k https://localhost:8443/api/health
-
Enable debug logging:
{ "logging": { "level": "debug", "enableDebug": true, "logToFile": true } }
Optimization steps:
- Check backend choice: SQLite-vec is fastest for single users
- Optimize search queries: Use specific terms, not vague searches
- Limit result sizes: Don't retrieve more than you need
- Enable hardware acceleration: GPU/MPS if available
-
Monitor resource usage:
htop # Check CPU and memory usage iotop # Check disk I/O
Network troubleshooting:
- Check firewall: Ensure port 8443 is open
-
Verify HTTPS certificates: Use
-k
flag for self-signed -
Test connectivity:
telnet your-server 8443
-
Check DNS resolution:
nslookup your-server
Common solutions:
-
JSON format validation:
python -m json.tool < export.json
- Check file permissions: Ensure read/write access
- Memory limits: Large imports may need increased memory
- Backup before import: Always backup existing data
If you're still having issues:
- Check the Troubleshooting Guide
- Search existing GitHub issues
- Create a new issue with:
- Operating system and Python version
- Configuration files (remove sensitive data)
- Error logs and stack traces
- Steps to reproduce the problem
- Regular maintenance: Weekly cleanup and optimization
- Monitor resources: Keep an eye on memory and disk usage
- Backup data: Regular exports of important memories
- Update regularly: Keep service and dependencies updated
- Use appropriate backends: Choose based on your use case