mem0 Memory System

# mem0 MCP Server Installation Guide ✨ **Dream it, Pixel it** ✨ ## Quick Install For a quick automated installation, run: ```bash ./install.sh ``` This script will: 1. Create a Python virtual environment 2. Install all required dependencies 3. Create an activation script for easy environment management ## Installation Options The installer provides three installation methods: 1. **pip** (default) - Standard Python package installer 2. **uv** - Faster Python package installer 3. **conda** - Anaconda package manager (uses environment.yml) Choose the option that best fits your workflow. ## Manual Installation If you prefer to install manually, follow these steps: ### Using pip ```bash # Create a virtual environment python3 -m venv .venv # Activate the environment source .venv/bin/activate # Install dependencies pip install -r requirements.txt ``` ### Using uv ```bash # Install uv if you don't have it pip install uv # Create a virtual environment uv venv .venv # Activate the environment source .venv/bin/activate # Install dependencies uv pip install -r requirements.txt ``` ### Using conda ```bash # Create a conda environment from environment.yml conda env create -f environment.yml # Activate the environment conda activate mem0-mcp ``` ## Environment Variables Copy the example environment file and update it with your API keys: ```bash cp .env.example .env ``` Edit the `.env` file with your preferred text editor and add your API keys and configuration: ```shell # Provider API Keys OPENAI_API_KEY=your_openai_api_key ANTHROPIC_API_KEY=your_anthropic_api_key GOOGLE_API_KEY=your_google_api_key # Application Settings APP_NAME=Memory App # Ollama Settings (for local models) OLLAMA_BASE_URL=http://localhost:11434 OLLAMA_MODEL=phi4 # or any other model you have installed # Server Settings MEM0_DATA_DIR=./memory_data MEM0_PROVIDER=ollama MEM0_EMBEDDING_PROVIDER=ollama ``` ## Starting the Server After installation, activate your environment and start the server: ```bash # Activate the environment source ./activate_mem0.sh # Start the server python server.py ``` ## Running the Example To run the auto memory example: ```bash # Activate the environment source ./activate_mem0.sh # Run the example python auto_memory_example.py ``` ## Troubleshooting ### Missing Module Error If you encounter a "No module named 'mem0'" or "No module named 'mem0ai'" error: 1. Make sure you've activated the virtual environment 2. Try reinstalling the dependencies: ```bash pip install -r requirements.txt --force-reinstall ``` ### Conda Environment Issues If you're using conda and encounter issues: 1. Make sure the environment was created correctly: ```bash conda env list ``` 2. If the environment exists but has issues, try recreating it: ```bash conda env remove -n mem0-mcp conda env create -f environment.yml ``` ### Ollama Connection Issues If you're using Ollama and encounter connection issues: 1. Make sure Ollama is running: ```bash curl http://localhost:11434/api/version ``` 2. Check that you have the required models installed: ```bash curl http://localhost:11434/api/tags ``` 3. Install missing models if needed: ```bash ollama pull nomic-embed-text ollama pull phi4 ``` Made with ❤️ by Pink Pixel