MoreAI.tools
Postgres MCP preview
82
Stack Score
Editorial pickMCP server
Postgres MCP logo

Postgres MCP

Query any Postgres database from Claude.

Try Postgres MCP

Best for

Engineers and analysts who want Claude to read or write a Postgres database without switching to a SQL editor.

At a glance

Pricing
free
Setup time
15 minutes
Learning curve
medium
Last verified
5/26/2026

What we love

  • First-party reference MCP — battle-tested and well-documented
  • Zero-cost — install once and Claude can query your DB forever
  • Read-only mode makes it safe to expose production databases

Where it falls short

  • No connection pooling — long-running queries can hit timeouts
  • Schema-aware but not data-aware — Claude doesn't know your business logic
  • Setup requires comfort with a config JSON and a Postgres URI

Install & connect

Copy-paste ready

Install
shell
npx -y @modelcontextprotocol/server-postgres "postgresql://user:pass@host:5432/db"
Config — Claude Desktop
json
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://user:pass@host:5432/db"
      ]
    }
  }
}
Config — Cursor
json
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://user:pass@host:5432/db"
      ]
    }
  }
}
Config — Claude Code
shell
claude mcp add postgres -- npx -y @modelcontextprotocol/server-postgres postgresql://user:pass@host:5432/db

Pricing

✓ Pricing verified Jun 14, 2026

1 tier

Open source

$0

MIT license

  • Self-hosted
  • Free forever
  • Read-only mode supported

Why we picked it

For Postgres outside Supabase — works on any database with a connection string.
— MoreAI.tools editor

Overview

Official Postgres MCP — read-only SQL queries against any Postgres instance. Strong sandboxing for prod safety.

Key features

  • Query any Postgres database from Claude via natural language
  • Read-only or read-write modes — set permissions at config time
  • Schema introspection — Claude sees tables, columns, and types automatically
  • Connection via standard Postgres URI — no proprietary protocol
  • Works with Supabase, Neon, RDS, and self-hosted Postgres
  • Open-source reference implementation from the MCP spec authors

Exposed tools

The MCP-tool names this server exposes. Your agent can invoke any of these when this server is connected.

  • query
    Execute a read-only SQL query against the connected Postgres database. Schema introspection is automatic so Claude sees tables, columns, and types without extra setup.

Best use cases

Ad-hoc analytics

Ask Claude to pull metrics or run summaries against a production read replica without writing SQL.

Debugging data issues

Investigate a customer support ticket by querying their account directly from Claude.

Schema documentation

Have Claude describe your tables and relationships from the live introspection.

Integrations

Supabase
Neon
Amazon RDS
Postgres
Claude Desktop
Claude Code

Similar tools

See all mcp

One AI Stack pick every week.

The tool we’d pay for this week, why we’d pay for it, and what we’d skip. No promo spam.