Integrations

How to connect PostgreSQL to AI agents?

Connect a cloud-hosted PostgreSQL database to Sequel and query it in plain English — from the Sequel app or any AI tool wired up to the MCP server. This works with managed Postgres anywhere: Amazon RDS/Aurora, Supabase, Neon, Render, Railway, Heroku, Digital Ocean, and similar.

What you'll need

  • A cloud-hosted PostgreSQL database reachable over the internet.
  • A database connection string (or host, port, database, user, and password).
  • A user with read access to the schemas you want to query.

Use a read-only user

Create a dedicated read-only role for Sequel. It's the simplest way to guarantee queries can't modify your data, and it scopes access to just the tables you intend to expose.

Connect it

Open a new connection

In the Sequel dashboard, go to Connections → New connection and choose PostgreSQL.

Enter your connection string

Paste your connection string. It usually looks like this:

Connection string

postgresql://USER:PASSWORD@HOST:5432/DATABASE?sslmode=require

Most managed providers require SSL — keep sslmode=require unless your provider says otherwise.

Allow Sequel through your firewall

Sequel connects to your database from a fixed set of IP addresses. If your database (or its provider's firewall/security group) restricts inbound traffic, add Sequel's egress IPs to the allowlist so the connection test can reach it.

The exact IPs to allowlist are shown on the connection screen — copy them from there into your provider's networking settings (e.g. RDS security groups, Supabase network restrictions, Neon IP allow).

Test and save

Sequel verifies the credentials and reads your schema. A green check means it's live.

Try it

Once connected, ask things like:

  • "How many rows are in each table?"
  • "Show me the 10 most recently created users."
  • "What foreign keys reference the orders table?"
  • "Plot daily signups for the last 30 days."

Troubleshooting

SymptomLikely fix
Connection test times outDatabase isn't reachable from the internet, or a firewall is blocking Sequel — add Sequel's egress IPs (shown on the connection screen) to your allowlist.
SSL/TLS errorAdd or adjust sslmode (commonly require) to match your provider.
"Permission denied" on a tableThe user lacks SELECT on that table or schema — grant read access.