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
- Stanford's PaperFormalizer turns research papers into Lean-verified versions with author in the loop — StanfordUniversity · 2026-10-27
- Hugging Face TRL makes score centering + masked importance sampling default in async GRPO — _lewtun · 2026-10-27
- AutoResearch agent's weird training curve gets dug into instead of discarded — ZimingLiu11 · 2026-10-27
- Firecrawl offers 2.5x credits to a16z Speedrun founders, unveils $75M Series B — devdigest · 2026-10-27
- Chums: open-source Apple Watch app puts Claude Code and Codex on your wrist — brandon_galang · 2026-10-27
- Open-source Clairic Studio turns pasted text into typed data and working code in 5 languages — dfinke · 2026-10-27