One governed MCP surface
Expose SQLite without handing the model an unrestricted database connection.
SQLite · MCP
Connect AI clients to SQLite through hs-sql-agent's MCP surface, typed SQL compiler, access policy, Safe DML workflow, and audit boundary.
Expose SQLite without handing the model an unrestricted database connection.
Keep SQLite-specific SQL semantics inside an explicit source/target capability boundary.
Apply database scope, table policy, tool restrictions, rate limits, Safe DML, and audit before commit.
hs-sql-agent does not treat a model-generated SQLite statement as trusted simply because the provider could execute it. SQL first enters the typed validation and capability pipeline.
Provider support means the runtime can connect, inspect metadata, compile supported statements, and execute them under policy. It does not mean every vendor-specific syntax form is accepted automatically.
MCP clients can discover schemas, tables, and columns through the built-in metadata tools before constructing SQLite SQL. This reduces blind schema guessing and keeps discovery inside the same authenticated database scope.
The SQLite path follows the same rule as every other provider: unsupported syntax or cross-provider semantics are rejected at the appropriate validation/capability boundary rather than silently rewritten into a query with different behavior.
SQLite has a smaller, distinct SQL surface and its own version-dependent capabilities. hs-sql-agent validates the declared SQLite source rather than assuming server-database syntax applies unchanged.
Recursive CTE support is guarded by a SQLite 3.8.3+ capability floor, while typed temporal literal syntax such as DATE '2026-08-24' is rejected for SQLite source SQL.
| Compiler contract example | Behavior |
|---|---|
WITH RECURSIVE ... | Requires SQLite 3.8.3+ when the declared server version is evaluated. |
SELECT DATE '2026-08-24' | Rejected as unsupported SQLite source-dialect syntax. |
These examples are a search-oriented summary of the compiler boundary, not a complete SQL compatibility matrix. Unsupported or unproven semantics continue to fail closed.
The MCP tool surface is shared, but each database keeps its own source grammar, capability checks, and provider-specific rendering rules.
Direct database credentials make the model or MCP client responsible for everything the database account can do. hs-sql-agent keeps the real SQLite connection server-side and evaluates SQL against the compiler, MCP-key scope, table policy, tool restrictions, and runtime limits before execution.
That keeps raw SQL available as an expressive agent interface without turning generated SQL into unrestricted database authority.