Indexes the coding-agent sessions already sitting on your disk — months of history from before you installed it — and serves them back over MCP. 3.5 GB searched in ~1.5 ms, no LLM, no embeddings.

PostgreSQL
Summary
Read-only PostgreSQL access with automatic schema inspection — the reference MCP server for Postgres.
Features
- Read-only SQL access to any PostgreSQL database
- Automatic schema inspection for every table
- Single-argument setup with a connection string
Installation
Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.
Description
The reference PostgreSQL MCP server gives an assistant read-only access to a database, along with the schema information it needs to write correct queries.
What it does
- Read-only query execution. Every statement runs inside a read-only transaction, so an assistant cannot modify data even if it decides to try.
- Schema resources. Each table is exposed as a resource with its column names and types, so the model works from the actual schema rather than inferring one from table names.
Why the read-only constraint is the point
Giving a language model write access to a production database is a decision that deserves more thought than a config file entry. This server removes the question entirely, which makes it a sensible default for analysis, debugging, and answering questions about data.
Setup
One argument — the connection string — and you are running: npx -y @modelcontextprotocol/server-postgres postgresql://host/db. For write access or broader database support, DBHub and vendor-specific servers are better choices.
Part of the MCP reference server collection, now maintained in the archived servers repository.
Related MCP Servers
Weaviate's MCP server, built into the database itself — hybrid search, schema inspection, tenant listing and batch upserts at /v1/mcp, scoped by RBAC.
Google's open-source MCP server for enterprise databases — one binary that fronts AlloyDB, BigQuery, Spanner, Postgres, MySQL, Oracle, MongoDB, Snowflake and more.
A universal database MCP server — one integration for PostgreSQL, MySQL, SQL Server, SQLite, and MariaDB.
