MCP server

Postgres

MCP

SQL against the database you point at.

Official Postgres reference server. Queries go to the URL you set. Writes are yours to allow.

latest·MIT·Updated this quarter·github.com/modelcontextprotocol/servers·Transport: stdio

Claude CodeCursorVS CodeDesktop
Scanned

claude_desktop_config.json

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres"
      ],
      "env": {
        "DATABASE_URL": "postgres://…"
      }
    }
  }
}

By Model Context Protocol

Spec

What the server actually exposes.

  • query

    read

    Run SQL and return rows.

Guardrails

  • URL is yours
  • Prefer a read-only role
  • No implicit migrations

mcp-postgres.mcp/tools

Tools

  • query

    Run SQL and return rows.

    read

Last call

{ "ok": true,
  "tool": "query",
  "rows": 12 }

Other servers worth installing

Discussion

No notes yet. Be the first hunter to report back.