MCPs/postgresql/README.md
tobjend 128cce3248
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: add postgresql-mcp Docker image + CI build step
2026-06-21 18:15:18 +02:00

1.1 KiB

postgresql-mcp

MCP server for PostgreSQL database operations.

Source: mcp-postgres

Environment Variables

Uses standard PostgreSQL environment variables via pg module:

Variable Required Description
PGHOST Yes PostgreSQL host
PGPORT No PostgreSQL port (default: 5432)
PGUSER Yes PostgreSQL user
PGPASSWORD Yes PostgreSQL password
PGDATABASE Yes PostgreSQL database name

Usage

docker run -d \
  --name postgresql-mcp \
  -p 8109:8109 \
  -e PGHOST=postgres.example.com \
  -e PGPORT=5432 \
  -e PGUSER=myuser \
  -e PGPASSWORD=secret \
  -e PGDATABASE=mydb \
  forgejo.corentic.eu/corentic/mcp-fleet-postgresql:latest

Tools

  • query — Execute read-only SQL queries (SELECT, EXPLAIN, etc.)
  • execute — Execute write SQL (INSERT, UPDATE, DELETE, DDL)
  • list_tables — List tables in the database
  • describe_table — Get schema info for a specific table
  • get_table_stats — Row counts and table statistics