Dbtrail MCP server
{
"mcpServers": {
"dbtrail": {
"type": "http",
"url": "https://api.dbtrail.com/mcp"
}
}
}{
"mcpServers": {
"dbtrail": {
"type": "http",
"url": "https://api.dbtrail.com/mcp"
}
}
}{
"mcpServers": {
"dbtrail": {
"type": "http",
"url": "https://api.dbtrail.com/mcp"
}
}
}{
"servers": {
"dbtrail": {
"type": "http",
"url": "https://api.dbtrail.com/mcp"
}
}
}{
"mcpServers": {
"dbtrail": {
"type": "http",
"url": "https://api.dbtrail.com/mcp"
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsonversion 0.1.0
What it does
Dbtrail is an MCP server that exposes MySQL and PostgreSQL change tracking via row-level audit logs. It lets you query any row or table as it was at any point in time, generate reversal SQL for unwanted changes, and track who made each change. DBAs and developers use it for incident recovery, compliance auditing, and forensic analysis without restoring backups or locking tables.
- Query a production table as it existed at a specific timestamp to see what data looked like before an accidental deletion or modification.
- Generate precise SQL to undo just the damaged rows from a bad batch update, including cascading foreign key changes.
- Track session attribution (database user, host, client program) for each row change to meet compliance requirements.
Tools this server exposes
| Tool | Does |
|---|---|
| query_changes | Search and view every row change across all tracked tables with before/after diffs. |
| time_travel_query | Query any row or table as it was at any moment in time using SQL AS OF syntax. |
| generate_recovery | Generate exact reversal SQL for damaged rows, including handling of cascading foreign key updates and deletes. |
| verify_recovery | Offline verification that a recovery would correctly reproduce the desired state without touching the source database. |
| add_server | Add and configure a new MySQL, PostgreSQL, or MariaDB database for change tracking. |
| status | Check for gaps in the captured change stream and verify the safety net is holding. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.