SQLite Guard

•

Empower AI agents to interact with SQLite databases securely by enforcing read-only queries, dry-run-first writes, automatic pre-write backups, and an append-only audit trail.

SQLite Guard provides an MCP server designed to allow AI agents to work with SQLite databases without compromising data integrity. It addresses the common challenge of AI agents making unintended changes by implementing robust guardrails: all read operations are enforced as genuinely read-only at the C-level, write operations require a two-step dry-run and explicit confirmation, and every committed write is preceded by an automatic backup and recorded in a transactional audit log. This system ensures that agents can keep books and manage data effectively, while human operators retain transparency, control, and the ability to easily revert unintended changes, mirroring best practices from traditional operations into the realm of AI-driven database management.

主要功能

01Automatic pre-write backups using `VACUUM INTO` for transactional consistency
02Dry-run first writes with full execution and explicit confirmation for commitment
030 GitHub stars
04Append-only audit trail for all committed writes, synchronized transactionally with changes
05Hard read-only queries enforced by `SQLITE_OPEN_READONLY` at the C level
06Single-statement write execution to prevent SQL injection and chained commands

使用案例

01Safely allowing AI agents to manage personal finance or similar sensitive data within SQLite databases.
02Providing human operators with transparent oversight and a controlled plan/apply mechanism for agent-initiated database modifications.
03Integrating secure and audited SQLite database operations into any AI agent built with the Model Context Protocol (MCP).