
Dbtrail
com.dbtrailPublished by dbtrail.comOfficial publisherv0.1.0Updated Oct 24, 2026
MySQL change tracking with instant row-level recovery and forensic attribution for compliance.
Overview
DBTrail exposes a read-only MCP interface to a MySQL change-tracking copy, letting an assistant ask in plain English about past row versions and changes.
- What you can do
- Ask in plain English about changes captured from a MySQL server's binlog
- Browse recent changes and inspect how a row or table looked at a past moment
- Query the analytical Parquet copy of your tables through DuckDB views
- Review generated undo SQL for damaged rows before you run it yourself
- When to use it
- Useful when you run DBTrail alongside a MySQL, RDS or Aurora database and want an assistant to help investigate what changed, when, and what a row looked like before, or to explore the analytical copy without touching production.
- Requirements
- A remote MCP endpoint; the DBTrail deployment itself must already be installed and running on your own infrastructure (Docker Compose, plus DuckDB where you query). The source MySQL needs binlog_format=ROW and binlog_row_image=FULL. The README does not document MCP authentication details.
Installation
In SourceWeft
- Open Dbtrail in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Use with an agent
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/com.dbtrail%2Fdbtrail/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Other MCP clients
Add this to your client's mcpServers config.
{
"mcpServers": {
"dbtrail": {
"type": "http",
"url": "https://api.dbtrail.com/mcp"
}
}
}README
DBTrail keeps your MySQL tables as Parquet files you own, minutes behind the source, with every version of every row. Query them with DuckDB. Production never sees the query.
That query read Parquet files. The MySQL primary never saw it.
Minutes behind the source. Not high availability, not a backup. Limits
Why
Reports, dashboards and ad-hoc analysis compete with your application when
they run on the primary: a full scan pushes the working set out of the buffer
pool, a long read holds back purge, and a GROUP BY over millions of rows
spills temp tables to disk. A reporting replica is one more MySQL to pay for
and patch, and it still answers at row-store speed.
DBTrail gives those queries a copy of their own, in a columnar format, outside
mysqld.
How it works
- The first copy reads your tables once (with mydumper).
- After that, only the binlog. DBTrail connects over the replication protocol, the way a replica does. No plugin, no agent on the database host, no triggers. That is why Amazon RDS and Aurora work.
- On your schedule, the copy is updated. DBTrail folds the recorded changes into a new Parquet snapshot, from every 5 minutes to once a day. The source is not read again, unless a table changes shape (see Limits).
- You query it with DuckDB. A generated
views.sqlgives you one view per table, named like the source table (shop.orders), that follows the newest snapshot.
One Docker Compose stack, and a folder or an S3 bucket. No pipeline to build, no warehouse to run, no Kafka. See Analytics with DuckDB.
The numbers
Source: RDS MySQL 8.4, TPC-C dataset, 73 million rows, about 10 GB, under a sysbench-tpcc load of 180 transactions per second. Measured 18 to 20 September 2026 with DBTrail 0.84 refreshing every 5 minutes. Six report queries, total time:
One of the six, a two-table join grouped by district and month, took 3 min 52 s on MySQL and 0.9 s on the copy. MyDuck was faster on this set: it keeps data in DuckDB's own format, which only DuckDB reads.
Freshness, measured separately under about 340 transactions per second with a 5-minute schedule: commit to visible in DuckDB took 2.7 to 13.2 minutes, median 5.9.
Method, cost comparison and ClickBench results: Introducing the MySQL Analytical Replica.
What you get
An analytical copy
- Heavy queries off your MySQL. They run in DuckDB, in its own process,
on the copy. Only the binlog leaves
mysqld. - DuckDB, ready to open. One
views.sql, one view per table. Your DuckDB runs it on your machine: a laptop, a notebook, a BI box. - Open files you own. Plain Parquet on disk or in S3, with a Hive-partitioned change history. Nothing proprietary.
- Other engines too. Export a snapshot to Iceberg for Spark, Trino or
Athena with
bintrail export iceberg. See Iceberg export.
Open the copy through
views.sql. An engine that reads the Parquet files directly sees each table as of its last full write and can miss the change files stored beside it. The views apply them for you.
Time travel and recovery, from the same stream
DBTrail keeps every change on your MySQL server, before and after, and writes the SQL that undoes the ones you didn't want. It reads them from the same binlog as the copy, from the day you install it:
- Every version of every row. See any row or table as it was at a past
moment, from the web interface or the
reconstructCLI. An optional MySQL port (beta) answers the same questions withAS OFSQL from anymysqlclient. See Time-Travel SQL. - Undo precisely. Generate the SQL that reverses just the damaged rows.
recover-cascadealso rebuilds the child rows anON DELETE CASCADEremoved below the binary log. DBTrail writes the SQL. You review it and you run it. See Query & Recovery. - Prove it holds.
bintrail verifychecks, from two snapshots and the index and without touching the source, that a recovery would reproduce it.bintrail statusflags any gap the capture could not fill. See Verify. - Web interface and MCP. Add servers, schedule snapshots and browse changes in the browser. Connect Claude Desktop or any MCP client to ask in plain English. Every tool is read-only. See the 5-minute guide.
Try time travel in 30 seconds, with nothing of yours connected:
See the demo image.
Limits
A copy you can trust is one whose edges you know.
- Not high availability. Your application never points at the copy. Nothing fails over to it.
- Not your backup. History starts the day you install it. Keep your physical backups.
- Minutes behind, not seconds, by default. The copy refreshes on the schedule you set, and the SQL port answers from it. Its fresh mode, chosen per server in the web interface, also reads what capture has indexed since, usually seconds behind, for some memory and speed.
- Needs a ROW binlog with full row images.
binlog_format=ROWandbinlog_row_image=FULL.bintrail doctorchecks both and prints the fix (on RDS and Aurora, set them in the parameter group). - Some changes mean a full read. Adding, dropping, renaming or retyping a
column, or a
TRUNCATE,DROPorRENAMEof a table, pauses the scheduled update until DBTrail reads the database again, at most once a day. That read takes a short lock: a global read lock while it starts, or, on RDS and Aurora, a lock on the tables it reads. A new table joins with a read of its own. Index and other everyday changes do not trigger one. - History needs a bucket. Without S3, row history keeps 48 hours by
default (
--rotate-retainchanges it). The copy itself stays: the newest 3 snapshots per table on local disk. - Cascaded deletes before MySQL 9.6, and on MariaDB. Rows deleted by a
foreign key never reach the binlog.
recover-cascaderebuilds most of them, and the copy keeps them until DBTrail next reads the database in full. - Not a MySQL server. Reports run in DuckDB, not from your MySQL client. The optional MySQL port (beta, no TLS) only answers what a row or table looked like at a past moment, or what changed between two.
- Yours to operate. DBTrail and its small index MySQL run on your machines. Disk and backups are yours.
Full list: Limitations.
What it works with
DBTrail never needs the binlog files on disk, which is why managed cloud databases work.
Install
You need Docker with Compose, and DuckDB on the machine where you query.
This downloads the Docker Compose stack, starts it, waits until DBTrail answers, and prints the next steps.
- Sign in. Open http://127.0.0.1:8090, create a username and password, and press Create & sign in.
- Connect. Click + Add server, enter the host and port of your MySQL and press Find it. The form shows the SQL that creates DBTrail's user. Run it on your MySQL, then press I ran it. DBTrail checks the rest and starts on its own.
- First change. Change a row on your MySQL. It shows under Recent changes on the Overview within a minute, with an Undo that writes the SQL to reverse it.
- First copy. On Snapshots, press Read database now. Normally this is the only time DBTrail reads your tables directly.
- Set a schedule. On the Settings tab of Snapshots, under Update the copy, pick how often (every 5 minutes, for example) and press Turn on. Each run after the first folds the recorded changes instead of reading the source.
- Query it. On Snapshots, press Download, then
Download the data. Unpack the
.tar.gzand runduckdb -init views.sqlinside the snapshot folder. To read the copy that keeps updating, see Query in DuckDB.
Prefer the command line? See the command-line quickstart.
Who builds it
DBTrail is built by Daniel Guzman-Burgos, former MySQL Technical Lead at Percona.
Documentation
Privacy
bintrail is DBTrail's command-line tool. It runs entirely in your
infrastructure. Your database data never leaves it: not your rows,
schemas, table names, queries, hostnames, DSNs, or file paths.
Official release builds do report metadata-only usage statistics: which command ran, whether it succeeded, a coarse error class, and your version and platform. It is on by default and turns off in one line:
No identifier of any kind is stored or transmitted, so nothing ties those statistics to you or your machine. A binary you build yourself has no reporting address compiled in and cannot send anything. TELEMETRY.md documents every field, every control, and the CI tests that enforce both.
The privacy policy covers the Claude Desktop extension (.mcpb),
which reports nothing at all, and how data moves when an AI client queries
your deployment.
License
Apache-2.0: free for any use, including commercial and production. Contributions are welcome; see CONTRIBUTING.md (a CLA is required, prompted automatically on your first PR).
Want the index server operated for you (sized, backed up, upgraded, kept alive on-call) instead of running it yourself? That is the managed service at dbtrail.com. SUPPORT.md draws the ship-vs-operate line.
Source: README.md at commit e8dc656
Tools
0Version history
1- v0.1.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 daysRequired25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declaredRequired10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts