The MemoryGraph plugin for Claude Code adds auto-invoked skills, slash commands, and hooks that make memory storage and retrieval seamless.

Features

  • 5 Auto-Invoked Skills - Solution capture, error tracking, pattern recognition, project context, relationship building
  • 6 Slash Commands - /recall, /solve, /learn, /relate, /graph, /brief
  • Smart Hooks - Auto-load project context, capture learnings before commits

Installation

Step 1: Install MemoryGraph MCP Server

pipx install memorygraphMCP

Step 2: Register with Claude Code

claude mcp add memorygraph memorygraph

Step 3: Restart Claude Code

Restart Claude Code to activate the MemoryGraph integration.

Step 4: Install the Plugin

/plugin install memory-graph/memorygraph-plugin

Skills (Auto-Invoked)

Skills are automatically triggered by Claude based on context. No manual invocation needed.

Skill Auto-Invokes When
solution-capture You fix an error ("fixed it", "working now", "solved")
error-tracking You encounter an error, exception, or test failure
pattern-recognition Implementing similar functionality or refactoring
project-context Starting a new session or switching projects
relationship-builder Creating new memories or discussing connections

How Skills Work

When you fix a bug, the solution-capture skill automatically:

  1. Identifies the error that was fixed
  2. Documents the solution
  3. Creates a SOLVES relationship between them
  4. Confirms what was captured

Next time you encounter a similar error, the error-tracking skill:

  1. Searches for existing solutions
  2. Traverses the graph to find related fixes
  3. Presents relevant solutions before you start debugging

Slash Commands

Command Description Example
/recall Search memories by query /recall type:solution redis
/solve Find solutions for errors /solve "TypeError: Cannot read property"
/learn Capture a learning/decision /learn "Use connection pooling for Redis"
/relate Create relationships /relate "Redis fix" SOLVES "timeout error"
/graph Visualize connections /graph authentication depth:3
/brief Get session briefing /brief week

Command Examples

Find solutions for an error:

/solve connection timeout

Capture a decision:

/learn type:decision "Using PostgreSQL for JSONB support"

Link related memories:

/relate "retry pattern" SIMILAR_TO "exponential backoff"

Hooks

Session Start Hook

Automatically loads relevant project context when you start a Claude Code session:

  • Recent memories for the current project
  • Unresolved errors from previous sessions
  • Key patterns and decisions

Pre-Commit Hook

Before git commits, optionally prompts to capture learnings from the session.

Example Workflow

  1. Encounter an error
    • Error-tracking skill activates
    • Searches for existing solutions
    • Shows related fixes from past sessions
  2. Fix the error
    • Solution-capture skill activates
    • Stores the error and solution
    • Creates SOLVES relationship
  3. Start new session later
    • Project-context skill loads relevant memories
    • You see unresolved errors and recent patterns
  4. Similar error appears
    • Error-tracking finds your previous solution
    • You resolve it instantly

Comparison with Basic Memory

Feature MemoryGraph Basic Memory
Storage Graph database Markdown files
Relationships 35+ typed relationships Wiki-style links
Error→Solution tracking First-class support Manual linking
Pattern extraction Automatic Manual
Graph traversal Multi-hop queries Single-hop
Search Fuzzy + semantic Text-based

Requirements

  • Claude Code with plugin support
  • MemoryGraph MCP server (pipx install memorygraphMCP)
  • MCP tools: store_memory, search_memories, recall_memories, get_related_memories, create_relationship

Next Steps