PostgreSQL
Read-only Postgres access — schema introspection and SQL queries.
Install
Add this command to your MCP client config to connect PostgreSQL.
npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydbAbout PostgreSQL
The Postgres server connects to a PostgreSQL database (or any libpq-compatible target) and exposes schema introspection plus read-only query execution.
It deliberately limits writes by default. The intended workflow is: the assistant explores tables, indexes, and constraints; reasons about a query; and runs SELECTs to validate. For writes, you typically pair it with a migration tool or run statements through your application code.
Use it for ad-hoc analytics, "explain this slow query" sessions, and onboarding new engineers to an unfamiliar schema.
Tags
Related servers
Other MCP servers in Data and beyond.
SQLite
Anthropic
Query and mutate SQLite databases from your AI client.
Supabase
Supabase
Manage Supabase projects: schema, data, edge functions, and auth.
MongoDB
MongoDB
Query MongoDB collections and aggregations from your AI assistant.
DuckDB
DuckDB
Run analytical SQL on local files via DuckDB and MCP.
Redis
Redis
Query and manage Redis instances through MCP.
Elasticsearch
Elastic
Search and analyze Elasticsearch indices via MCP.