PostgreSQL Official
Let an agent inspect a Postgres schema and run read-only queries.
- Transport
- stdio
- Package
- @modelcontextprotocol/server-postgres
- Registry id
- —
No install snippet on purpose. A working MCP config is a command, its arguments and an environment block — the last two are where API keys live, so this catalogue never stores them and cannot publish them. Follow the link above for the authors' own instructions.
Exposes a database's schema and a read-only query tool, so an agent can answer questions about your data instead of guessing at your column names.
Read-only is the feature
The server issues queries inside a read-only transaction. That is not a limitation to work around — an agent with write access to a production database is a category of accident that does not need inventing. If you want an agent to change data, have it write a migration a person reviews.
Where it fits
Exploratory analysis, "which table does this actually live in", and writing queries against a schema too large to hold in your head. It pairs well with a filesystem server pointed at the repo that owns the schema.
Worth knowing
- Point it at a replica or a development copy where you can. The connection is as privileged as the credentials you give it, and read-only is enforced by the server rather than by the database unless you also use a restricted role.
- Large result sets become large tool results. Ask for aggregates, not dumps.