query runs SELECT and execute runs INSERT, UPDATE and DELETE, which puts the distinction where a reviewer of tool calls can see it instead of inside an SQL string. The default connection comes from configuration and connect_db is the exception — its own description says to reach for it only when asked or when other commands fail. Schema exploration exists before any SQL is written, which matters on a database nobody on the call has seen.
A PostgreSQL client of 6 tools that takes its connection from the environment and keeps reads and writes on separate tools.
- Parameterised reads through query, which takes the SQL text and a params array.
- Writes through execute, covering INSERT, UPDATE and DELETE.
- Schema discovery — list_schemas across the database, list_tables within a schema, describe_table for one table's structure.
- A connection that is already in place from configuration, with connect_db available to point the session at a different host or database.
A reachable PostgreSQL database, addressed by PG_HOST, PG_PORT, PG_USER, PG_PASSWORD and PG_DATABASE.
One command plus a key — npx mcp-postgres-server, then supply credentials
