Postgres MCP Server
by Model Context Protocol (reference)
Reference MCP server for Postgres. Read schema, run scoped queries, give agents structured DB access without a dashboard tab.
MCP
Postgres MCP Server
Added 17 May 2026
Overview
The reference Postgres MCP server is part of the modelcontextprotocol/servers monorepo. It teaches the agent the schema, exposes read-only queries by default, and is the cleanest answer when an agent needs to look at production data without anyone copy-pasting a connection string.
Best for
Best for
Teams on raw Postgres (not Supabase) who want agent DB access
Use cases
- Let an agent answer 'what does the schema look like' without a DB GUI
- Run scoped analytical queries in read-only mode
- Use as a starter for your own DB-flavoured MCP server
- Local dev workflow against a Postgres in Docker
Notes
Why it matters
Not every team is on Supabase. The reference Postgres MCP is the cleanest answer for the still-very-large set of teams on raw Postgres or RDS.
How teams use it in production
Pin to a read-only role. Wrap with logging. Use a second server, locked tighter, for the rare write path.
What to watch
The line between this server and a richer “agent DBA” surface (explain plans, query suggestions) is closing. Expect a feature-rich fork within a year.
Pros
- Reference quality, kept current with the protocol
- Read-only default keeps blast radius low
- Tiny codebase, easy to fork for tenant scoping
- Pairs cleanly with every MCP-aware client
Cons
- Writes need a different server or explicit opt-in
- Schema introspection cost on huge DBs
- Connection string handling needs hardening for prod
Pairs with
Other entries in the index that connect to this one. Click through to see the chain.
Claude Code
Anthropic
Anthropic's terminal-native coding agent. Reads your repo, edits files, runs tests, ships PRs.
Cursor
Anysphere
The AI-first code editor. Tab to autocomplete, Composer to multi-file refactor, Agents for the long-running stuff.