Back to browse
I built a lightweight memory layer for Claude Code

I built a lightweight memory layer for Claude Code

by primerpy·Feb 20, 2026·2 points·0 comments

AI Analysis

●●●BangerBig BrainSolve My Problem

Claude Code memory without Redis—138 lines of diskcache beats 'use a vector DB' conventional wisdom.

Strengths
  • Elegant constraint: rejects vector DB/Redis overkill, uses SQLite diskcache—the insight itself is valuable
  • Two-layer storage architecture separates speed (in-memory) from portability (git-safe JSON)
  • Genuinely solves a real pain: Claude Code's context compaction wiping project knowledge
Weaknesses
  • MCP ecosystem adoption unclear; depends on Claude Code/Editor staying compatible
  • Limited to exact-key retrieval—no semantic search, so use case is narrower than general memory layer
Target Audience

Solo developers and teams using Claude Code who lose context between sessions

Similar To

Continue.dev context caching · GitHub Copilot workspace memory

Post Description

Can also read in medium for free https://medium.com/@primerpy/introducing-mcp-backpack-persis... I built a light mcp that persists memory for Claude Code in 138 lines of Python, without using redis or vector DB. Also it can export and restore memories among different computers.

Similar Projects

CogmemAi – Persistent Memory for Claude Code via MCP

Runs extraction and search server-side so your local MCP is a tiny HTTP client — no local DBs, no giant RAM leaks, and an easy npx install and .mcp.json or global MCP registration. It exposes clear tools (save_memory, recall_memories, extract_memories, get_project_context) and adds project-scoped + global preferences — a pragmatic fix for Claude Code's tiny flat-file memory. The tradeoff is obvious: usefulness depends on the hosted API (privacy, uptime, cost), and the repo looks early-stage with minimal commits and docs beyond the quickstart.

Niche GemShip ItSolve My Problem
hifriendbot
203mo ago