Skip to main content

PostgreSQL MCP Server

io.github.musaddiq-dev/postgresql-mcp-server

v0.1.2Updated May 23, 2026stdio · PyPI

Python MCP server for PostgreSQL database inspection and querying

Install

Replace 2 placeholders with your own values.

Run in your terminal. Replace 2 placeholders.

claude mcp add postgresql-mcp-server -e POSTGRES_HOST=localhost -e POSTGRES_PORT=5432 -e 'POSTGRES_USER=<your-postgres-user>' -e 'POSTGRES_DB=<your-postgres-db>' -e POSTGRES_READ_QUERY_LIMIT=1000 -- uvx mdev-postgresql-mcp-server==0.1.2

Configuration

6 settings.

  • POSTGRES_HOST
    Env var· required
    PostgreSQL hostDefault: localhost
  • POSTGRES_PORT
    Env var· required
    PostgreSQL portDefault: 5432
  • POSTGRES_USER
    Env var· required
    PostgreSQL username
  • POSTGRES_DB
    Env var· required
    PostgreSQL database name
  • POSTGRES_PASSWORD
    Env var· optional· secret
    PostgreSQL password
  • POSTGRES_READ_QUERY_LIMIT
    Env var· optional
    Maximum rows returned by read queriesDefault: 1000

Listed in the official MCP Registry since May 23, 2026. Mirrored daily; last checked Nov 26, 2026.