Policy-based SQL firewall for LLM agents and Text-to-SQL. Validates and rewrites generated SQL before execution. Includes a read-only MCP server.
Your model writes SQL. sqlguardllm makes sure it can only read what it's allowed to read: one read-only statement, allowlisted tables and columns, row-level filters per user, and a row limit, in any of the 32 dialects sqlglot speaks.
[!NOTE] Status: alpha. 0.5.0a8 is on PyPI (pip install sqlguardllm, import sqlguardllm), with the rules of docs/DESIGN.md, optional complexity limits and a 148-case development corpus. The API may still change before 1.0; violation codes are stable. ⭐ Star the repo to follow along, and tell us what you think in Discussions.
Full documentation: https://jmmana.github.io/sqlguardllm/
Run the local stdio server with your MCP client.
Directory Status --- --- MCP Registry 🟢 Published, version 0.5.0a8 Glama 🟢 Published listing Awesome MCP Servers 🟡 Contribution open for review OWASP GenAI Crosswalk 🟡 Contribution open for review
Python 3.10+: the engine itself, inside your process.
Node.js / TypeScript 18+: runs the embedded engine (no Python, no server) or talks to sqlguardllm serve.
.NET 8 or 10: runs the embedded engine (no Python, no server) or talks to sqlguardllm serve.
The server is optional for Node.js and .NET: their packages carry the engine and run it locally (SqlGuard.local / SqlGuard.CreateLocalAsync). Run it, in another terminal (Python 3.10+), when several services share one policy or your platform has no embedded engine. No Docker image is published; the Dockerfile builds one if you need it.
From the project README.
Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/jmmana--sqlguardllm.html)
Stateless governance proxy for MCP (2026-07-28): policy, dry-run, human confirmation, audit, tracing
PyModel/jev-judge-mcpTyped judgment tools for MCP agents. TypeSafe's Jev model as verify, screen, find, classify, rerank, decide, compare, extract, review, gate, and score: the model judges, policy decides auto, review, o
CTRLRun/ctrlrunThe execution safety layer for AI agents.
VirajMishra1/bouncerIntent firewall for AI agents — NVIDIA Nemotron checks every tool call against the user's goal and blocks prompt-injection hijacks before they run.
alikarami76/keygraphSchema map for data analyst and text-to-SQL agents: join paths, keys, grain and status codes served to LLM agents over MCP, CLI --json or markdown, plus an offline explorer. MySQL, PostgreSQL, SQLite,
agent-chaperone/agent-chaperoneScreens an AI agent's tool calls before they run and tool results before the agent reads them. An MCP proxy plus a hooks adapter for a client's built-in tools.
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.