Connect PostgreSQL to your AI agents

Query and inspect PostgreSQL databases with read-only access.

Connection details

Transport
npm package, run by Warpgate in an isolated container
Authentication
API keys or tokens, stored encrypted as environment variables
npm package
@modelcontextprotocol/server-postgres
Environment variables
  • POSTGRES_CONNECTION_STRING Connection String (postgresql://user:pass@host/db)

How to connect PostgreSQL

  1. 1

    In Warpgate, open MCP Servers, choose Add Server and pick PostgreSQL from the presets.

  2. 2

    Enter the environment variables listed above. Warpgate stores them encrypted and passes them only to the PostgreSQL server.

  3. 3

    Create an endpoint, choose which servers it may reach, and paste its URL into Claude, Cursor or any MCP client.

Why connect PostgreSQL through Warpgate

One endpoint

Your team adds a single Warpgate URL instead of a PostgreSQL config on every laptop.

Scoped access

Choose which endpoints may reach PostgreSQL, and which of its tools are enabled.

Audit trail

Every PostgreSQL tool call is logged: who called what, when, and how long it took.

Ship your MCP gateway today

Connect your first server in under five minutes. No credit card required.