Solutions for common MemoryGraph issues.
# Check installation
which memorygraph
memorygraph --version
# Verify configuration
memorygraph --show-config
# Run health check (v0.9.0+)
memorygraph --health
# Health check with JSON output for scripting
memorygraph --health --health-json
# Check MCP status in Claude Code
claude mcp listThe health check command provides comprehensive diagnostics:
memorygraph --healthOutput:
- Status: ✅ Healthy or ❌ Unhealthy
- Backend: Type of backend (sqlite, neo4j, etc.)
- Connected: Whether the backend is accessible
- Version: Backend version (if available)
- Statistics: Memory count and other metrics
- Database Size: Size of the database file (SQLite)
- Error: Detailed error message if unhealthy
Exit codes:
0- Healthy (backend connected and operational)1- Unhealthy (connection failed or error detected)
Common health check failures:
# Timeout (backend not responding)
Error: Health check timed out after 5.0 seconds
# Solution: Check if backend is running, increase timeout with --health-timeout 10.0
# Connection refused (backend not accessible)
Error: Connection refused
# Solution: Verify backend is running and credentials are correct
# Database locked (SQLite)
Error: database is locked
# Solution: Close other connections or kill stale processes# If using pipx
pipx ensurepath
# Then restart your terminal
# If using pip, check if Python bin is in PATH
python3 -m pip show memorygraphMCP | grep Location
# Find the executable
python3 -c "import shutil; print(shutil.which('memorygraph') or 'Not in PATH')"
# Option 1: Add to PATH (bash)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Option 2: Add to PATH (zsh)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Option 3: Use full path in MCP config
claude mcp add --transport stdio memorygraph -- /full/path/to/memorygraphIf claude mcp list shows "Failed to connect":
# 1. Test the MCP server manually
echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}},"id":1}' | memorygraph
# 2. If you see "AttributeError: 'NoneType' object..."
# You have an old version. Upgrade:
pipx upgrade memorygraphMCP
# 3. Check which version is being used
which memorygraph
memorygraph --version
# 4. Verify pipx installation
pipx list | grep -A 3 memorygraphWhen global upgrade doesn't take effect:
# Problem: Project venv has old cached version
# Check project venv version
pip show memorygraphMCP
# Solution 1: Update project installation
cd ~/your-project
pip uninstall -y memorygraphMCP
pip install -e .
# Solution 2: Use full path in MCP config (recommended)
# Find your pipx path:
which memorygraph # outside any venv
# Update MCP config to use full path:
# "command": "/Users/yourname/.local/bin/memorygraph"# Check configuration
memorygraph --show-config
# Enable debug logging
MEMORY_LOG_LEVEL=DEBUG memorygraph
# Verify database connection
memorygraph --health# Check for running processes
ps aux | grep memorygraph
# Kill stale processes
pkill -f memorygraph
# Remove lock file if safe
rm ~/.memorygraph/memory.db-lock
# Restart Claude Code# Verify Neo4j is running
docker ps | grep neo4j
# Test connection manually
cypher-shell -a bolt://localhost:7687 -u neo4j -p your-password
# Check credentials
memorygraph --backend neo4j --show-config
# Check Neo4j logs
docker logs neo4j-container# Verify Memgraph is running
docker ps | grep memgraph
# Test connection
mgconsole --host 127.0.0.1 --port 7687
# Check Memgraph logs
docker logs memgraph-containerlibomp error on macOS:
# Error: Library not loaded: libomp.dylib
brew install libomp
# Restart your terminal after installationDatabase file permissions:
# Check permissions
ls -la ~/.memorygraph/falkordblite.db
# Fix permissions if needed
chmod 644 ~/.memorygraph/falkordblite.dbImport error:
# Install FalkorDBLite
pip install "memorygraphMCP[falkordblite]"
# Verify installation
python -c "import falkordblite; print('FalkorDBLite installed')"Connection refused:
# Verify FalkorDB is running
docker ps | grep falkordb
# Check if port is accessible
nc -zv localhost 6379
# Check FalkorDB logs
docker logs falkordb
# Restart FalkorDB if needed
docker restart falkordbWrong host/port:
# Verify configuration
memorygraph --show-config | grep FALKORDB
# Test connection manually
redis-cli -h localhost -p 6379 pingImport error:
# Install FalkorDB client
pip install "memorygraphMCP[falkordb]"
# Verify installation
python -c "import falkordb; print('FalkorDB client installed')"# Export memories to backup
memorygraph --export backup.json
# Import to new backend
memorygraph --backend neo4j --import backup.json
# Verify import
memorygraph --backend neo4j --show-configError: ValidationError: Creating this relationship would create a cycle
This error occurs when trying to create a relationship that would form a circular dependency.
# Example scenario:
# Memory A --DEPENDS_ON--> Memory B --DEPENDS_ON--> Memory C --DEPENDS_ON--> Memory A
# ^ Cycle!Solutions:
-
Redesign the relationship (recommended):
- Review the relationship chain to identify the circular dependency
- Remove or restructure relationships to avoid cycles
- Use different relationship types that don't imply dependency
-
Allow cycles (use with caution):
# Set environment variable export MEMORY_ALLOW_CYCLES=true # Or configure in MCP settings claude mcp add --scope user memorygraph \ --env MEMORY_ALLOW_CYCLES=true \ -- memorygraph
Warning: Allowing cycles can lead to:
- Infinite loops in traversal operations
- Ambiguous dependency resolution
- Harder to reason about memory graphs
Only enable if you have a specific use case requiring bidirectional relationships.
-
Check existing relationships:
# Use get_related_memories to trace the chain # Find where the cycle would close
Common cycle patterns:
A DEPENDS_ON B DEPENDS_ON A- Mutual dependencyA SOLVES B CAUSES A- Circular problem/solutionA BUILDS_ON B BUILDS_ON C BUILDS_ON A- Circular learning chain
Valid alternatives:
- Use
RELATED_TOfor non-directional associations - Use
SIMILAR_TOfor equivalent patterns - Use bidirectional relationships with
bidirectional=trueflag
- Check that server shows "Connected" in
claude mcp list - Restart Claude Code completely (exit and restart)
- Check for permission issues in settings
# Verify profile setting
memorygraph --show-config | grep profile
# Core mode: 9 tools
# Extended mode: 11 tools
# Extended mode: 11 tools- Check logs:
MEMORY_LOG_LEVEL=DEBUG memorygraph - Verify config:
memorygraph --show-config - GitHub Issues: Report bugs
- Discussions: Ask questions