Local session memory that automatically carries coding context across Claude Code, Codex CLI, and Gemini CLI.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Passbaton.
Session continuity for AI coding agents. Your agent picks up where it left off β never re-explain your project again. Persistent memory for Claude Code, OpenAI Codex CLI & Google Gemini CLI, sharing one local db: auto context injection, compaction handover, semantic search, and errorβsolution recall. Zero config, zero API cost, 100% local.
β‘ One install β context auto-loads every session Β· π§© survives compaction (0 re-explaining) Β· π 100% local, $0 API

Renamed (v2.0.0): this project was previously
claude-session-continuity-mcp. The old name suggested it was Claude-only β it never was. Claude Code, Codex CLI, and Gemini CLI are all first-class and share one local memory. Existing installs keep working: the oldclaude-hook-*commands still ship as aliases. See Migrating from v1.
Every new session β whether you're in Claude Code, Codex CLI, or Gemini CLI:
5 minutes of context-setting. Every. Single. Time.
Fully automatic. Lifecycle hooks handle everything without manual calls β on Claude Code, OpenAI Codex CLI, and Google Gemini CLI, sharing one local memory so context carries across all three:
Zero manual work. Context follows you.
Most Claude memory tools rely on explicit tool calls ("remember this"), a cloud API, or a background AI worker. This one is deliberately different:
| passbaton | Typical cloud/AI-memory MCP | |
|---|---|---|
| Setup | npm i -g β hooks auto-install | Manual server + API key |
| Trigger | 5 automatic hooks (no commands) | You call a remember tool |
| Storage | 100% local SQLite | Cloud / external service |
| API cost | $0 β local embeddings | Per-token / subscription |
| Latency | < 5ms (on-device) | Network round-trip |
| Privacy | Never leaves your machine | Sent to a provider |
| Search | FTS5 + local semantic, KO/EN/JA cross-lingual | Varies |
If you want zero-config, offline, no-cost memory that just happens while you work β this is it.
There's also a great class of local search tools (e.g. ctx) that index your agent history so you can query it (search "failed migration"). That's complementary, not the same job:
| passbaton | Local-search tools (ctx, etc.) | |
|---|---|---|
| How you use it | Automatic β context appears on session start, no command | You (or the agent) run a search query |
| Compaction | PreCompact hook re-injects a handover β 0 context re-explained after a compact | Not its job (it's a search index) |
| Best at | Never losing your thread across sessions & compacts, hands-off | Finding a specific past decision/command on demand |
| Coverage | Claude Code + Codex CLI + Gemini CLI (where auto-injection is possible) | Often 30+ agents indexed for search |
Use search when you want to look something up. Use this when you want your context to follow you without asking.
Beyond Claude Code, this also supports OpenAI Codex CLI. If ~/.codex exists,
the installer registers the same hooks in ~/.codex/hooks.json (SessionStart,
UserPromptSubmit, PreCompact, Stop), and the hooks auto-detect the host and emit
the right output format (Codex's hookSpecificOutput.additionalContext).
The same local sessions.db is shared, so context carries across both agents:
what you did in Codex is available in Claude Code and vice versa.
Scope: session save + context injection work on both. Codex file-change
tracking (PostToolUse) isn't wired yet β session save already covers most of it
via transcript parsing. Codex's transcript_path is treated as an unstable
interface (it can be null at startup), so host detection uses an installer-injected
--codex marker rather than relying on the path.
Also supports Google Gemini CLI. If ~/.gemini exists, the installer registers
the hooks in ~/.gemini/settings.json (SessionStart, BeforeAgent, PreCompress,
SessionEnd β Gemini's event names), preserving your other settings. Same shared
local sessions.db, so context carries across all three agents.
Gemini's transcript format was verified against real ~/.gemini/tmp/.../chats/*.jsonl
files β it uses two shapes (a flat {type, content} line and an older
{"$set":{"messages":[β¦]}} diff line); the parser handles both. Like Codex,
transcript_path can be null at startup, so host detection uses a --gemini marker.
Honest scope note: session save (SessionEnd) and context output are verified working.
Gemini's SessionStart context injection is documented as advisory-only upstream
(gemini-cli#15413) β if your
Gemini build doesn't render the injected context on startup, that's an upstream limit,
not this tool. Session continuity still works via the saved history.
If you installed this as claude-session-continuity-mcp (v1.x), nothing breaks β the v1 claude-hook-* commands still ship as aliases in v2.
To move to the new name:
The installer rewrites your hook entries to passbaton-hook-* and removes the old claude-hook-* lines β it matches on both names, so you won't end up with duplicates. Your existing sessions.db is untouched: all past sessions, memories, and solutions carry over.
Nothing else changes β same hooks, same database, same behavior.
Requires Node.js 22+. The native
better-sqlite3dependency only ships prebuilt binaries for Node 22, 24, and 26 (the currently supported lines β Node 18 and 20 are both end-of-life). On older Node it falls back to compiling from source, which fails without build tools. Node 22 and up install cleanly with no compiler needed.
That's it! The postinstall script automatically:
~/.claude.json~/.claude/settings.json-g)?This tool is designed to track all your Claude Code projects in a single unified database. Global installation is strongly recommended because:
| Reason | Detail |
|---|---|
| Single source of truth | One binary serves every project β no version drift between projects |
| Hooks are user-scoped | ~/.claude/settings.json lives in your home directory, not per-project |
| Cross-project context | Sessions from app-a and app-b share the same DB and search index |
| One update = everything refreshed | npm install -g <latest> updates all projects at once; no per-project reinstall |
| Hooks resolve by bin name | The installer writes the bare bin name (passbaton-hook-*) when it resolves on PATH β the normal case for npm i -g. Measured 135 ms per fire vs 1,367 ms for npm exec -- β¦ (10Γ), and PostToolUse fires on every edit. If the name does not resolve (local install), it falls back to npm exec -- β¦ |
Add the database to your project's .gitignore. Since 2.4.0 passbaton creates
<project>/.claude/sessions.db on the first session in any project it recognises as a
workspace root, so a project that had no database before will get one:
Do not ignore all of .claude/ β settings.json there is meant to be committed.
Important: Even with global install, you can still disable the hook for specific projects (see below). Global β forced on every project.
Global install does not mean "always on everywhere". You have three layers of control:
| Layer | File | Scope |
|---|---|---|
| 1. Global ON (default) | ~/.claude/settings.json | All projects |
| 2. Project-wide OFF | <project>/.claude/settings.json | Whole team (committed) |
| 3. Personal-only OFF | <project>/.claude/settings.local.json | Just you (gitignored) |
Factual signals from GitHub, npm, and our automated checks β not a rating.
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/leesgit-passbaton)<a href="https://allmcps.com/mcp/leesgit-passbaton"><img src="https://allmcps.com/api/badge/leesgit-passbaton?style=directory" alt="Passbaton on AllMCPs" /></a>