Feeding Postgres schemas to Claude Code without touching production: daily catalog snapshots via MCP
naked_71 · reddit · 2026-08-21
A small team wants Claude Code / Cursor to help write queries against a Postgres instance that lives only inside their office network, without handing over database credentials. The author walks through ruled-out and candidate approaches:
- Giving the password (even read-only rejected by ops due to real customer data);
- Pasting the schema per session (useless at scale, assistant still hallucinates table names);
- Read-only user + Postgres MCP server (better, but the assistant still reaches into production);
- Catalog-based MCP: a small tool reads the schema once a day (tables, columns, foreign keys, indexes, even actual status-column values) into a workspace; the MCP server serves that snapshot, never the live DB — full isolation at the cost of freshness.
The author finds the catalog route cleanest but barely implemented in the wild, and asks what others are missing.
More from coding & agent
- NVIDIA AVO agent scores 100% on ARC-AGI-3 benchmark — NVIDIAAI · 2026-08-21
- How one founder distributes team-wide Claude skills via a GitHub repo plugin — Roger_M_Taylor · 2026-08-21
- Stacked PRs vanish when Merge Queue is enabled — GitHub admits poor rollout communication — Arindam_1729 · 2026-08-21
- Claude drawing trick: mapping facial features to invisible 3D head coordinates — round · 2026-08-21
- Does AI make you a better developer or just a faster one? — by_lector · 2026-08-21
- Fliggy's AI Agent tackles the 'execution' gap in travel — vista8 · 2026-08-21