← Reddit

I got tired of AI coding agents running dangerous SQL against my databases, so I built Bollard.

Reddit · Hour-Walrus-6633 · June 18, 2026
An open source tool named Bollard was created to serve as a safety gateway between AI coding agents and databases, addressing issues with dangerous SQL execution and excessive result set dumps into context windows. The MCP server includes query previewing, sensitive table blocking, confirmation prompts for risky operations, result set summarization, and query history tracking to manage database interactions safely. Built in Python, Bollard is available on GitHub and PyPI for teams seeking to secure AI agent database access.

Detailed Analysis

Bollard, a new open-source Python project published to PyPI and GitHub, addresses a concrete pain point emerging from the growing use of AI coding agents in database workflows: the risk of poorly controlled SQL execution. The developer, posting to the r/ClaudeAI subreddit, describes a pattern familiar to many practitioners — AI agents such as Claude are increasingly capable of generating and running SQL queries autonomously, but without safeguards, they can produce dangerous write operations, dump enormous result sets into context windows, or interact with sensitive tables in ways that create security and stability risks. Bollard inserts itself as an MCP (Model Context Protocol) gateway between the AI agent and the database, providing query preview before execution, table-level blocking, confirmation prompts for risky writes, result set summarization, and query history tracking.

The project reflects a pragmatic response to a genuine workflow gap. The developer explicitly acknowledges the existing workaround — manually copying SQL between a chat interface and a tool like DBeaver or pgAdmin — but correctly identifies it as high-friction and error-prone. Each round trip requires the user to copy queries, execute them, return results to the model, and manually audit for dangerous patterns. Bollard automates the safety layer while preserving the convenience of direct agent-to-database communication, effectively decoupling the productivity benefit of agentic SQL generation from the risk exposure that comes with unrestricted execution rights. The summarization feature is particularly notable: uncontrolled result sets are one of the more insidious failure modes in agentic database use, where a simple `SELECT *` on a large table can exhaust a model's context window and degrade the quality of subsequent reasoning.

The project's existence and its community framing — asking for feedback on trustworthiness and workflow fit — illuminate a broader tension in the current AI agent ecosystem. MCP, Anthropic's open protocol for connecting AI models to external tools and data sources, has lowered the barrier to integrating Claude and similar models with live systems, but it has also expanded the attack surface and the blast radius of model errors. Bollard is an early example of a category of tooling that might be called "agentic guardrails infrastructure" — middleware designed not to limit what an AI can do conceptually, but to enforce human-in-the-loop checkpoints at the moment of consequential action. This mirrors patterns seen in other high-stakes automation contexts, such as CI/CD pipeline approval gates or financial transaction review queues.

More broadly, Bollard's emergence points to an important maturation phase in the agentic AI tooling landscape. As AI agents move from generating suggestions to executing actions — writing to databases, calling APIs, modifying files — the community is beginning to build the operational scaffolding that enterprise and production use cases will demand. Safety gateways, audit trails, permission scoping, and result normalization are not novel concepts in software engineering, but applying them specifically to the interface between large language models and live data systems is still nascent work. The fact that this project originated from direct personal frustration, rather than from an AI safety research lab, suggests that practitioners are encountering these failure modes at sufficient frequency to motivate real engineering investment. Whether Bollard or projects like it become standard components of agentic database workflows will depend heavily on how the developer community responds to the open questions the author poses: trustworthiness, completeness of the feature set, and friction-to-benefit ratio in real production environments.

Read original article →