# postgres-mcp Environment Configuration
# Copy to .env and customize for your environment
# =============================================================================
# PostgreSQL Connection
# =============================================================================
# Option 1: Connection String
# POSTGRES_URL=postgres://user:password@localhost:5432/database
# Option 2: Individual Settings
PGHOST=localhost
PGPORT=5432
PGUSER=postgres
PGPASSWORD=
PGDATABASE=postgres
# Connection Pool Settings
POSTGRES_POOL_MIN=2
POSTGRES_POOL_MAX=10
# =============================================================================
# Server Configuration
# =============================================================================
# Transport type: stdio (default), http, sse
MCP_TRANSPORT=stdio
# HTTP port (for http/sse transports)
PORT=3000
# Log level: debug, info, warn, error
LOG_LEVEL=info
# Tool filter (e.g., "-base,-extensions,+starter")
# MCP_TOOL_FILTER=-base,-extensions,+starter
# =============================================================================
# OAuth 2.1 Authentication (for HTTP/SSE transports)
# =============================================================================
# Enable OAuth authentication
OAUTH_ENABLED=false
# Authorization Server / Identity Provider
OAUTH_ISSUER=http://localhost:8080/realms/db-mcp
# Expected token audience
OAUTH_AUDIENCE=postgres-mcp
# JWKS endpoint (auto-discovered from issuer if not set)
# OAUTH_JWKS_URI=http://localhost:8080/realms/db-mcp/protocol/openid-connect/certs
# Token clock tolerance in seconds (default: 60)
# OAUTH_CLOCK_TOLERANCE=60