The fastest way to get MemoryGraph working with Claude Code CLI.
Prerequisites
- Claude Code CLI installed (
claudecommand available) - Python 3.10 or higher
- pipx installed (recommended)
Quick Setup (3 Steps)
Step 1: Install MemoryGraph
# Install with pipx (handles PATH automatically)
pipx install memorygraphMCP
# Or with pip (ensure ~/.local/bin is in PATH)
pip install memorygraphMCP Step 2: Add to Claude Code
# Add MCP server (user scope - available everywhere)
claude mcp add memorygraph memorygraph
# Or project scope (only in current directory)
claude mcp add memorygraph memorygraph --scope project Step 3: Restart Claude Code
# Exit and restart Claude Code CLI
exit
claude Verify Connection
# Check MCP servers status
claude mcp list
# You should see:
# memorygraph: connected Test Your First Memory
In Claude Code, try:
# Ask Claude to store a memory
"Store a memory that I successfully set up MemoryGraph"
# Recall it
"What do you remember about MemoryGraph setup?" Configuration Options
User vs Project Scope
| Scope | Command | Use Case |
|---|---|---|
| User | claude mcp add memorygraph memorygraph | Memory available in all projects |
| Project | claude mcp add memorygraph memorygraph --scope project | Project-specific memory |
Custom Data Directory
# Use a custom database location
claude mcp add memorygraph memorygraph --env MEMORYGRAPH_DATA_DIR=/path/to/data Enable Intelligence Features
# Install with intelligence extras
pipx install "memorygraphMCP[intelligence]"
# Then reconfigure
claude mcp remove memorygraph
claude mcp add memorygraph memorygraph Cloud Backend (Multi-Device Sync)
Want your memories synced across all your devices? Use the MemoryGraph Cloud backend.
Step 1: Get Your API Key
Sign up at memorygraph.dev and create an API key from your dashboard.
Step 2: Configure Cloud Backend
# Remove existing local config (if any)
claude mcp remove memorygraph
# Add with cloud backend
claude mcp add --scope user memorygraph \
--env MEMORYGRAPH_API_KEY=mg_your_key_here \
-- memorygraph --backend cloud Step 3: Restart Claude Code
exit
claude Verify Cloud Connection
claude mcp list
# Should show: memorygraph: connected Migrating Existing Local Memories
If you have existing local memories, export them first:
# Export from local SQLite
memorygraph export --format json --output my-memories.json
# Then configure cloud backend (above)
# Import to cloud
memorygraph import --format json --input my-memories.json Troubleshooting
"Command not found: memorygraph"
# Ensure pipx PATH is set
pipx ensurepath
# Restart terminal, then try again "Failed to connect" in MCP list
# Test memorygraph manually
memorygraph --health
# If it fails, check Python version
python3 --version # Must be 3.10+ See the full Troubleshooting Guide for more solutions.