Adding memory to Claude Code

the MCP server, the hook, and the plugin marketplace

Claude Code writes every session to disk and starts the next one empty. The work is still there — and so is whatever you did that week in Cursor, Codex or any other agent you had open.

What Claude Code already has

Transcripts live under ${CLAUDE_CONFIG_DIR:-~/.claude}/projects/ as JSONL, one file per session, complete down to the tool calls. Nothing reads them back, including Claude Code's own next session. How Claude's store is read has the format, the quirks and the date it was last checked against a real store.

Adding recall

deja install claude-auto

That writes three things: the deja MCP server into ~/.claude.json, a /deja command at ~/.claude/commands/deja.md, and a SessionStart hook in ~/.claude/settings.json so a new session opens already carrying what the last ones settled. The MCP server on its own is deja install claude-code.

This repository is also a Claude plugin marketplace, if you would rather install it the way Claude Code installs everything else:

claude plugin marketplace add vshulcz/deja-vu
claude plugin install deja-vu@deja-vu

Running both is safe rather than doubled. Claude keys MCP servers by name, and every manifest we ship names this one deja, so the two collapse into a single server instead of listing every tool twice.

Either path needs the binary — a plugin ships files, not runtimes:

brew install deja-vu
# or
curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh

What the hook actually changes

Without it, recall depends on the agent deciding to search. The hook moves the decision earlier: the session opens with what this project already settled, so the first exchange is not spent re-deriving it. After compaction covers the other half — the moment a long session is summarised and the details go.

The part that is not about this harness

The index covers every agent's transcripts on the machine — twenty of them today, each in its own format — so a fix found in one tool answers a question asked in another, including sessions from before any of this was installed. That is the reason to index rather than to capture.

Nothing here writes memories, so there is nothing to hallucinate into your history; indexing and search are local, and credentials are stripped as the index is built (privacy). An injection is capped at 1,536 bytes per prompt and about 4 KB per tool call — what memory costs has the measured comparison.

Getting started · How Claude's store is read · When CLAUDE.md grows