P

PostgreSQL SSH MCP Server

by Zlash65 · Zlash65/PostgreSQL SSH MCP Server

A secure PostgreSQL MCP server with built-in SSH tunneling that enables AI assistants to connect to databases through bastion hosts automatically, supporting both STDIO and Streamable HTTP transports.

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
PORT No HTTP server port Default: 3000
MAX_ROWS No Maximum rows returned per query Default: 1000
MCP_HOST No HTTP server bind address Default: 0.0.0.0
SSH_HOST No SSH server hostname
SSH_PORT No SSH server port Default: 22
SSH_USER No SSH username
READ_ONLY No Block data modifications. Set false to allow writes. Default: true
SSH_ENABLED No Set true to enable SSH tunneling Default: false
AUTH0_DOMAIN No Auth0 tenant domain (e.g., tenant.us.auth0.com)
DATABASE_SSL No true or false. Auto-enabled for non-localhost. Default: auto
DATABASE_URI No Full connection string (e.g., postgresql://user:pass@host:5432/db)
SSH_PASSWORD No SSH password (alternative to key)
DATABASE_HOST No Database hostname
DATABASE_NAME No Database name
DATABASE_PORT No Database port Default: 5432
DATABASE_USER No Database username
MCP_AUTH_MODE No Authentication mode: none or oauth Default: none
MCP_STATELESS No Stateless mode (each request re-initializes) Default: true
QUERY_TIMEOUT No Query timeout in milliseconds Default: 30000
AUTH0_AUDIENCE No Auth0 API identifier / audience
DATABASE_SSL_CA No Path to CA certificate bundle
DATABASE_PASSWORD No Database password
MCP_ALLOWED_HOSTS No Comma-separated allowed Host headers
MCP_ALLOWED_ORIGINS No Comma-separated allowed CORS origins (* for any)
SSH_STRICT_HOST_KEY No Verify host key against known_hosts Default: true
MCP_SERVER_POOL_SIZE No Server instances for stateless mode Default: 4
SSH_KNOWN_HOSTS_PATH No Custom known_hosts file Default: ~/.ssh/known_hosts
SSH_PRIVATE_KEY_PATH No Path to private key file
POOL_DRAIN_TIMEOUT_MS No Timeout for draining pool during reconnect Default: 5000
MAX_CONCURRENT_QUERIES No Maximum concurrent queries Default: 10
SSH_KEEPALIVE_INTERVAL No Keepalive interval in milliseconds Default: 10000
SSH_TRUST_ON_FIRST_USE No Auto-add unknown hosts (when strict is enabled) Default: true
MCP_SESSION_TTL_MINUTES No Session TTL for stateful mode Default: 30
MCP_RESOURCE_DOCUMENTATION No URL to API documentation (RFC 9728)
SSH_MAX_RECONNECT_ATTEMPTS No Max reconnect attempts (-1 for unlimited) Default: 5
SSH_PRIVATE_KEY_PASSPHRASE No Passphrase for encrypted keys
MCP_SESSION_CLEANUP_INTERVAL_MS No Session cleanup interval Default: 300000
DATABASE_SSL_REJECT_UNAUTHORIZED No Set false to allow self-signed certificates Default: true

Similar servers