Claude Code hook

Claude Brain

Persistent memory for Claude Code. Local SQLite + MCP + hooks.

38 stars 6 forksHooks Source

Install

From source
git clone https://github.com/mikeadolan/claude-brain.git

From the README

claude-brain

Tested on: macOS, Ubuntu, Windows (automated CI) | Fedora 43 (primary development)

Introducing claude-brain for Claude Code - Your AI finally has a real memory. Not just RAG, RAG and beyond. 100% lossless recall across every session and every project, no silos. Local SQLite. Keyword, semantic, and fuzzy search across everything. Emails you a daily briefing, weekly portfolio, and project status reports - no other tool does this. Zero cloud dependencies. Your data never leaves your machine. Zero token burn. Unlimited potential.

Watch the explainer video: claude-brain in 85 seconds | Roadmap

The Pain

Claude Code starts every session from zero. Close the terminal and everything is gone.

- Re-explain who you are every single session
- Re-state decisions you already locked weeks ago
- Lose track of what happened across sessions and projects
- MEMORY.md has a 200-line cap - Claude's built-in memory is a Post-It note
- Context compaction throws away your earlier conversation mid-session
- Projects are siloed - what you discussed in one project is invisible in another

Other tools exist, but most use lossy approaches - extracting AI-chosen summaries, discarding context, siloing memories per project. When you need to find exactly what was said three weeks ago across two different projects, those tools fail.

RAG and Beyond

claude-brain is a RAG system - but that's just one layer. Here's what "beyond" means:

Beyond Auto Memory. Claude Code's built-in auto memory stores project preferences in a markdown file. claude-brain goes further: full lossless capture of every conversation, structured decisions and facts, cross-project search, multi-platform import (ChatGPT, Gemini, Claude.ai), and semantic search across your complete history. Auto memory is a notepad.…
Read the full README on GitHub

How hooks work

  • Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
  • They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
  • A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Claude Code docs

Details

Type
Hooks
Language
Python
License
MIT
Last updated
1 November 2026
Topics
aiclaudeclaude-codedeveloper-toolshooksmcpmemoryopen-sourcepythonsqlite

FAQ

What is Claude Brain?

Persistent memory for Claude Code. Local SQLite + MCP + hooks. It is a hook for Claude Code, from mikeadolan/claude-brain on GitHub.

How do I install Claude Brain?

Clone mikeadolan/claude-brain from GitHub and follow the setup steps in its README.

Is Claude Brain popular?

mikeadolan/claude-brain has 38 GitHub stars and 6 forks. It was last updated on 1 November 2026.

More hooks

Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.