TL;DR:
MCP Memory Service is a powerful memory management system that integrates with Claude Desktop and Claude Code. This tutorial covers the complete installation process specifically for GNU/Linux systems (Ubuntu 18.04+, Debian, and derivatives), including prerequisites, installation steps, configuration, and troubleshooting.
Prerequisites
Before installing MCP Memory Service, ensure your system meets these requirements:
System Requirements
- Operating System: Ubuntu 18.04 or newer, Debian 10+, or equivalent GNU/Linux distributions
- Python: Version 3.10 or newer (3.11+ recommended for optimal performance)
- Memory: Minimum 4GB RAM (8GB+ recommended for better performance)
- Storage: At least 2GB free disk space
- Architecture: x86_64 (AMD64) or ARM64
Required Dependencies
The installer will handle most dependencies automatically, but you’ll need basic system packages:
sudo apt updatesudo apt install python3.10 python3.10-venv python3-pip git curlInstallation
Method 1: Universal Installer (Recommended)
The fastest way to install MCP Memory Service on GNU/Linux:
# Clone the repositorygit clone https://github.com/doobidoo/mcp-memory-service.gitcd mcp-memory-service
# Run the universal installerpython3 install.pyThe installer will:
- Detect your GNU/Linux distribution
- Install optimal dependencies
- Configure SQLite-vec backend (recommended for Linux)
- Set up environment variables
- Generate a secure API key
- Optionally install as a system service
Method 2: Manual Installation
If you prefer manual control:
# Install system dependenciessudo apt updatesudo apt install python3.10 python3.10-venv python3-pip git build-essential
# Clone and setupgit clone https://github.com/doobidoo/mcp-memory-service.gitcd mcp-memory-service
# Create virtual environment (optional but recommended)python3 -m venv venvsource venv/bin/activate
# Install Python dependenciespip install -e .Advanced Installation Options
GPU Acceleration (Optional)
For systems with NVIDIA GPUs:
python3 install.py --cudaFor AMD GPUs with ROCm support:
python3 install.py --rocmSystem Service Installation
To run MCP Memory Service as a background service that starts automatically:
# Install as system servicesudo python3 install.py --service
# Or install manually after regular installationsudo python3 scripts/install_service.pyDocker Service Installation
For containerized deployment using Docker:
Prerequisites
Ensure Docker and Docker Compose are installed:
# Install Dockersudo apt updatesudo apt install docker.io docker-composesudo systemctl start dockersudo systemctl enable docker
# Add user to docker group (optional, avoids sudo)sudo usermod -aG docker $USER# Logout and login again for group changes to take effectQuick Docker Setup
For MCP Protocol integration (Claude Desktop/VS Code):
# Clone the repository (if not already done)git clone https://github.com/doobidoo/mcp-memory-service.gitcd mcp-memory-service
# Start with Docker Composedocker-compose up -dFor HTTP API access (REST API/Web Dashboard):
# Start with HTTP API enableddocker-compose -f docker-compose.http.yml up -d
# Verify the service is runningcurl http://localhost:8000/api/healthDocker Configuration
Create a .env file in the project directory for customization:
# Storage backend (SQLite-vec recommended for Docker)MCP_MEMORY_STORAGE_BACKEND=sqlite_vec
# HTTP API settingsMCP_HTTP_ENABLED=trueMCP_HTTP_PORT=8000
# Security (generate a secure key)MCP_API_KEY=your-secure-api-key-here
# Optional: Enable HTTPSMCP_HTTPS_ENABLED=trueDocker Service Management
# Start the servicedocker-compose up -d
# Stop the servicedocker-compose down
# View logsdocker-compose logs -f
# Restart the servicedocker-compose restart
# Update the servicedocker-compose pull && docker-compose up -dDocker with GPU Support
For GPU acceleration in Docker:
# NVIDIA GPUdocker-compose -f docker-compose.gpu.yml up -d
# AMD GPU (ROCm)docker-compose -f docker-compose.rocm.yml up -dConfiguration
Storage Backend Selection
MCP Memory Service supports multiple storage backends. For GNU/Linux, SQLite-vec is recommended:
# Set environment variableexport MCP_MEMORY_STORAGE_BACKEND=sqlite_vecOther options:
- ChromaDB: For multi-client setups
- Cloudflare: For production deployments
Essential Environment Variables
Create a .env file or export these variables:
# Storage configurationexport MCP_MEMORY_STORAGE_BACKEND=sqlite_vec
# HTTP API (optional)export MCP_HTTP_ENABLED=trueexport MCP_HTTP_PORT=8000
# Securityexport MCP_API_KEY="$(openssl rand -base64 32)"
# Performance tuningexport MAX_RESULTS_PER_QUERY=10export SIMILARITY_THRESHOLD=0.7Configuration Files
Configuration is stored in ~/.mcp_memory_service/:
- Service config:
service_config.json - Logs:
logs/directory - Data: Platform-specific storage location
Service Management
Systemd Service Commands
# Start the servicesystemctl --user start mcp-memory
# Stop the servicesystemctl --user stop mcp-memory
# Check statussystemctl --user status mcp-memory
# Restart the servicesystemctl --user restart mcp-memory
# Enable auto-start on bootsystemctl --user enable mcp-memory
# View logsjournalctl --user -u mcp-memory -fManual Service Management
If not using systemd:
# Start manuallyuv run memory server
# Or with HTTP APIuv run memory server --httpVerification and Testing
Basic Functionality Test
# Verify environmentpython3 scripts/verify_environment.py
# Test memory operationsuv run memory store "Test memory for GNU/Linux installation"uv run memory recall "test installation"uv run memory healthHTTP API Testing (if enabled)
# Health checkcurl -k https://localhost:8000/api/health
# Store a memory via APIcurl -k -X POST https://localhost:8000/api/memories \ -H "Content-Type: application/json" \ -d '{"content": "API test memory from GNU/Linux"}'
# Search memoriescurl -k -X POST https://localhost:8000/api/search \ -H "Content-Type: application/json" \ -d '{"query": "GNU/Linux"}'Integration with Claude
Claude Desktop Integration
After installation, configure Claude Desktop by editing ~/.claude/config.json:
{ "mcpServers": { "memory": { "command": "uv", "args": ["--directory", "/path/to/mcp-memory-service", "run", "memory", "server"], "env": { "MCP_MEMORY_STORAGE_BACKEND": "sqlite_vec" } } }}Replace /path/to/mcp-memory-service with your actual installation path.
Claude Code Integration
For developers using Claude Code:
# Install with Claude Code supportpython3 install.py --claude-code
# Install memory awareness hookspython3 scripts/install_claude_hooks.pyTroubleshooting
Common Issues
Permission Errors During Installation:
# Use virtual environmentpython3 -m venv venvsource venv/bin/activatepython3 install.pyPort Already in Use:
# Change the default portexport MCP_HTTP_PORT=8001Service Won’t Start:
# Check systemd logsjournalctl --user -u mcp-memory -n 50
# Verify configurationpython3 scripts/verify_environment.pyPython Version Issues:
# Check Python versionpython3 --version
# Install specific version if neededsudo apt install python3.11 python3.11-venvDependency Installation Failures:
# Update pip and reinstallpip install --upgrade pippip install --force-reinstall -e .Performance Optimization
For better performance on GNU/Linux:
# Enable mDNS service discoveryexport MCP_MDNS_ENABLED=true
# Adjust similarity thresholdexport SIMILARITY_THRESHOLD=0.8
# Increase results per queryexport MAX_RESULTS_PER_QUERY=20Next Steps
After successful installation:
- Test Integration: Verify MCP Memory Service works with Claude Desktop
- Explore Features: Try different storage backends and configurations
- Monitor Performance: Use the health check endpoint regularly
- Backup Data: Set up regular backups of your memory data
- Update Regularly: Keep MCP Memory Service updated with
git pull && pip install -e .
Getting Help
- Documentation: MCP Memory Service Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
This tutorial focuses exclusively on GNU/Linux installations while covering all essential aspects from the official guide.
