{"id":"c8b0341f-a398-4ffc-b820-bc072f5f9200","slug":"claude-code-memory-cache","kind":"mcp","name":"claude-code-memory-cache","summary":"Persistent, token-efficient memory for Claude Code — 5 memory layers (vector store, file facts, Obsidian vault, code graphs, brain files) kept fresh by hooks, plus an optional live 3D memory graph","owner":"jushayden","repoUrl":"https://github.com/jushayden/claude-code-memory-cache","license":"MIT","licenseTier":"permissive","trust":"community","stars":9,"match":null,"fewStars":false,"format":"mcp","createdAt":null,"addedAt":"2026-10-14T05:49:18.425Z","logoUrl":"https://avatars.githubusercontent.com/u/72364947?u=8a07207f25d54c514d668f7eb0d18cce11377a6d&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["memory-knowledge","developer-tools","files-documents"],"tags":["ai-agents","chromadb","claude","claude-code","knowledge-graph","memory","obsidian","vector-database"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-14T07:44:16.569Z","sample":false,"url":"https://conduits.dev/tools/claude-code-memory-cache","language":"Python","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# Claude Code Memory Cache\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-1a7f37.svg)](LICENSE)\n[![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B-3776AB.svg)](https://www.python.org)\n[![Made for Claude Code](https://img.shields.io/badge/Made%20for-Claude%20Code-D97757.svg)](https://claude.com/claude-code)\n\n**Claude Code forgets everything the moment a session ends.** This gives it a memory that survives — so it remembers what you told it last week, and looks things up cheaply instead of re-reading your whole codebase to answer *\"where is X used?\"* Everything runs locally on your machine: no API key, no cloud.\n\n![The live memory graph — every node is a memory, clustered by meaning, pulsing in real time as sessions search and save](docs/assets/memory-graph.png)\n*The optional [live memory graph](docs/VISUALIZER.md) (2D view shown; a full 3D mode with hologram effects is one click away), from one real installation after ~3 months of use. Every node is one of **your** memories — the graph starts empty and grows as your sessions save them, clustered by meaning and pulsing as sessions think. Measured results from the same installation: [docs/STATS.md](docs/STATS.md).*\n\n> ⚠️ Unofficial. Not affiliated with Anthropic. \"Claude\" is a trademark of Anthropic; this is an independent community project.\n\n## How it works\n\nClaude Code talks to one small **Memory Server** on your machine using just two actions — **save a memory** and **search past memories**. The server keeps five kinds of memory, each good at a different question, and a set of **hooks** keeps them all fresh automatically.\n\n```mermaid\nflowchart TD\n    You([\"You\"]) -->|\"ask / do work\"| CC[\"Claude Code<br/>(the agent)\"]\n    CC <-->|\"save · search\"| MS[\"Memory Server<br/>local · no cloud · no API key\"]\n\n    subgraph M[\"Five kinds of memory — one per question\"]\n      direction LR\n      L1[\"1 · Vector memory<br/>have we discussed this before?\"]\n      L2[\"2 · Fact files<br/>the exact facts, cheap\"]\n      L3[\"3 · Obsidian vault<br/>the story + logs, for humans\"]\n      L4[\"4 · Code graphs<br/>where is X used? what breaks?\"]\n      L5[\"5 · Brain files<br/>one-page summary per repo\"]\n    end\n\n    MS --> L1 & L2 & L3 & L4 & L5\n    H[\"Hooks keep it all fresh<br/>session start · every edit · save · session stop\"] -.-> MS\n```\n\n## The five kinds of memory\n\n| # | Kind | The question it answers | What it actually is |\n|---|------|-------------------------|---------------------|\n| 1 | **Vector memory** | *\"Have we discussed something like this before?\"* | A local search over past sessions by **meaning** — a paraphrase still finds the right note, and exact tokens like error strings match too. Uses a local database with built-in embeddings, no API key needed. |\n| 2 | **Fact files** | *\"What exactly did you tell me?\"* | Plain-text notes, one fact per file, with a tiny always-loaded index (`MEMORY.md`). The full facts are read only when they're needed, so they cost nothing until then. |\n| 3 | **Obsidian vault** | *\"Show me the story.\"* | Human-readable session logs, per-project notes, and a running *lessons-learned* file — browsable by you, not just the agent. |\n| 4 | **Code graphs** | *\"Where is this used? What breaks if I change it?\"* | A map of your codebase's structure, so Claude checks the map instead of re-reading every file. |\n| 5 | **Brain files** | *\"Give me the one-pager on this repo.\"* | A single `PROJECT_BRAIN.md` per project — stack, conventions, priorities — refreshed automatically as you work. |\n\nThe payoff: continuity across sessions, and far fewer tokens spent — see [docs/TOKEN_EFFICIENCY.md](docs/TOKEN_EFFICIENCY.md) for the techniques and [docs/STATS.md](docs/STATS.md) for real numbers. New terms (MCP, embedding, hook) are defined in [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md#glossary).\n\n## Optional: watch your memory\n\nA [live graph of your memory](docs/VISUALIZER.md) — semantic clusters, a hologram mode, and nodes that pulse in real time as your sessions search and save. One command:\n\n```bash\npython visualizer/graph_server.py --open\n```\n\n## Quickstart\n\n```bash\ngit clone https://github.com/jushayden/claude-code-memory-cache\ncd claude-code-memory-cache\npip install -r requirements.txt\npython install.py            # guided: deps check, config, snippets to merge, vault seeding\n```\n\nOr let your agent do it — paste [docs/AGENTIC_SETUP.md](docs/AGENTIC_SETUP.md) into Claude Code.\n\n## What's in here\n\n```\nmemory_server/   the Memory Server (layers 1–3): server.py, storage.py, hybrid.py, obsidian.py\nscripts/         hook helpers (fingerprint_gate.py — skips graph rebuilds on non-structural edits)\nconfig/          CLAUDE.md + settings.json (hooks) templates to merge into your setup\nvisualizer/      OPTIONAL live memory graph (docs/VISUALIZER.md)\ndocs/            architecture, setup, token efficiency, security, stats, visualizer\ninstall.py       guided installer\n```\n\n## Docs\n\n- **[Architecture](docs/ARCHITECTURE.md)** — the diagram, the five layers in plain English, the hooks, and a glossary\n- **[Setup](docs/SETUP.md)** — manual install, step by step\n- **[Agentic setup](docs/AGENTIC_SETUP.md)** — let your Claude install it\n- **[Codex setup](docs/CODEX_SETUP.md)** — wire Codex into the same store, so both tools share one memory\n- **[Real numbers](docs/STATS.md)** — measured costs, savings, and an honest list of what turned out useless\n- **[Token efficiency](docs/TOKEN_EFFICIENCY.md)** — the techniques that cut token use\n- **[Visualizer](docs/VISUALIZER.md)** — the optional live memory graph\n- **[Security](docs/SECURITY.md)** — scrub checklist before you publish your own setup\n\n## Requirements\n\nPython 3.10+, Node 20+, Claude Code, and (optional but recommended) Obsidian.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n"}