MemoryGraph MCP Server

$pipx install memorygraphMCP
README.md

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"

Memory Creation

Other MCP clients? See Supported Clients below.

Need pipx? pip install --user pipx && pipx ensurepath

Command not found? Run pipx ensurepath and 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

claude_desktop_config.json
{"mcpServers": {"memorygraph": {"command": "memorygraph"}}}

Try it

Remember this for later: Use pytest for Python testing.
Recall my memories related to the architecture decisions for this project.
Store a memory about the bug fix I just implemented for the authentication flow.
What did we decide last week regarding the database schema?
Search my memories for reusable code patterns involving FastAPI.

Frequently Asked Questions

What are the key features of MemoryGraph?

Graph-based relationship tracking for complex relational paths. Persistent knowledge retrieval across multiple AI chat sessions. Support for 8 different database backends including SQLite and FalkorDB. Temporal query capabilities to track decisions over time. Zero-config setup with automatic memory storage triggers.

What can I use MemoryGraph for?

Tracking architecture decisions and their rationales across a long-term project. Storing and retrieving discovered code patterns to ensure consistency. Summarizing changes and fixes after git commits for future reference. Linking related technical concepts and project requirements in a knowledge graph. Providing context to AI agents about previous debugging sessions and solutions.

How do I install MemoryGraph?

Install MemoryGraph by running: pipx install memorygraphMCP

What MCP clients work with MemoryGraph?

MemoryGraph works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use MemoryGraph with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free