P

Postgres SSH MCP

by SecretX33 · SecretX33/postgres-ssh-mcp

A cross-platform MCP server for querying and introspecting PostgreSQL databases with SSH tunnel support, featuring multi-layered query safety and read-only enforcement.

Unknown transport Glama Low confidence
Note

Install

No install method is published for this server: no package and no remote endpoint. Check its source repository or registry listing for setup instructions.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
DB_SSL No Set to 'true' to enable TLS for the database connection Default: false
DB_HOST Yes Postgres host or RDS endpoint
DB_NAME Yes Database name
DB_PORT No Postgres port Default: 5432
DB_USER Yes Database user
SSH_HOST No SSH config alias (reads ~/.ssh/config)
SSH_PORT No SSH port Default: 22
SSH_USER No SSH login user
DB_SSL_CA No Path to a custom CA certificate file (PEM) for SSL verification
DB_MAX_ROWS No Maximum rows returned per query Default: 1000
DB_PASSWORD Yes Database password
DB_READ_ONLY No Set to 'false' to allow write queries Default: true
SSH_HOSTNAME No Bastion hostname or IP
SSH_PASSWORD No SSH password (alternative to key-based auth)
ALLOWED_TOOLS No Comma-separated list of tools to register. When unset, all tools are available.
SSH_IDENTITY_FILE No Absolute path or ~/... to private key file
SSH_KEY_PASSPHRASE No Passphrase for an encrypted private key
DB_QUERY_TIMEOUT_MS No Milliseconds before a query is forcibly cancelled Default: 15000
SSH_KNOWN_HOSTS_PATH No Path to custom known_hosts file
SSH_TRUST_ON_FIRST_USE No Auto-accept and save unknown SSH host keys on first connection Default: true
DB_CONNECTION_POOL_SIZE No Maximum number of connections in the pool Default: 5
SSH_KEEPALIVE_COUNT_MAX No Max unanswered keepalive probes before dropping the connection Default: 3
DB_CONNECTION_TIMEOUT_MS No Milliseconds to wait for a connection from the pool Default: 10000
DB_POOL_DRAIN_TIMEOUT_MS No Milliseconds to wait for old pool to drain during reconnection (0 to never wait) Default: 5000
SSH_KEEPALIVE_INTERVAL_MS No Milliseconds between SSH keepalive probes (if set: minimum 1000)
DB_SSL_REJECT_UNAUTHORIZED No Set to 'false' to skip SSL certificate validation (insecure) Default: true
SSH_MAX_RECONNECT_ATTEMPTS No Max SSH reconnection attempts (-1 for unlimited, 0 to disable) Default: 5
SSH_STRICT_HOST_KEY_CHECKING No Enables or disables strict host checking Default: true

Similar servers