postgres-mcp-readonly 0.1.7

Read-only MCP server for PostgreSQL and TimescaleDB
Documentation
# Throwaway databases for the integration suite. Test-only credentials, loopback-only ports.
name: pgmcp-test

x-pg-env: &pg-env
  POSTGRES_USER: postgres
  POSTGRES_PASSWORD: test-only-superuser
  POSTGRES_DB: appdb

services:
  timescale:
    image: timescale/timescaledb-ha:pg18@sha256:cfde258edee845c7ad0879e87a20c28600d4b9a7599ec22884a5aa65493716cf
    environment: *pg-env
    command:
      - postgres
      - -c
      - shared_preload_libraries=timescaledb,pg_stat_statements,pgaudit
      - -c
      - logging_collector=on
      - -c
      - log_destination=jsonlog
      - -c
      - log_min_duration_statement=0
      - -c
      - max_prepared_transactions=4
      - -c
      - max_connections=300
      - -c
      - pgaudit.log=ddl
    ports:
      - "127.0.0.1:15432:5432"
    volumes:
      - ./docker/initdb:/docker-entrypoint-initdb.d:ro
      - ./sql:/sql:ro
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d appdb && psql -U postgres -d appdb -Atc 'select 1 from pgmcp_seed_done' "]
      interval: 2s
      timeout: 5s
      retries: 90

  pg19:
    image: postgres@sha256:aaa10f7ba7328b4a221a6c3184d83eef885bd16bf1f6de864757863156b0a4d1
    environment: *pg-env
    command:
      - postgres
      - -c
      - max_connections=300
      - -c
      - logging_collector=on
      - -c
      - log_destination=csvlog
      - -c
      - log_min_duration_statement=0
    ports:
      - "127.0.0.1:15433:5432"
    volumes:
      - ./docker/initdb:/docker-entrypoint-initdb.d:ro
      - ./sql:/sql:ro
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d appdb && psql -U postgres -d appdb -Atc 'select 1 from pgmcp_seed_done' "]
      interval: 2s
      timeout: 5s
      retries: 90

  # PostgreSQL 19 with TLS: the certificates are generated at first start by docker/tls-initdb, never committed.
  pgtls:
    image: postgres@sha256:aaa10f7ba7328b4a221a6c3184d83eef885bd16bf1f6de864757863156b0a4d1
    environment: *pg-env
    command: [postgres, -c, max_connections=300]
    ports:
      - "127.0.0.1:15435:5432"
    volumes:
      - ./docker/tls-initdb:/docker-entrypoint-initdb.d:ro
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d appdb && psql -U postgres -d appdb -Atc 'select 1 from pgmcp_seed_done' "]
      interval: 2s
      timeout: 5s
      retries: 90

  pg15:
    image: postgres@sha256:91b9edc40277faf94bc1e3d7ae621b185fa70f3099b94309c4731a8296114870
    environment: *pg-env
    ports:
      - "127.0.0.1:15434:5432"
    command: [postgres, -c, max_connections=300, -c, logging_collector=on, -c, log_destination=stderr, -c, log_min_duration_statement=0]
    volumes:
      - ./docker/initdb:/docker-entrypoint-initdb.d:ro
      - ./sql:/sql:ro
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d appdb && psql -U postgres -d appdb -Atc 'select 1 from pgmcp_seed_done' "]
      interval: 2s
      timeout: 5s
      retries: 90