Most database MCP servers share one connection string — an engineer adds per-query authorization
Then_Respect_1964 · reddit · 2026-10-17
The author notes that most database MCP servers use one connection string for every query the agent runs — whatever that login can do, the agent can do. Fine for demos, but risky for ad-hoc analytics or debugging agents that end up with far more access than any single task needs.
His solution, built earlier this year, puts an authorization layer between MCP tools and the database:
- Every query is checked against policy first; if allowed, the agent gets a permission scoped to just that query that expires.
- Requests needing approval go to a human for that exact request; sensitive fields can stay masked even after approval.
- Since agents repeat queries often, approved queries are reusable — but the tricky part is re-checking at use time, because the agent's role or environment may have changed since approval.
He documented the whole design, including gaps he found in his own approach, and asks the community: are you scoping access per agent or just using a read-only login?
Related event: Devs add per-query authorization layer for database MCP agents(2 posts)→
More from coding & agent
- A one-shot cron job prompt got Claude to crack ciphers and advance a 1932 number theory bound — IgorCarron · 2026-10-17
- Backend migration from Python to Go now takes one engineer just one week — rakyll · 2026-10-17
- Audio founder says Claude one-shot decompiled rival algorithms, moat gone — ChrisGPT · 2026-10-17
- Google's playbook for agent evals: four layers of checks beyond the vibe check — rseroter · 2026-10-17
- AgentForesight: a 7B online auditor that catches multi-agent failures mid-run — jiqizhixin · 2026-10-17
- Qwen3.8-27B shows a weird write-delete loop in /tmp before every web research task — Training-Respect8066 · 2026-10-17