Graph-based MCP memory server for AI coding agents
MemoryGraph
Graph-based MCP Memory Server for AI Coding Agents
A graph-based Model Context Protocol (MCP) server that gives AI coding agents persistent memory. Store patterns, track relationships, retrieve knowledge across sessions.
Quick Start
Claude Code CLI (30 seconds)
# 1. Install (will use default SQLite database)
pipx install memorygraphMCP
# 1b. Optionally, you can specify a backend
pipx install "memorygraphMCP[falkordblite]"
# 2. Add to Claude Code (see docs/quickstart/ for other coding agents)
claude mcp add --scope user memorygraph -- memorygraph
# 3. Restart Claude Code (exit and run 'claude' again)
Verify it works:
claude mcp list # Should show memorygraph with "Connected"
Then in your coding agent you can ask it to remember important items: "Remember this for later: Use pytest for Python testing"

Other MCP clients? See Supported Clients below.
Need pipx?
pip install --user pipx && pipx ensurepathCommand not found? Run
pipx ensurepathand restart your terminal.
Important: MemoryGraph provides memory tools, but your coding agent won't use them automatically. You need to prompt or configure it to store memories. See Memory Best Practices below.
Quick setup: Add this to your ~/.claude/CLAUDE.md or AGENTS.md to enable automatic memory storage:
## Memory Protocol
### REQUIRED: Before Starting Work
You MUST use `recall_memories` before any task. Query by project, tech, or task type.
### REQUIRED: Automatic Storage Triggers
Store memories on ANY of:
- **Git commit** → what was fixed/added
- **Bug fix** → problem + solution
- **Version release** → summarize changes
- **Architecture decision** → choice + rationale
- **Pattern discovered** → reusable approach
### Timing Mode (default: on-commit)
`memory_mode: immediate | on-commit | session-end`
### Memory Fields
- **Type**: solution | problem | code_pattern | fix | error | workflow
- **Title**: Specific, searchable (not generic)
- **Content**: Accomplishment, decisions, patterns
- **Tags**: project, tech, category (REQUIRED)
- **Importance**: 0.8+ critical, 0.5-0.7 standard, 0.3-0.4 minor
- **Relationships**: Link related memories when they exist
Do NOT wait to be asked. Memory storage is automatic.
See CLAUDE.md Examples for more configuration templates.
Supported MCP Clients
MemoryGraph works with any MCP-compliant AI coding tool:
| Client | Type | Quick Start |
|---|---|---|
| Claude Code | CLI/IDE | Setup Guide |
| Claude Desktop | Desktop App | Setup Guide |
| ChatGPT Desktop | Desktop App | Setup Guide |
| Cursor AI | IDE | Setup Guide |
| Windsurf | IDE | Setup Guide |
| VS Code + Copilot | IDE (1.102+) | Setup Guide |
| Continue.dev | VS Code/JetBrains | Setup Guide |
| Cline | VS Code | Setup Guide |
| Gemini CLI | CLI | Setup Guide |
See CONFIGURATION.md for detailed compatibility info.
Why MemoryGraph?
Graph Relationships Make the Difference
Research shows that naive vector search degrades on long-horizon and temporal tasks. Benchmarks such as Deep Memory Retrieval (DMR) and LongMemEval were introduced precisely because graph-based systems excel at temporal queries ("what did the user decide last week"), cross-session reasoning, and multi-hop questions requiring explicit relational paths.
Graph memory c
Tools (2)
recall_memoriesQuery and retrieve stored memories by project, tech, or task type before starting work.store_memoryStore a new memory including type, title, content, tags, importance, and relationships.Configuration
{"mcpServers": {"memorygraph": {"command": "memorygraph"}}}