Nothing lost. Everything findable.
pip install tab-ledger
Three commands to go from zero to searchable.
Add Tab Ledger as an MCP server to give Claude Code native access to your session history.
{
"mcpServers": {
"tab-ledger": {
"command": "tab-ledger",
"args": ["mcp"]
}
}
}
This exposes 8 tools:
| tab-ledger index | Index sessions from ~/.claude/projects/ |
| tab-ledger build | Build the knowledge base (8 stages) |
| tab-ledger search "query" | Full-text search (FTS5 syntax) |
| tab-ledger semantic "query" | Semantic search via embeddings |
| tab-ledger stats | Token, cost, and tool analytics |
| tab-ledger timeline <project> | Session history for a project |
| tab-ledger context <project> | Continuation context (next steps, blockers) |
| tab-ledger memory <project> | Full continuity packet |
| tab-ledger projects | List all indexed projects |
| tab-ledger session <uuid> | Detailed session view |
| tab-ledger serve | Web dashboard on localhost:7777 |
| tab-ledger mcp | Stdio MCP server |
All commands output JSON. Add --project or --limit N to filter.
from tab_ledger import KnowledgeBase kb = KnowledgeBase() results = kb.search("auth flow", project="my-project") context = kb.get_continuation_context("my-project") stats = kb.get_stats() kb.close()
Tab Ledger reads the JSONL session files that Claude Code writes to disk, extracts structured data, and builds a searchable knowledge base. Nothing leaves your machine.