Best for
- Analysts and developers exploring PostgreSQL data through natural language
- Teams exposing schema and query access through a dedicated read-only account
The read-only interface reduces destructive risk, but database credentials, sensitive query results, and query load still need controls; no live database handshake is recorded yet.
This server connects to PostgreSQL in read-only mode and exposes schema information alongside query access. It helps models write and explain SQL without modifying production data, making it useful for analysis and troubleshooting.
Pass a PostgreSQL connection string as a startup argument. Use a dedicated read-only database account.
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://readonly:pwd@localhost/db"
]
}
}
}