Dbtrail logo

Dbtrail

Read-only MCP access to MySQL change history, time-travel queries, snapshot management, and recovery workflows.

Install Dbtrail

Run the project’s own setup commands, in order.

Setup steps from the project

dbtrail installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    curl -fsSL https://raw.githubusercontent.com/dbtrail/dbtrail/main/install.sh | sh
    

Overview

The dbtrail MCP server connects AI clients to DBTrail’s MySQL change-tracking and analytical replica features. It exposes read-only tools through the DBTrail web interface and MCP connection, letting clients browse changes, query past row or table states, and manage servers and snapshots in plain English. DBTrail reads MySQL binlogs, stores snapshots as Parquet, and uses DuckDB for analytical queries without sending reports to the production database. Reach for it when you need AI-assisted investigation, compliance history, or recovery review rather than application failover or a backup.

Use cases

  • Investigate historical row changes for compliance reviews
  • Ask questions about past table states through an MCP client
  • Review generated SQL before reversing damaged rows
  • Run analytical queries without loading the MySQL primary
  • Verify whether a proposed recovery reproduces a prior state

Key features

  • Read-only MCP tools
  • MySQL binlog change tracking
  • Historical row and table inspection
  • Parquet snapshots queried with DuckDB
  • Recovery SQL generation and verification
  • Change browsing and snapshot scheduling

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

25/30 checks healthy over the last 111d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars76Stargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Dbtrail works

What the dbtrail MCP server does

The dbtrail MCP server gives an MCP client read-only access to DBTrail’s captured MySQL history and analytical copy. DBTrail records row changes from the source database’s binlog, creates Parquet snapshots, and provides access to those records through its web interface and MCP tools.

An AI client can ask questions in plain language about captured data, browse changes, inspect a row or table as it existed at an earlier time, and compare historical states. The same captured stream supports recovery analysis: DBTrail can generate SQL that reverses selected damaged rows, while operators review and execute that SQL themselves.

The analytical copy is separate from the production MySQL server. Queries run with DuckDB against Parquet data, so reporting and investigation do not execute on the MySQL primary. DBTrail also supports exporting a snapshot to Iceberg for engines such as Spark, Trino, or Athena, although that export is separate from the MCP interface.

How it works

DBTrail initially copies the source tables with mydumper. It then connects using the MySQL replication protocol and consumes the binlog, without requiring a database plugin, a host agent, or binlog files stored on disk. Scheduled refreshes fold captured changes into new Parquet snapshots; the schedule can range from every five minutes to once per day.

A generated views.sql exposes source-like table names in DuckDB and applies the current snapshot together with its change files. The MCP interface sits alongside the web application, where users can add database servers, schedule snapshots, and browse captured changes. Every MCP tool is read-only.

Setup and configuration

Install Docker with Compose and DuckDB on the machine used for querying. The supplied installation command downloads and starts the Docker Compose stack, waits for DBTrail to respond, and prints the next steps. Open the local web interface at http://127.0.0.1:8090, create a username and password, then add a source server.

The source must provide a ROW-format binlog with full row images: binlog_format=ROW and binlog_row_image=FULL. bintrail doctor checks these settings and reports the required correction. Amazon RDS and Aurora use parameter groups for these settings.

After installation, connect Claude Desktop or another MCP client through DBTrail’s documented connection flow.

Tools and capabilities

  • Ask plain-language questions through an MCP client.
  • Browse captured database changes.
  • Inspect a row or table at a historical point in time.
  • Compare what changed between two points in history.
  • Add database servers and schedule snapshots through the DBTrail interface.
  • Review recovery SQL for selected damaged rows.
  • Use recover-cascade to reconstruct many child rows removed by cascading deletes.
  • Run bintrail verify to check whether a recovery would reproduce the recorded state.
  • Use bintrail status to identify gaps in captured history.

Limitations and notes

The dbtrail MCP server is not a high-availability mechanism, backup, or replacement for a MySQL application connection. The analytical copy is minutes behind the source according to its refresh schedule, and history begins when DBTrail is installed. Physical backups remain necessary.

Schema changes such as adding, dropping, renaming, or retyping a column, along with table truncation, dropping, or renaming, can pause scheduled updates until DBTrail performs another database read. That read can take a short lock. Without S3, row history is retained for 48 hours by default, while local storage keeps the newest three snapshots per table.

Cascaded deletes are not fully present in the binlog before MySQL 9.6 and on MariaDB. DBTrail can rebuild many of those rows with recover-cascade, but this has boundaries. The optional MySQL-compatible time-travel port is beta and has no TLS; it answers historical-state questions rather than serving general reports. Supported sources include MySQL, Percona Server for MySQL, Amazon RDS for MySQL, Aurora MySQL, and MariaDB. PostgreSQL 14 and later support a one-time copy, with scheduled updates not yet available and history marked beta.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Dbtrail

dbtrail is an MCP server that connects AI clients to DBTrail’s MySQL change history and Parquet analytical snapshots. Its read-only tools let clients browse changes, inspect past row or table states, ask plain-language questions, manage snapshots, and review recovery information without querying the production MySQL server.

Install DBTrail with Docker Compose using the provided shell installer, then sign in through the local web interface and add a database server. DuckDB is also required for querying. After setup, follow DBTrail’s connection flow to connect Claude Desktop or another MCP client.

Yes, DBTrail documents connecting Claude Desktop through its MCP interface. Start the Docker Compose stack, sign in at the local DBTrail web interface, add a source server, and then use the documented MCP connection flow.

Yes, every MCP tool is read-only. DBTrail can inspect changes, query historical states, and provide recovery SQL, but it does not automatically execute that SQL. Operators review generated recovery statements and run them themselves.

DBTrail supports MySQL 8.0 and 8.4, Percona Server for MySQL 8.0 and 8.4, Amazon RDS for MySQL, Aurora MySQL, and MariaDB 10.11 or later. PostgreSQL 14 or later supports a one-time copy, while scheduled updates are not yet available.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDbtrail AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/dbtrail?style=directory)](https://allmcps.com/mcp/dbtrail)
HTML Embed
<a href="https://allmcps.com/mcp/dbtrail"><img src="https://allmcps.com/api/badge/dbtrail?style=directory" alt="Dbtrail on AllMCPs" /></a>