dbwatch
Supports local Cloudflare D1 SQLite database files (d1:./local-d1.sqlite) as a target for row-diff tracking, letting agents inspect and revert data changes made by a command against a local D1 database.
Generates a two-line natural-language summary of a database diff's side effects using a local Ollama model (e.g. qwen2.5-coder:7b).
Generates a two-line natural-language summary of a database diff via an OpenAI-compatible API endpoint, which can also point at LM Studio or vLLM servers.
Wraps any command while tracking row-level changes to a SQLite database, returning a compact git-style diff of inserted/updated/deleted rows and allowing the changes to be reverted with inverse SQL.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dbwatchrun npm test against sqlite:./app.db and show what changed"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dbwatch
One line: npx dbwatch sqlite:./app.db -- npm test (or bunx dbwatch sqlite:./app.db -- bun test): git-style SQLite/D1 row diff around any command with instant --revert.
Install
bunx dbwatch sqlite:./local.db -- npm test
npx dbwatch sqlite:./local.db -- npm test
# or install in your project / globally
bun add -d dbwatch
npm i -D dbwatchJSR:
bunx jsr add @kanchingyg/dbwatch
npx jsr add @kanchingyg/dbwatchRelated MCP server: litescope
Quick start
npx dbwatch sqlite:./local.db -- npm test
bunx dbwatch sqlite:./local.db -- bun test
npx dbwatch sqlite:./local.db --revert --allow-write -- npm test
npx dbwatch --mcpMCP tools
Tool | Purpose |
| Wrap a command; returns exit code + compact row diff ( |
| Apply inverse SQL ( |
| Two-line local summary via Ollama / OpenAI-compatible API |
Add to Cursor or Claude Code:
{
"mcpServers": {
"dbwatch": {
"command": "npx",
"args": ["-y", "dbwatch", "--mcp"]
}
}
}Local models
npx dbwatch sqlite:./app.db --explain --model ollama/qwen2.5-coder:7bPoint baseUrl in MCP explain_side_effects to LM Studio or vLLM (http://127.0.0.1:1234).
Supported DSNs
sqlite:./path/to.dborfile:./path/to.dbd1:./local-d1.sqlite(local Cloudflare D1 SQLite file)Postgres DSN parsing is reserved; use SQLite/D1 for zero-config local diffs today.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Your Supabase account in natural language: run SQL, apply migrations, manage tables, storage, edge f
Executes SQL in a real ephemeral database: rows, typed errors with suggestions, plans, diffs.
Deterministic safety, correctness & cost gate that vets Postgres SQL before your AI agent runs it.
Risk-scan a diff, flag AI-generated-code tells, find secrets. 5 of 7 tools need no account.
Related MCP Servers
- AlicenseAqualityAmaintenanceChange tracking for AI-era codebases. AI agents call it to log structured change events (entity + diff + reasoning) before the session ends, then query history with diff, blame, history, changeset, and search. Captures the intent that would otherwise evaporate.8236 PyPI25MIT
- AlicenseAqualityAmaintenanceOperations toolchain for SQLite, Cloudflare D1, and Turso. Every command is available as both a CLI and an MCP tool: inspect, diff, migrate, monitor, back up, and repair databases. 22 stdio tools, read-only by default.141AGPL 3.0
- FlicenseNot gradedqualityCmaintenanceEnables database governance for Drizzle ORM projects by inspecting schemas, linting migrations for unsafe operations, detecting schema drift, and explaining query plans with performance checks.-
- AlicenseNot gradedqualityAmaintenanceCaptures checkpoints of project files and SQLite tables before an AI agent makes risky changes, then reports differences and rolls them back byte-for-byte, including dropped tables and agent-created junk. Enables agents to snapshot, diff, list, and restore working state with explicit confirmation required before any destructive action.9 npm1MIT