# dbtrail

Wires your AI client to an analytical MySQL copy so it can read past row versions, trace changes and draft recovery SQL. Read-only.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 64
- Author: dbtrail
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dbtrail/dbtrail
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/dbtrail

## What it does

dbtrail tails the MySQL binlog and lands the changes as Parquet on disk or in S3. The MCP server exposes that copy to an agent: inspect how a row or table looked at an earlier moment, trace who touched a record, produce SQL that reverses unwanted edits. Every tool is read-only, so nothing typed into the chat can write to production.

Setup is a single HTTP endpoint, `https://api.dbtrail.com/mcp` — no local process to run. The copy itself needs `binlog_format=ROW` and `binlog_row_image=FULL` on the server; `bintrail doctor` checks both and prints how to fix them. On RDS and Aurora those live in the parameter group.

This is neither high availability nor a backup. History begins the day you install it, and the Parquet files trail the source by minutes on whatever schedule you pick. A schema change — a new or dropped column, a `TRUNCATE` — pauses the scheduled refresh until dbtrail reads the database again.

## Requirements
- Remote server: `https://api.dbtrail.com/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http dbtrail https://api.dbtrail.com/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add dbtrail --url https://api.dbtrail.com/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "dbtrail": {
            "url": "https://api.dbtrail.com/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "dbtrail": {
            "type": "http",
            "url": "https://api.dbtrail.com/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http dbtrail https://api.dbtrail.com/mcp
```

## When to use it
- see a row as it stood before an edit
- trace which user changed a record
- draft SQL that reverses damaged rows
- walk through a table's change history
- confirm a recovery would reproduce the data

## Example prompts
- Show me row 4821 in `shop.orders` as it was yesterday at 14:00
- Who edited order 9912 in the last week?
- Write the SQL to undo the deleted rows in `customers`

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27669
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49845

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
