Sqlsure MCP server
io.github.sqlsure/sqlsure·v0.1.1·99 starsSemantic SQL inspector: catches double-counting, wrong joins, PII exposure before execution.
99 stars170 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.10 · 2026-11-08 · 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 113 days ago8/15
- Maintainer identityregistry namespace matches repository owner7/10
How Sqlsure compares
Against every graded Databases MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 80/100
- higher than 50% of 802 Databases servers
- Tools
- 2
- the typical Databases server has 10
- Tools that change things
- 0%
- typical: 7%. Fewer write tools means less an agent can break
- GitHub stars
- 99
- more than 93% of 604 Databases servers
- Downloads a week
- 170
- more than 61% of 411 Databases servers with a package
What its tools let an agent do: 2 read
Install Sqlsure in Claude Code, Cursor or VS Code
claude mcp add sqlsure -- uvx sqlsure
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.
Grade history
- 2026-11-08downgradeA → Bscore 80
Sqlsure: common questions
- Is Sqlsure MCP server safe?
- Mostly: it is graded B (80/100). Read the Sqlsure safety report
- How do I install Sqlsure?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop 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 120 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: Orionbelt Semantic Layer MCP server, DBHub MCP server and Motherduck MCP server.
- How does Sqlsure compare with other Databases MCP servers?
- safety score 80/100 (higher than 50% of 802 Databases servers); tools 2 (the typical Databases server has 10); tools that change things 0% (typical: 7%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Sqlsure
Same job from other publishers: the closest match first, then the best rated.
- Orionbelt Semantic LayerAPI-first semantic layer MCP server compiling YAML models into dialect-specific SQLnot reviewedEstablishedA
- DBHubToken-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLitenot reviewedWidely usedA
- MotherduckSQL analytics and data engineering for AI Assistants and IDEsnot reviewedEstablishedA
- KeboolaConnect your AI assistants to Keboola and expose your data, transformations, SQL queries, ...not reviewedEstablishedA
- Ekwo OS — open source accounting: ledger, invoices and VAT on your own Supabase or PostgresDouble-entry books an agent keeps as the user: invoices, VAT returns, 174 country packs.not reviewedEstablishedA