agent-session-recorder
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π©οΈ agent-session-recorder
The code is the result. The session is the artifact.
A local-first flight recorder for AI coding agents. Every prompt, tool call, and decision, on one redacted timeline.
What: it records Claude Code, Codex CLI, and any MCP host into one normalized JSONL timeline. You can export it as Markdown or HTML, or watch it live.
Why: a diff shows you what changed. The session shows you how the agent got there: the prompts, the tool calls, the dead ends. That part is usually lost.
How: everything stays on your machine. Secrets are redacted before anything touches disk. Reasoning is stored only when the provider exposes it, and it's labelled honestly.
Status: v0.2. The adapters are built against documented formats and tested on synthetic fixtures. Real-world transcripts are wanted (#10).
β‘ 30-second quickstart
npm install --global agent-session-recorder
agent-session-recorder init # dry-run: detects claude/codex, prints the config it would add
agent-session-recorder init --write # Claude hooks (+ .bak) and Codex MCP config
agent-session-recorder view # live timeline at http://127.0.0.1:4318No agent handy? Open examples/claude-fixture-1.html to see a recorded session.
More commands: import-claude <file>, codex import|tail [--latest], mcp, export <id> --format md,html,jsonl, list, redact. Flags: --research (shrinks large or repeated tool output), --no-redact (you probably don't want this one).
Related MCP server: ChatGPT Gateway MCP Nyan
π₯ What gets captured
Source | Prompts & replies | Reasoning | Tool calls / results | Timing | Tokens / model |
Claude Code (hooks + transcript) | β |
| β Pre/PostToolUse | β measured | β |
Codex CLI (rollout import + live tail) | β |
| β exit code β error | β | β |
MCP (any host) | only what the agent logs | only what the agent sends | only what the agent sends | β event ts | if sent |
Direct APIs (OpenAI / Anthropic / xAI) | π #1 | π #3 |
The MCP server (start_session, log_event, end_session, export) only knows what the host tells it. SKILL.md asks agents to report their plan, decisions, and outcome. Schema details are in docs/event-schema.md.
π Privacy
Local only. Data is written to
~/.agent-session-recorder/with0600file permissions. No network calls, no telemetry, no cloud.Redaction always runs before a write. Keys, tokens, emails, phone numbers, IPs, Luhn-valid cards, and home-dir usernames become placeholders like
[API_KEY_1]. Only a salted hash β placeholder map is kept.It's regex, so it's best-effort. Review exports before you share them. Found a leak? That's a security issue. More in docs/redaction.md.
π Sealed sessions
Events are hash-chained as they are written. seal <id> --timestamp adds a Merkle batch with an RFC 3161 timestamp, and verify <id> reports OK or the exact tampered lines. See docs/sealed-sessions.md.
To ship a proof-carrying PR, run bundle <sessionId> --intent <YYYYMMDD-slug> [--timestamp | --tsa url]. It records a sealed proof.link event tying that intent to the current git HEAD, refuses to write a bundle if verify fails, and writes .proof/<intent>.json by default. Reviewers can then run the independent proof-check flow against that JSON bundle instead of trusting the local CLI output alone.
π§ Architecture
flowchart LR
A[Claude Code hooks/transcripts] --> R
B[Codex rollout files] --> R
C[MCP host] --> R
R[Recorder<br/>redact β research-shrink] --> S[(JSONL per session)]
S --> E[Export: md / html / jsonl]
S --> V[Live viewer :4318]More detail in docs/architecture.md and docs/adapters.md.
π οΈ Contribute in 10 minutes
Pick a
good first issue. Each one points to the files you'll need.npm ci && npm run build && npm test: green in well under a minute.Read CONTRIBUTING.md (it's short). Using an AI agent? Point it at AGENTS.md.
Have questions or ideas? Head to Discussions.
πΊοΈ Roadmap
API proxy #1 Β· Grok CLI adapter #2 Β· xAI reasoning #3 Β· NER redaction #4 Β· Session diff #5 Β· Cost charts #6 Β· Dataset export #7 Β· OTel #8 Β· Cloud sync #9 Β· Real-session validation #10
π The series behind it
License
MIT. Record freely.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Host any HTTP API as MCP tools with a tamper-evident cross-agent settlement ledger.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
A paid remote MCP for agent memory MCP, built to return verdicts, receipts, usage logs, and audit-re
Related MCP Servers
AlicenseBqualityBmaintenanceLocal workstation attention journal that tracks focus, idle, and agent sessions, exposing timeline data via MCP for AI agents to query current or past activity.5AGPL 3.0- AlicenseNot gradedqualityBmaintenanceEnables agent clients to safely connect to tools and execution resources through MCP with authorization, approvals, audit, chat-context isolation, SSH/Docker access, and long-running command session tracking.MIT
- AlicenseAqualityCmaintenanceFree seven-tool proof loop for MCP agents: scoped sessions, bounded authorization, typed outcomes, evidence-bound claims, and tamper-evident local closure. Upgrade to Complete Local for durable memory, recovery, signed traces, release verification, and multi-agent workflows.7Apache 2.0
- FlicenseNot gradedqualityBmaintenanceEnables coding agents to run bounded local profiling, tracing, benchmarking, and capture operations from explicit artifacts or commands, then inspect typed evidence, provenance, coverage, limitations, and preserved replay sources through MCP tools.-