Session handoff for Claude Code: list sessions and build handoff docs another agent continues from.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Turn any Claude Code session β even a crashed one β into a clean handoff.md another AI can continue from. And give Claude Code permanent project memory, distilled from your own history.
That's it. Your latest session becomes handoff.md: the conversation without
the noise, the files that changed, the commands that ran β opening with
instructions to the receiving assistant, so you can paste it straight into
Gemini, GPT, claude.ai, or a fresh Claude Code session with zero extra
prompting.

Claude Code stores every session locally as JSONL
(~/.claude/projects/β¦/*.jsonl), full of tool calls, tool results, thinking
blocks and system reminders. Existing exporters dump all of that into
markdown. claude-handoff instead produces a handoff document β and,
since it can read your entire history, a project memory brief too.
curl and audit.--llm when you want a real summary. Claude, OpenAI or Gemini via
your own API key β or --llm claude-cli, which runs your locally-installed
Claude Code CLI on your existing Pro/Max plan: no API key at all.agent-*.jsonl), whose full transcripts stay behind
--include-sidechains.chf --brief distills a project's ENTIRE session
history into one living brief β what this is, where things stand,
decisions, fixes, conventions, and an ordered resume plan of open
threads, every claim citing its session; --install-brief-hook injects
it into every new Claude Code session, so Claude starts already knowing
the project.password=β¦) are redacted from every output β the handoff you paste into
a web chat is egress too. --anonymize goes further for public sharing.| Requirement | Minimum | Check | Notes |
|---|---|---|---|
| Python | 3.9+ | python3 --version | The only hard requirement |
| Claude Code | any | claude --version | Only for --llm claude-cli (uses your Pro/Max login) |
| pipx (recommended) | any | pipx --version | pip install pipx β or use brew / plain pip |
No third-party Python packages, ever β everything runs on the standard library.
Installing the package gives you two identical commands: claude-handoff
and the short alias chf. Tab completion:
A session crashed, hit the usage limit, or you closed the terminal:
β¦then paste into claude.ai, ChatGPT, Gemini β or a fresh claude session.
Works on any old session; nothing needed to be installed before the crash.
Moving work from Claude Code to another model:
"Which session was it where we talked about CORS?"
Give Claude Code permanent memory of this project:
A real summary instead of the transcript (goal / decisions / state / next):
A claude.ai or ChatGPT web chat instead of a terminal session:
--brief)Claude Code forgets everything between sessions β but the whole history is
on your disk. chf --brief reads every session of the current project
and writes one memory document to ~/.claude/briefs/<project>.md:
--llm, a distilled memory that opens with what this is
(product, stack, current state) and where things stand (done / in
flight / not started), then decisions with their why, fixed bugs,
conventions β and open threads as an ordered resume plan, each with
its concrete next action and a [in flight] / [blocked] /
[not started] tag. Every bullet cites the session id it came from
(chf --name <id> opens the source).
Per-session notes are cached, so refreshing after new sessions only pays for the new ones β and a monster session (beyond ~120k chars) is map-reduced inside the note, so the memory path never truncates: nothing is silently dropped, at any size.
You can also curate what feeds the memory: --exclude <id> leaves a
session out (a duplicate, an experiment β bare --exclude opens a
numbered picker that remembers: the stored exclusions arrive
pre-selected with β and typed numbers toggle, so you edit the set
instead of re-picking it), and --keep first:2,last:20 windows a huge history to
the founding sessions plus a sliding recent window. Both are sticky β
stored in the brief's stamp, so hooks and later refreshes keep honoring
them until you change them (--exclude none, --keep all). And
chf --brief -o clipboard ships the current brief β distillation
included β straight to the clipboard, one paste away from handing your
project memory to another model.
The brief also goes beyond the project store: chf --brief --grep X -o - distills a thematic memory (only the sessions that talked
about X), and chf conversations.json --brief -o brief.md builds
standing memory from a claude.ai or ChatGPT export β every
conversation, cited by its id. Both are exports by design (explicit
-o only) so they never overwrite the standing brief.
Running graphify? The two tools compose in both directions, zero
config: chf --brief -o graphify files the current memory into raw/
β one evolving project-memory.md that the next /graphify --update
links into the code's knowledge graph β and once
graphify-out/graph.json exists, every brief gains a free ## Code map (communities, hub concepts, cross-community bridges:, labeled
flows:) so new sessions know the code's structure, not just its
history. The in-project copies (raw/project-memory.md, optional root
BRIEF.md) refresh on every brief write β strictly refresh-only,
hooks never create files. The full loop lives in
docs/GUIDE.md.
installs two hooks: SessionStart injects the brief as context (Claude
starts already knowing your project β re-injected after /compact too),
SessionEnd auto-refreshes the factual part for free. No LLM ever runs
from a hook; the distilled part refreshes only when you say so. The brief
carries a freshness stamp, and when newer sessions or commits exist the
file and the injection don't just warn β they list them (session titles,
commit subjects), so a fresh session sees what changed, not merely that
something did. Fully local; redaction applies as everywhere.
β Step-by-step mechanics, the honest cost table, and a full day-with-it walkthrough: docs/GUIDE.md.
PreCompact matters: right before Claude Code compacts a long session's context, both hooks snapshot state β the handoff preserves detail that compaction is about to squeeze away, and the brief skeleton stays fresh mid-session.
Both edit ~/.claude/settings.json non-destructively, are idempotent, and
have matching --uninstall-* flags. Hook failures never break the host
session, and hooks never trigger LLM calls or create files on their own.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/claude-handoff)<a href="https://allmcps.com/mcp/claude-handoff"><img src="https://allmcps.com/api/badge/claude-handoff?style=directory" alt="Claude Handoff on AllMCPs" /></a>