Read the affected rows without executing the mutation.
MCP-native · fail-closed · six SQL dialects
Secure SQL execution for AI agents.
Put a compiler and governance boundary between generated SQL and your databases. hs-sql-agent parses, validates, proves capabilities, applies access policy, and only then executes provider-specific SQL.
docker compose up -d FROM orders
WHERE status = 'ready'
Compiler boundary
Treat generated SQL as untrusted input.
The important part is not generating SQL. It is proving that the statement is inside the dialect, capability, and policy boundary you intended to expose.
Fail-closed SQL compiler
Unsupported syntax is rejected instead of being silently rewritten into something with different semantics.
02 / DMLHuman-approved DML
Preview impact, bind approval to the validated plan, then revalidate the row set inside the commit transaction.
03 / DIALECTSSix database dialects
PostgreSQL, MySQL, SQL Server, Oracle, SQLite, and Firebird behind one MCP surface.
04 / POLICYGoverned by default
Per-key database scope, table allowlists, tool restrictions, rate limits, security policy, and auditability stay outside the LLM.
Safe mutation path
DML approval is a protocol, not a confirmation dialog.
UPDATE and DELETE are previewed without mutation, approval is bound to the validated compiled plan and row-set fingerprint, and the matched rows are checked again before commit.
Require explicit MCP form Elicitation from the human operator.
Re-query inside the commit transaction and compare the bound row set.
Execute only when the plan, policy, challenge, row count, and row set still match.
One surface, six dialects
Use the database you already run.
The compiler keeps provider-specific SQL semantics explicit while MCP clients interact through a single governed interface.
MCP and .NET integrations
Meet agents where they already work.
Connect remote MCP clients such as Claude Desktop and Cursor, or embed the same governed server boundary inside an ASP.NET Core application.
Documentation
From first MCP key to production governance.
The documentation is organized around the way operators actually adopt hs-sql-agent: setup, MCP, compiler guarantees, administration, integrations, operations, and development.