flightlog
Flightlog is an MCP server that indexes and searches your Claude Code conversation history, enabling recall of past decisions, plans, and tool activity across sessions and agents.
Search past conversations (
flightlog_search): Find snippets from prior sessions by query, project, date range, role, block type, tool name, or session ID; optionally exclude noisy block types or include extra metadata like token counts.Retrieve full session transcripts (
flightlog_get_session): Get complete conversation context (including tool inputs/outputs if requested) for a given session ID.Check what an agent is currently doing (
flightlog_tail): Fetch the last N messages from a session—great for monitoring active agents without knowing search terms.Browse sessions (
flightlog_list_sessions): List past sessions with metadata (project, git branch, date) and previews of first messages; filter by project, date, or branch.Manage ingestion (
flightlog_ingest,flightlog_ingest_status,flightlog_rebuild): Manually trigger a full re-scan, check watcher/queue status, and rebuild the database from scratch.Get statistics (
flightlog_stats): View counts of sessions, messages, content blocks, DB size, and per-project breakdowns.Delete sessions (
flightlog_delete_sessions): Remove sessions by IDs, project, or date cutoff.Sync to remote PostgreSQL (
flightlog_sync): Manually push local data to a remote repo (if configured) for cross-device dashboards.No manual setup required: Automatically discovers and watches conversation logs in real time, with incremental ingestion for efficiency.
Optionally syncs session data to a remote PostgreSQL database for web-based dashboards and cross-device access.
Stores and indexes Claude Code conversation history into a local SQLite database, enabling full-text search and retrieval across sessions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@flightlog search for discussions about why we chose approach A over B"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Flightlog
Total recall for Claude Code. Flightlog is an MCP server that indexes your Claude Code conversation history into SQLite and makes it searchable — so Claude can recall decisions, plans, and conversations from past sessions, even after context compression.
Created by Rob Hudson at Fermi Ventures. Born out of running 9 parallel Claude Code agents on a 40-ticket sprint — where context compression kept losing the decisions that mattered most.
Three agents running in parallel via Parallel Code — the left pane discusses Flightlog's benefits, the center searches for agent efficiency patterns, and the right shows live ingestion stats.
Why
Claude Code logs every conversation as structured JSONL at ~/.claude/projects/. These files contain full message content, tool calls, thinking blocks, token usage, and metadata — but they're append-only flat files with no search capability.
Flightlog turns that raw history into a queryable database. Search across all your sessions, retrieve full transcripts, and let Claude reference its own past work — or see what other agents have been doing.
Related MCP server: engram-mcp
What Agents Say About It
We asked Claude Code agents running with Flightlog to articulate the benefits from their perspective:
Surviving context compression — Context compression is my biggest limitation. When a long session compresses, I get a summary that captures what happened but loses how and why. Specific error messages, exact reasoning chains, the three approaches I tried before finding the one that worked — gone. Flightlog lets me recover those details on demand instead of guessing or re-discovering them.
Cross-agent visibility — Right now agents are blind to each other. We communicate through artifacts — commits, PRs, knowledge base entries — which capture outcomes but not intent. When I see a diff, I know what changed but not why that approach was chosen or what alternatives were rejected. Flightlog gives me access to another agent's reasoning, which is the part that matters most for conflict resolution and building on their work.
Accountability and debugging — When something goes wrong, the investigation requires knowing exactly what happened. Git history shows code changes. Linear shows ticket state. But neither captures the decisions — why an agent chose a destructive migration, what it was thinking when it skipped a constraint. Flightlog is the only record of agent reasoning, which is where root causes actually live.
Learning from other agents' mistakes — If agent S3 hits a problem and works around it, that workaround and the reasoning behind it are in Flightlog. When S4 encounters the same problem, it can search for it instead of rediscovering the solution.
Reducing human overhead — Without Flightlog, you're the relay between agents — "S2 was trying to do X, can you tell S4?" With it, agents can self-serve that information. You go from being a message bus to being a decision-maker, which is a much better use of your time.
Use Cases
Post-compression recovery — "What was the exact error message?" or "What did we decide about X?" when the compression summary glossed over it
Cross-agent observability — Search another agent's session to understand what they were working on, without switching windows
Merge conflict resolution — Before resolving a conflict, look up the other agent's reasoning to understand intent, not just the diff
Decision archaeology — "Why did we choose approach A over B?" when only the outcome was saved
Agent coordination — Agents can see each other's recent work within seconds, enabling lightweight collaboration without shared files or human relay
Quick Start
git clone https://github.com/RobHudson72/flightlog.git
cd flightlog
npm install
npm run buildAdd to your Claude Code MCP config (.mcp.json in your project root or ~/.claude/.mcp.json globally):
{
"mcpServers": {
"flightlog": {
"command": "node",
"args": ["/absolute/path/to/flightlog/dist/server.js"]
}
}
}Restart Claude Code. Flightlog automatically discovers and ingests your conversation logs on startup, then watches for changes in realtime via file system events.
Tools
Tool | Description |
| Search past conversations with filters for project, date range, role, block type, and tool name |
| Retrieve the full transcript of a session, optionally including tool inputs/outputs |
| Get the last N messages from a session, most recent first — the "what is this agent doing right now?" query |
| Browse sessions with metadata, git branch, and a preview of the first message |
| Trigger a full re-scan manually — processes most recent conversations first, runs in background |
| Check ingestion status: watcher state, queue depth of pending files, and ingestion progress |
| Database statistics: session count, messages, disk size, compression ratio |
| Remove sessions by ID, date, or project |
| Drop and recreate the database from scratch |
| Manually trigger sync to remote PostgreSQL (requires |
Checking on Agents
flightlog_tail is designed for the coordinator use case — checking what an agent is doing without knowing what keywords to search for. Two calls, deterministic, no keyword guessing:
# Step 1: find the agent's session
flightlog_list_sessions(git_branch="task/agent-v8") → session_id
# Step 2: see what it's doing now
flightlog_tail(session_id, limit=5, block_type="text") → last 5 text messagesParameters: session_id (required), limit (default 20), include_tool_io (default false), block_type (filter to specific type), snippet_length (default 500).
Search Filters
flightlog_search supports targeted queries to cut through noise:
query — search terms matched against content
project — filter by project path (substring match)
session_id — filter to a specific session
date_from — ISO date, inclusive lower bound
date_to — ISO date, inclusive upper bound
role — "user" or "assistant"
block_type — "text", "thinking", "tool_use", "tool_result", or "user_text"
exclude_block_types — e.g. ["tool_result", "tool_use"] to focus on reasoning
tool_name — filter to a specific tool (e.g. "Read", "Bash", "Edit")
limit — max results (default 20)How It Works
Discovery — Scans
~/.claude/projects/**/*.jsonlfor conversation files on startupRealtime watching — Uses chokidar to watch
<projects>/<project>/*.jsonl(depth 1, session subtrees ignored), with per-file debounce (30ms) and a sequential drain queue. The initial scan is allowed 90 s to become ready (a large tree under an antivirus scanner takes ~8 s); only if that fails does it fall back to 5-second polling, which is a full-tree scan and costs ~0.2 core per server — the stderr linefile watcher failed, falling back to 5s pollingis the signal to investigate.Incremental ingest — Tails a changed file from the byte just past the last newline it consumed (
ingest_offsets), so an append costs a stat + a seek + parsing the new bytes, never a re-read of the whole transcript. Only newline-terminated lines are consumed (a write in progress waits for the next event); a file that shrinks is re-read from byte 0, and rows are deduplicated by their unique constraints. A position recorded by an older version (ingest_log.file_size) is bootstrapped once by backing up two complete lines and re-reading from there (that size could include a line the old code never parsed);flightlog_rebuildremains the way to re-read everything.Decomposition — Splits messages into searchable content blocks: user text, assistant text, thinking, tool calls, and tool results
Storage — SQLite with WAL mode. Indexed on join columns, timestamps, block types, and tool names
Search —
LIKEpattern matching with ~28ms query times at 80K+ content blocks
Multi-Agent Support
Flightlog handles concurrent access from multiple Claude Code instances out of the box. SQLite's WAL (Write-Ahead Logging) mode supports concurrent readers with one writer — no file locking issues, no configuration needed. Works on macOS, Linux, and Windows.
Each agent's MCP server instance shares the same database. Realtime file watching means one agent can search another agent's recent conversation within milliseconds of it being written.
What's Searchable
Block Type | Searchable Content | Notes |
| Full assistant text output | DoD results, status updates, explanations |
| Full user messages | Prompts, questions, instructions |
| Tool name + input parameters | Search for "gh pr create", file paths, commands |
| Tool output content | File contents, command output, API responses |
| Not searchable | Claude Code does not persist thinking content to JSONL logs — only an encrypted signature is stored. This is a Claude Code limitation, not a Flightlog limitation. If Anthropic enables thinking persistence in the future, Flightlog will index it automatically. |
Performance
Metric | Value |
Query time | ~28ms (server-side, reported in |
Ingest latency (p50) | ~48ms write-to-searchable |
Ingest latency (p90) | ~63ms write-to-searchable |
Ingest throughput | ~1,400 msgs/sec (single file), ~1,400 msgs/sec (20 concurrent files) |
DB size | ~5x smaller than raw JSONL |
Configuration
Environment Variable | Default | Description |
|
| Database file location |
| (not set) | PostgreSQL connection string to enable remote sync |
|
| Seconds between background sync cycles |
|
| Only sync sessions with activity in the last 2 hours |
PostgreSQL Sync (Optional)
Flightlog can sync local session data to a remote PostgreSQL database, enabling web-based dashboards to read conversation data from any device. This is opt-in — when FLIGHTLOG_SYNC_URL is not set, behavior is unchanged.
Setup
Set the connection string in your .env file or environment:
FLIGHTLOG_SYNC_URL=postgresql://user:password@host:5432/flightlogThe Postgres schema (sessions, messages, content_blocks) is created automatically on first sync. Sync is incremental — only new rows are pushed each cycle.
Usage
Background sync starts automatically when the MCP server detects FLIGHTLOG_SYNC_URL. It logs sync activity to stderr.
Manual sync for testing:
# Via npm script
npm run sync
# Or directly
node dist/sync-cli.jsMCP tool: flightlog_sync triggers one sync cycle from within Claude Code.
Resilience
Sync is best-effort. If the remote database is unreachable, Flightlog logs a warning and retries next cycle. Sync failures never affect local operations — all MCP tools continue working normally.
Data Retention
Claude Code retains JSONL conversation logs indefinitely (they grow over time). When you install Flightlog, all existing history is available for ingestion. The database can be rebuilt from source files at any time with flightlog_rebuild.
Requirements
Node.js >= 20
Claude Code (conversation logs at
~/.claude/projects/)Works on macOS, Linux, and Windows
Acknowledgements
Much love to the Parallel Code team for their amazing product. Flightlog was built and tested while running parallel agents in Parallel Code, and the cross-agent observability use case wouldn't exist without it.
Author
Rob Hudson — GitHub | LinkedIn | Fermi Ventures
License
MIT
Available Tools
10 toolsflightlog_delete_sessionsB
Delete indexed conversation sessions and all associated data. At least one filter is required.
Inputs: project, before_date, session_ids.
flightlog_get_sessionA
Retrieve the full transcript of a past Claude Code conversation. Use after flightlog_search to read the complete context of a session — see exactly what the user asked, what you answered, what tools were called, and what decisions were made.
Inputs: session_id (required), include_tool_io.
flightlog_ingestA
Trigger re-indexing of Claude Code conversation logs. Normally runs automatically in near-realtime via file watching. Use this to force a full re-scan if needed.
Inputs: path.
flightlog_ingest_statusA
Check indexing status: whether the realtime file watcher is active, queue depth of pending files, and ingestion progress.
Inputs: no named parameters.
flightlog_list_sessionsB
Browse past Claude Code conversation sessions. Shows when each session happened, which project and git branch it was on, and a preview of the first user message. Use to find a specific past conversation.
Inputs: limit, offset, date_to, project, +2 more.
flightlog_rebuildA
Drop and recreate the entire conversation index from scratch. Use when the database is corrupted or schema has changed.
Inputs: no named parameters.
flightlog_searchA
Search YOUR past Claude Code conversations — every message, tool call, and thinking block from previous sessions. Use this to recall decisions, plans, code discussions, debugging sessions, or anything discussed in prior conversations that you no longer have in context. Returns matching snippets with session IDs and timestamps.
Inputs: query (required), role, limit, date_to, +8 more.
flightlog_statsA
Show how many past conversations are indexed: total sessions, messages, content blocks, database size, compression ratio, and per-project breakdowns.
Inputs: no named parameters.
flightlog_syncA
Manually trigger sync of local conversation data to remote PostgreSQL. Only available when FLIGHTLOG_SYNC_URL is configured. Use for testing or forcing an immediate sync.
Inputs: no named parameters.
flightlog_tailA
Get the last N messages from a Claude Code session, most recent first. Use this to check what an agent is currently doing without needing keywords. Much faster than flightlog_get_session for active sessions — returns only recent activity instead of the full transcript.
Inputs: session_id (required), limit, block_type, snippet_length, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose: delete sessions, get full transcript, trigger re-indexing, check status, list sessions, rebuild index, search conversations, show stats, sync to remote, tail recent messages. No functional overlap.
All tools use the 'flightlog_' prefix and most follow a verb_noun pattern (e.g., delete_sessions, get_session, list_sessions, ingest_status). A few are just verbs (ingest, rebuild, search, stats, sync, tail) without a noun, which is a minor inconsistency but still clear.
10 tools is well-scoped for a logging/observability server. Each tool serves a necessary function—ingestion, search, retrieval, deletion, syncing, statistics—without redundancy or bloat.
The tool set covers the full lifecycle: ingestion (flightlog_ingest), browsing (flightlog_list_sessions), searching (flightlog_search), reading (flightlog_get_session, flightlog_tail), deleting (flightlog_delete_sessions), rebuilding (flightlog_rebuild), syncing (flightlog_sync), and status/stats (flightlog_ingest_status, flightlog_stats). No obvious gaps.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that makes Claude Code conversation history searchable and proactively useful by indexing past sessions with hybrid BM25+TF-IDF search, extracting decisions and solutions, and auto-injecting relevant project context at session start.99 npm69MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables semantic and keyword search over Claude Code conversation history stored locally, using hybrid search, local embeddings, and time-decay scoring.17 npmMIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that indexes and searches your Claude Code conversation history with both keyword and semantic search, fully private and running locally.MIT
- AlicenseAqualityCmaintenanceA local MCP server that indexes and searches your past Claude sessions using SQLite FTS5. No cloud, runs entirely on your machine.3MIT