SQL Client Adds MCP Security Gateway
rohithgilla · reddit · 2026-07-18
The author added an MCP server to their desktop SQL client, data-peek, allowing Claude Code or any MCP client to connect directly to a live database.
Key Design
- Read-only queries allowed: listschemas, runquery, and explainquery run inside read-only, rolled-back transactions with a 500-row limit.
- Approval for writes: executestatement triggers an in-app confirmation dialog displaying the full SQL; it only executes upon clicking Approve, with a 60-second timeout auto-reject.
- Auditable: Local logs use a hash chain to prevent tampering, supporting verification and export.
- Secure by default: Disabled by default, restricted to localhost, and protected by a bearer token so credentials are never exposed.
The author included a demo video, source code, and configuration docs, noting they are the developer and welcoming discussions on approval workflows and read-only transaction encapsulation.
More from coding & agent
- Soft Clamp cuts tool-call overuse in multi-teacher distillation, from 13.7% to 9.0% — antgroup · 2026-07-21
- SpecJudge runs locally on Ollama to pick the right-sized AI model for your project — jokiruiz · 2026-07-21
- A developer maps out six design rules for CLIs that humans and AI agents can both use — yujiezha · 2026-07-21
- A coding-agent skill that forces ADHD-friendly, answer-first output — ayghri · 2026-07-21
- A set of agent skills for CAD, robotics, and hardware design — earthtojake · 2026-07-21
- Outlines keeps LLMs on-rails with structured outputs — dottxt-ai · 2026-07-21