Sqlsure MCP server
Semantic SQL inspector: catches double-counting, wrong joins, PII exposure before execution.
99 stars123 downloads/wk
Reviews
Write oneNobody has reviewed Sqlsure yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Sqlsure tools (2)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
check_sqlValidate a SQL query against the semantic model before execution.
describe_modelThe semantic rulebook: tables with grain/measures/sensitive columns, and declared join edges with cardinality and keys. Use this to plan safe queries before writing SQL.
Public scan report
scanner v0.1.9 · 2026-09-26 · same rubric, same numbers if you re-run it
- Code scan9 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 70 days ago12/15
- Maintainer identityregistry namespace matches repository owner7/10
What the publisher says
From the Sqlsure repository's README, as published. We do not edit it. Read it on GitHub
sqlsure
AI writes your SQL. sqlsure makes sure it's right.
A query can be perfectly valid, run without error, and return a number that's silently wrong — revenue double-counted by a join, an average summed, a patient identifier exposed. Databases don't catch this. Linters don't catch this. LLMs reviewing their own SQL don't catch this.
sqlsure does — deterministically, in 0.1 ms, before the query runs.
Proof, not promises: we ran sqlsure over the gold answers of the two
benchmarks every text-to-SQL model is graded on. **2,568 expert-written
queries, 45 flags, zero false alarms** — including a BIRD dev gold answer
that is provably wrong by 8× from the exact
bug class sqlsure targets, and a schema defect
now filed upstream.
How it works
sqlsure judges SQL against facts your team already declared — dbt unique tests become grain, relationships tests become join cardinality, one-line meta tags mark what's safe to sum. No new language to learn, no model to maintain by hand. Rules are dictionary lookups, not LLM calls: same input, same verdict, every time, offline.
Every rejection carries a machine-actionable fix, so AI agents self-repair: draft → check → fix → check → execute. In our benchmark, applying the fix verbatim produced a passing query 10/10 times.
Quick start
pip install sqlsurefrom sqlsure import SemanticModel, check
violations = check(sql, model) # [] means semantically safeOr clone and run the 30-second demo:
python check.py # 5 wrong queries rejected, 1 approved — with fixes
python -m sqlsure.scan path/to/dbt-repo --report report.md # audit any dbt repoThree doors, one engine
1. CI gate — blocks the merge when a PR double-counts:
python -m sqlsure.cli --model model.json query.sql # exit 1 on violations2. MCP server — your AI agent must pass inspection before executing:
claude mcp add sqlsure -- python -m sqlsure.mcp_server --model /abs/path/model.jsonSee docs/MCP.md for tool reference and agent-loop patterns.
3. Library — embed check() inside any text-to-SQL product or agent framework. A drop-in SemanticGate wraps Vanna/WrenAI-style generators; a semantic eval metric scores NL2SQL output where execution-accuracy is blind.
Also available as an Agent Skill — a single SKILL.md your agent loads directly; no server process needed.
The rules (v0.1)
When sqlsure can't verify something, it says "can't verify" — never "looks fine." Honest uncertainty is a feature.
Trust properties
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Install directly
claude mcp add sqlsure -- uvx sqlsure
Sqlsure: common questions
- Is Sqlsure MCP server safe?
- Yes, by our scan: it is graded A (86/100). Read the Sqlsure safety report
- How do I install Sqlsure?
- It runs on your machine. Copy the Claude Code, Claude Desktop or Cursor config from the install section.
- Does Sqlsure need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Sqlsure maintained?
- The last commit was 71 days ago (2026-07-18). The latest release is v0.1.1.
- What can I use instead of Sqlsure?
- Servers from other publishers that do the same job: Amnesic MCP server, Shrike MCP server and DBHub MCP server. Compare all Sqlsure alternatives.
Alternatives to Sqlsure
Same job from other publishers: the closest match first, then the best rated.
- AmnesicPersistent semantic memory for SQL databases. Postgres, MySQL, MSSQL, SQLite.not reviewedGrowingA
- ShrikeGoverns what AI agents do: tool calls, SQL, commands, files checked against policy before they run.not reviewedGrowingA
- DBHubToken-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLitenot reviewedWidely usedA
- GeoLensRead-only access to a self-hosted GeoLens spatial catalog: datasets, features, maps, sandboxed SQL.not reviewedEstablishedB
- LINQ to DBInspect database schemas and execute SQL queries across multiple database providers with LINQ to DB.not reviewedEstablishedA