MCP Memory Gateway: An MCP Server for Persistent Memory in Claude Code

MCP Memory Gateway is an MCP server built specifically for Claude Code that gives it persistent memory across sessions. The project addresses the problem where Claude Code loses all context between sessions, requiring users to repeat instructions like "don't push without checking PR review threads" multiple times.
How It Works
The system operates through four main components:
- Capture: Users log structured feedback when Claude Code does something wrong (what went wrong and what to change) or when it does something right.
- Promote: When the same failure shows up 3+ times, it automatically becomes a prevention rule.
- Gate: Prevention rules become PreToolUse hooks. Before Claude Code executes a tool call, the gate engine checks if it matches a known failure pattern. If it does, the call is blocked with an explanation of why and what to do instead.
- Recall: At session start, relevant context from past sessions is injected so Claude Code has the history it would otherwise lose.
Development with Claude Code
The developer used Claude Code as the primary development tool over several months. Claude Code was involved in nearly every part of the project:
- Wrote the initial gate engine logic, including the pattern matching system that compares tool calls against stored failure rules
- Generated the feedback validation system that ensures structured entries have the right schema before storing them
- Built the MCP protocol integration layer — handling tool registration, request routing, and response formatting
- Diagnosed and fixed a bug where prevention rules weren't firing on nested tool calls by rewriting the matching logic to handle recursive tool chains
- Used daily for refactoring, writing tests, and iterating on the recall system that selects which context to inject at session start
Getting Started
The core is fully open source and MIT licensed with no limitations. Setup can be done with one command:
npx mcp-memory-gateway init --agent claude-code
The project is available on GitHub at https://github.com/IgorGanapolsky/mcp-memory-gateway.
📖 Read the full source: r/ClaudeAI
👀 See Also

jsongrep: A DFA-Based JSON Query Tool That Outperforms jq in Benchmarks
jsongrep is a Rust-based command-line tool for querying JSON documents using a regular language syntax that compiles to deterministic finite automata (DFA), achieving faster search times than jq, jmespath, jsonpath-rust, and jql in benchmarks.

TechDebtMCP v2.0.0: MCP server for technical debt analysis across 14 languages
TechDebtMCP v2.0.0 is an MCP server that connects Claude to codebases to find, measure, and prioritize technical debt across 14 programming languages including JS/TS, Python, Java, Swift, Kotlin, Go, Rust, C/C++, C#, Ruby, and PHP.

Claude AI Opus Disables Intel DPST Auto-Dimming by Editing Registry in 0002 Key
A Reddit user automated the fix of Intel Display Power Saving Technology dimming by letting Claude AI Opus edit the registry — it found the correct FeatureTestControl value and key location.

Claude Code user builds nvm plugin to capture problem-solving context
A developer created a Claude plugin called nvm (non-volatile memory) that converts Claude session history into markdown cards documenting problem-solving decisions and reusable insights. The tool addresses the issue of losing track of how problems were solved when using AI coding assistants.