# Claude Code Vcr

> Local-only MCP server for replaying and searching Claude Code session logs

- **Type:** MCP server
- **Install:** `agentstack add mcp-paolojn-claude-code-vcr`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [PaoloJN](https://agentstack.voostack.com/s/paolojn)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [PaoloJN](https://github.com/PaoloJN)
- **Source:** https://github.com/PaoloJN/claude-code-vcr

## Install

```sh
agentstack add mcp-paolojn-claude-code-vcr
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# claude-code-vcr

`claude-code-vcr` is a local-only MCP server for querying and replaying past Claude Code sessions from inside a current Claude Code session.

It reads Claude Code's existing JSONL logs from `~/.claude/projects/**/.jsonl`. It does not record new data, run a daemon, write to session logs, or send telemetry.

## Why

Claude Code already records session history locally. `claude-code-vcr` makes that history queryable through MCP, so you can ask Claude to list, replay, search, and compare previous work without leaving the chat.

## Install

From GitHub:

```bash
npm install -g github:PaoloJN/claude-code-vcr
```

From npm after npm publish:

```bash
npm install -g claude-code-vcr
```

For local development from this repo:

```bash
npm install
npm run build
npm install -g .
```

## MCP Config

Add this to a project's `.mcp.json` after global install:

```json
{
    "mcpServers": {
        "claude-code-vcr": {
            "command": "claude-code-vcr"
        }
    }
}
```

For local development without global install, point Claude Code at the built file:

```json
{
    "mcpServers": {
        "claude-code-vcr": {
            "command": "node",
            "args": ["/path/to/claude-code-vcr/dist/index.js"]
        }
    }
}
```

## Tools

- `list_recent_sessions`: returns recent sessions with UUID, project, timestamps, first user prompt, turn count, and tool-call summary.
- `replay_session`: returns structured user/assistant turns and tool calls for one session UUID.
- `search_sessions`: searches prompts, assistant text, tool names, and tool inputs.
- `diff_sessions`: compares two sessions by first prompt, assistant text, turn count, and tool names.
- `regression_check`: summarizes reference session shapes next to a `CLAUDE.md` hash for read-only regression review.

All tools accept an optional `root` argument for tests or custom Claude Code log roots. By default, `claude-code-vcr` reads `~/.claude/projects` and skips project paths/files with a `personal` path token.

## CLI

The package is primarily an MCP server, but it also includes a small CLI for quick terminal checks and demos:

```bash
claude-code-vcr list --limit 5
claude-code-vcr search "better-auth" --days 7
claude-code-vcr replay 
claude-code-vcr diff  
```

To regenerate the README demo:

```bash
vhs assets/demo.tape
```

## Safety Model

- Local-only: no hosted service, network calls, analytics, or telemetry.
- Read-only: session JSONL files are opened for reading and never modified.
- No daemon: the process runs only when invoked by an MCP client.
- Personal-path guard: broad scans skip paths/files with a `personal` token by default.

## Example Prompts

Ask Claude:

```text
Use claude-code-vcr to list my 5 most recent sessions in this project.
```

```text
Use claude-code-vcr to replay session  and summarize the tool calls.
```

```text
Use claude-code-vcr to search sessions from the last 7 days for "regression_check".
```

```text
Use claude-code-vcr to diff sessions  and .
```

## Development

```bash
npm test
npm run typecheck
npm run build
```

To smoke-test the binary's registered tool list:

```bash
npx tsx src/index.ts --tools
```

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [PaoloJN](https://github.com/PaoloJN)
- **Source:** [PaoloJN/claude-code-vcr](https://github.com/PaoloJN/claude-code-vcr)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-paolojn-claude-code-vcr
- Seller: https://agentstack.voostack.com/s/paolojn
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
