DeltaScope
Offline-first SQL audit engine and MCP SQL audit server for MySQL, TiDB, and PostgreSQL DDL/DML changes.
Install / Use
claude mcp add Fanduzi -- npx -y github:Fanduzi/DeltaScopeIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
OperationsSupported Platforms
Our assessment of DeltaScope
DeltaScope scores 80/100 on our quality scale, 673rd of 762 Operations skills we index.
Its MCP Server is 22 KB long, well organised into 24 sections with 36 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated today, so DeltaScope is actively maintained.
- Our last check on 2026-10-19 found the source still online.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands (1 minor note below). An AI review of the same text found nothing harmful.
- noteInstalls by piping a downloaded script into a shellline 45
curl -fsSL https://raw.githubusercontent.com/Fanduzi/DeltaScope/main/install.sh | sh
AI review by kimi-k2.7-code on 2026-10-18. Automated pattern scan on 2026-10-18. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
DeltaScope compared with similar skills
All 4 of these similar skills score higher than DeltaScope; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| DeltaScope (this skill)by Fanduzi | 80 | 3 | today | MCP Server |
| claude-memby thedotmack | 100 | 119.2k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 114.1k | 1d ago | CLAUDE.md |
| hyperframesby heygen-com | 100 | 88.6k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 82.3k | today | CLAUDE.md |
Frequently asked questions
- How do I install DeltaScope?
- Run
claude mcp add Fanduzi -- npx -y github:Fanduzi/DeltaScope. The install tabs above show the steps for each supported agent. - Which AI agents does DeltaScope work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is DeltaScope safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands (1 minor note below). An AI review of the same text found nothing harmful. It is Apache-2.0-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is DeltaScope still maintained?
- The repository was last updated today, so DeltaScope is actively maintained.
Skill content
View source on GitHubDeltaScope
</div>SQL audit for MySQL, TiDB, and PostgreSQL — works offline, or connect to the database for metadata-aware review.
<div align="center"> <table> <tr> <td align="center" valign="top" width="33%"> <p><strong>MySQL DML</strong></p> <img src="docs/assets/deltascope-audit.gif" alt="deltascope audit --sql "delete from users" returns Verdict reject and blocker dml.where.require"> <p><code>delete from users</code></p> </td> <td align="center" valign="top" width="33%"> <p><strong>MySQL DDL</strong></p> <img src="docs/assets/deltascope-audit-ddl.gif" alt="deltascope audit --sql "alter table users drop column email" returns Verdict pass and notice ddl.alter.drop_column.notice"> <p><code>alter table users drop column email</code></p> </td> <td align="center" valign="top" width="33%"> <p><strong>PostgreSQL</strong></p> <img src="docs/assets/deltascope-audit-pg.gif" alt="deltascope audit --dialect postgresql --sql "alter table users drop column email" returns Verdict review and warning ddl.pg.alter.drop_column.advisory"> <p><code>--dialect postgresql</code><br><code>alter table users drop column email</code></p> </td> </tr> </table> </div>Install
The repository installer script is the generic portable installer. It resolves the same release archives CI publishes.
If GitHub API discovery is unavailable, it falls back to the public latest-release redirect; set DELTASCOPE_VERSION=vX.Y.Z to bypass discovery when needed.
curl -fsSL https://raw.githubusercontent.com/Fanduzi/DeltaScope/main/install.sh | sh
macOS can also use Homebrew:
brew tap Fanduzi/deltascope
brew install --cask deltascope
Pin a specific release:
curl -fsSL https://raw.githubusercontent.com/Fanduzi/DeltaScope/v0.511.1/install.sh | \
DELTASCOPE_VERSION=v0.511.1 sh
MCP
The MCP launcher fetches the deltascope-mcp binary for your platform. You do not need to install the CLI first. The launcher is npx -y --prefer-online @fanduzi/deltascope-mcp@latest.
Example mcp.json:
{
"mcpServers": {
"deltascope": {
"command": "npx",
"args": ["-y", "--prefer-online", "@fanduzi/deltascope-mcp@latest"]
}
}
}
More install options: MCP Quick Start.
Compared with
| Project | What it is | |---------|------------| | Yearning / SQLE | Work-order / pre-approval platforms with a UI | | sqlfluff | SQL linter and formatter | | goInception | Chinese audit engine, often used behind Archery | | DeltaScope | CLI + CI + MCP. No ticket UI. Works offline, or connect for live metadata. |
Quick Start
Audit a risky DML statement:
deltascope audit --sql "delete from users"
Example excerpt:
Verdict: reject
Statements: 1
Blockers: 1
Warnings: 0
Notices: 0
Statement 1: DELETE
- [blocker] dml.where.require: UPDATE and DELETE statements must include a WHERE clause
Audit a CREATE TABLE statement:
deltascope audit --sql "create table tbl_users (id bigint unsigned not null auto_increment comment 'id', created_at datetime not null default current_timestamp comment 'created', updated_at datetime not null default current_timestamp on update current_timestamp comment 'updated', primary key (id)) comment='users' engine=InnoDB default charset=utf8mb4"
Example excerpt:
Verdict: review
Statements: 1
Blockers: 0
Warnings: 1
Notices: 0
Statement 1: CREATE TABLE
- [warning] ddl.column.default.require: column "id" should define a default value
Audit a file:
deltascope audit --file ./migrations/20260328_add_column.sql
Use JSON output for CI or agents:
deltascope audit \
--sql "create table tbl_users (id bigint unsigned not null auto_increment comment 'id', created_at datetime not null default current_timestamp comment 'created', updated_at datetime not null default current_timestamp on update current_timestamp comment 'updated', primary key (id)) comment='users' engine=InnoDB default charset=utf8mb4" \
--format json \
--fail-on warning
Example JSON shape:
{
"verdict": "review",
"summary": {
"statements": 1,
"blockers": 0,
"warnings": 1,
"notices": 0
},
"statements": [ ... ],
"context": {
"mode": "offline",
"dialect": "mysql",
"dialect_source": "default"
}
}
Audit a TiDB statement:
deltascope audit --dialect tidb --sql "alter table users add column email varchar(255) not null"
Audit a PostgreSQL CREATE TABLE with constraints:
deltascope audit \
--dialect postgresql \
--sql "create table orders (id bigint primary key, user_id bigint references users(id), amount numeric not null check (amount >= 0))"
When SQL looks like PostgreSQL but the dialect is set to MySQL, DeltaScope emits an advisory notice without auto-switching:
deltascope audit --sql "insert into users(id) values (1) returning id;"
To audit PostgreSQL SQL explicitly:
deltascope audit --dialect postgresql --sql "insert into users(id) values (1) returning id;"
Generate SARIF output for GitHub Code Scanning:
deltascope audit --file ./migrations.sql --format sarif > deltascope.sarif
Use CI-native output with any dialect:
deltascope audit --dialect postgresql --file ./migrations/20260409_add_index.sql --format github-actions
Write a short review summary to the GitHub Actions run page with --format github-summary:
deltascope audit --file ./migrations.sql --format github-summary --fail-on none >> "$GITHUB_STEP_SUMMARY"
For a complete GitHub Actions workflow that combines a config lint --strict gate, inline github-actions annotations, and a github-summary job summary, see github-actions.yml. Output formats are documented in cli.md.
For GitLab CI, use --format gitlab-codequality and publish gl-code-quality-report.json as a Code Quality artifact; see use-deltascope-in-gitlab-ci.md.
Validate a policy config in CI. A clean config prints Config OK; a config with only replacement-hazard warnings prints Config OK with warnings and exits 0. Add --strict to fail on those warnings:
deltascope config lint --file ./deltascope.yaml --strict
Follow up with deltascope config status to inspect a single rule's effective ON/OFF state.
Search-focused pages
- MySQL DDL audit tool — catch risky MySQL schema changes
- PostgreSQL DDL audit tool — review PostgreSQL schema changes and DCL
- SQL migration risk checker — CI and AI workflow integration
Dialects & Release Archives
Every tag publishes archives named deltascope_<version>_<os>_<arch>.tar.gz containing deltascope, deltascope-server, and deltascope-mcp. All archives support MySQL, TiDB, and PostgreSQL offline audit via --dialect mysql|tidb|postgresql. The installer script, Homebrew Cask, and npm MCP launcher all resolve platform-specific archives from GitHub Release assets. See the audit capability matrix for per-dialect coverage and release notes for version-by-version changes.
DML Impact Estimation
For a selective DML such as DELETE FROM users WHERE id = 42, DeltaScope may add an impact object to the statement result. The object is conservative by design and reports estimated_rows, estimated_ratio, risk_level, confidence, source, reason_codes, and optional notes.
{
"raw_sql": "DELETE FROM users WHERE id = 42",
"impact": {
"estimated_rows": 1,
"estimated_ratio": 0.0001,
"risk_level": "low",
"confidence": "high",
"source": "metadata",
"reason_codes": ["pk_equality"],
"notes": ["refined with table statistics"]
}
}
Offline mode uses SQL shape only. MySQL, TiDB, and PostgreSQL share the bounded single-table id = literal/parameter equality heuristic; PostgreSQL $1 placeholders are supported. Non-equality, OR, range, and unrecognized-column predicates remain unknown, while a missing WHERE remains a full-table estimate. Metadata-aware mode may refine the estimate with read-only table statistics. A live PostgreSQL EXPLAIN estimate remains source: plan and overrides the shape estimate. DeltaScope does not execute the DML and does not run EXPLAIN ANALYZE.
Audit with live metadata (instance-aware rules):
deltascope audit \
--sql "alter table orders add index idx_status (status)" \
--host 127.0.0.1 --port 3306 --user root --ask-password --database app
Metadata-aware audit with an explicit connect timeout (MySQL):
deltascope audit \
--sql "alter table users add column email varchar(255)" \
--dialect mysql \
--host 127.0.0.1 --port 3306 --user root --ask-password --database app \
--metadata-connect-timeout 5s
Metadata-aware audit with PostgreSQL:
deltascope audit \
--sql "alter table orders add column status text not null" \
--dialect postgresql \
--host 127.0.0.1 --port 5432 --user root --ask-password \
--database app --schema public \
--metadata-connect-timeout 5s
Metadata-aware audit over TLS:
deltascope audit \
--sql "alter table orders add column status text not null" \
--dialect postgresql \
--host pg.example.com --port 5432 --user root --ask-password \
--tls-mode enabled --tls-ca-file /etc/ssl/certs/pg-ca.pem \
--database app --schema public --metadata-connect-timeout 5s
Stock MySQL 8.4 auto-generated server certificates have no hostname-valid SAN. Supplying the
server's ca.pem establishes trust but does not make that certificate valid for localhost or an
IP address. For TLS metadata access, use a server certificate with a DNS/IP SAN matching --host
and the corresponding trusted CA; DeltaScope keeps hostname verification enabled.
See all shipped rules:
deltascope rules list
Why DeltaScope
SQL mistakes are cheap to catch before they run and expensive after. DeltaScope gives you one consistent engine across local dev, CI, HTTP service, and MCP so the same policy applies everywhere — no per-tool rule duplication, no dialect surprises.
Key Features
- Create-table governance across identifiers, comments, primary keys, audit columns, charset/collation, indexes, and table options.
- Alter-table governance for destructive actions, compatibility checks, existence validation, and merge guidance.
- Object-lifecycle checks for
CREATE VIEW,DROP TABLE,TRUNCATE TABLE, and database/schema lifecycle DDL across MySQL, TiDB, and PostgreSQL. - DML protections for `WHERE
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
119.2kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
114.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
hyperframes
88.6kOpen-source AI video editor: edit your own footage, or create and remake any video with Claude Code, Codex or the free Studio app. Write HTML, render MP4. By HeyGen.
ruflo
82.3k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
