Cursor has access to your database. Guardrails decide what it can do with it.
Cursor agents can read schemas, write queries, and alter tables. Civic makes sure they stay read-only, unless you say otherwise.
Cursor ran ALTER TABLE on production. To fix a slow query.
Just imagine, one day…
You ask the Cursor agent to check why a query is slow. It connects to your Postgres database, reads the schema, and spots a missing index. Reasonable so far.
Then it runs ALTER TABLE on production to add the index. The table locks. Reads queue behind the write lock. The API starts returning 504s. By the time your pager fires, 3 minutes of requests have timed out and your queue is backed up.
The agent found the right fix. It just applied it to the wrong environment.
Without guardrails, Cursor decides what is safe to run.
It does things you did not intend
You asked it to diagnose a slow query. It ran DDL on production. The diagnosis was correct. The action was catastrophic.
You cannot prove what happened
No audit trail of which queries it ran, which connection string it used, or why it chose production over staging. You're reading Postgres logs after the fact.
You cannot stop it fast enough
ALTER TABLE executes in milliseconds. By the time the table lock cascades to API timeouts, the damage is done. There's no undo for a production schema change.
It gets confused and you never know
The connection string in .env pointed to production. The agent didn't ask which environment. It just connected and started fixing things.
Cursor calls Civic. Civic calls your database. You control the access.
Connect Cursor through Civic in three steps
Add Postgres (production and staging).
Allow SELECT and EXPLAIN on production.
Block DDL and writes on production.
Allow full access on staging.
Done. 2 connections configured:
✓ Postgres (prod) — read-only
✓ Postgres (stg) — full access
Your MCP URL is ready to copy.
The same scenario. Different outcomes.
Without Civic, Cursor has raw database access. With Civic, DDL on production is blocked before it reaches the server.
Cursor is fast. Civic makes sure it does not break production.
Your agent debugs queries all day. Spend 10 minutes making sure it can't alter production tables without you.