Pooled or direct
Neon’s pooled endpoint is the direct hostname with-pooler inserted after the endpoint ID:
PREPARE and EXECUTE statements aren’t supported. Protocol-level prepared statements, which is what drivers actually use, work fine.
sslmode=require isn’t optional — Neon refuses plaintext connections.
SNI routing, and the error when it fails
The Postgres wire protocol doesn’t carry the server hostname, so Neon reads it from the TLS SNI extension to decide which compute endpoint you meant. A client that doesn’t send SNI gets:Create a least-privilege role
Don’t reuseneondb_owner. Create a role for Midplane, from the SQL editor or any psql session:
read.
Give the agent a branch
Neon branches are copy-on-write, so a branch of production costs almost nothing and carries real data. That makes a genuinely useful pattern available: point Midplane at a branch, not atmain.
The agent gets production-shaped data to reason about, schema changes it makes are contained, and you still get the audit trail and column masking on everything it reads. Each branch has its own endpoint hostname, so it’s a separate connection string — add it as another database on the same project, or a separate project if it should stay isolated.
Reach for main only when the agent’s job actually requires live data.
Two things to watch
Autosuspend. A Neon compute scales to zero when idle and takes a moment to wake. The first agent query after a quiet period pays that cold start; it’s latency, not an error, but it can look like a hang in a client with a short timeout. IP Allow. Neon’s IP Allow feature restricts which addresses may connect. Midplane Cloud doesn’t publish a fixed egress IP range, so there’s no entry you can add that admits Midplane without admitting everything — which would defeat the feature. If you need IP Allow enforced, self-host Midplane and allow the address it runs from. See connect your database if that isn’t an option for your team.A note on Neon’s MCP server
Neon ships its own MCP server for managing Neon itself — projects, branches, and the Neon API — and their documentation is explicit that it’s “intended for local development and IDE integrations only,” not for production environments. That’s a fair description of the difference in scope. Midplane fronts the database with a SQL parser, per-table access, and a durable audit trail, which is what makes pointing an agent at data you care about defensible. The two compose: Neon’s server for infrastructure, Midplane for the rows.Next steps
Write a policy
Grant the reads and writes your agent actually needs.
Read the audit trail
Every attempt, decision, and result your agent produced.