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
- Codex tip: use Sol with Astra and Luna sub-agents to save usage — pvncher · 2026-09-11
- agents-best-practices: a provider-neutral Agent Skill for designing and auditing agentic harnesses — tom_doerr · 2026-09-11
- Cognition's SWE-2 uses a KKT duality argument in RL to shift the effort Pareto curve — YouJiacheng · 2026-09-11
- First-ever Three.js Conference lands in Paris, with a panel on AI-shortened design workflows — OdinLovis · 2026-09-11
- Data engineering, not agent frameworks, is the real bottleneck for enterprise AI agents — dhruv2038 · 2026-09-11
- RTK Terminal Compression Cuts Tokens but Leaves Your AI Coding Bill Unchanged — Bartaseth · 2026-09-11