{"name":"io.github.antonorlov/mcp-postgres-server","slug":"antonorlov-mcp-postgres-server","title":"PostgreSQL","description":"MCP server for PostgreSQL: local, Docker, RDS, Neon, Supabase, or behind an SSH bastion.","url":"https://mcp.market/server/antonorlov-mcp-postgres-server","rating":null,"grade":"B","score":83,"certified":false,"status":"active","category":"data","tags":["data","devtools"],"presence":{"score":48,"stars":22,"forks":8,"downloads_week":2923,"last_push_at":"2026-09-16T14:01:16.000Z","license":"MIT"},"uptime":null,"claimed":false,"transport":"npm","callable_via_gateway":false,"default_price_micros":0,"repository":"https://github.com/antonorlov/mcp-postgres-server","website":"https://github.com/antonorlov/mcp-postgres-server#readme","version":"0.3.1","remotes":[],"packages":[{"registryType":"npm","registryBaseUrl":"https://registry.npmjs.org","identifier":"mcp-postgres-server","version":"0.3.1","runtimeHint":"npx","transport":{"type":"stdio"},"environmentVariables":[{"description":"Full connection string (preferred). Supports sslmode in the URL.","format":"string","isSecret":true,"placeholder":"postgres://user:password@localhost:5432/mydb?sslmode=require","name":"DATABASE_URL"},{"description":"Database host (fallback when DATABASE_URL is not set).","format":"string","name":"PG_HOST"},{"description":"Database port.","format":"number","default":"5432","name":"PG_PORT"},{"description":"Database user.","format":"string","name":"PG_USER"},{"description":"Database password.","format":"string","isSecret":true,"name":"PG_PASSWORD"},{"description":"Database name.","format":"string","name":"PG_DATABASE"},{"description":"When true, execute performs writes and reads are sent directly. Off (default) is read-only: execute refuses writes and each read runs in a READ ONLY transaction.","format":"boolean","default":"false","choices":["false","true"],"name":"PG_ALLOW_WRITE"},{"description":"TLS mode. require/allow/prefer encrypt without verifying the certificate; verify-ca/verify-full verify it (supply a CA via PG_SSL_CA). Unlike libpq, allow/prefer do not fall back to plaintext, so a server without TLS needs disable.","format":"string","choices":["disable","allow","prefer","require","verify-ca","verify-full"],"name":"PG_SSLMODE"},{"description":"Path to a CA certificate file. Setting it by itself implies verify-full.","format":"filepath","name":"PG_SSL_CA"},{"description":"Register the connect_db tool (runtime credential switching).","format":"boolean","default":"false","choices":["false","true"],"name":"PG_ENABLE_RUNTIME_CONNECT"},{"description":"Byte budget for a query result sent to the model. Whole rows are kept while they fit; over the budget returnedRows < rowCount and truncated is true.","format":"number","default":"32768","name":"PG_MAX_RESULT_BYTES"},{"description":"Statement timeout in milliseconds, applied to every session.","format":"number","default":"30000","name":"PG_STATEMENT_TIMEOUT"},{"description":"Timeout in milliseconds for a single connect attempt (raise it for slow links or SSH tunnels).","format":"number","default":"10000","name":"PG_CONNECT_TIMEOUT"},{"description":"SSH bastion host. Setting it enables tunneling: the server reaches the database only through an SSH tunnel to this host. Needs the ssh2 optional dependency.","format":"string","name":"PG_SSH_HOST"},{"description":"SSH bastion port.","format":"number","default":"22","name":"PG_SSH_PORT"},{"description":"SSH username.","format":"string","name":"PG_SSH_USER"},{"description":"Path to a private key file. If unset, auth falls back like ssh: a running agent (SSH_AUTH_SOCK), then a default key (~/.ssh/id_ed25519, id_rsa, id_ecdsa).","format":"filepath","name":"PG_SSH_PRIVATE_KEY"},{"description":"Passphrase for the private key, if encrypted.","format":"string","isSecret":true,"name":"PG_SSH_PASSPHRASE"},{"description":"true to use the ambient agent (SSH_AUTH_SOCK), or an explicit socket path / Windows named pipe.","format":"string","name":"PG_SSH_AGENT"},{"description":"SSH login password. Opt-in; a key or agent takes precedence. Prefer keys, a bastion often disables password auth.","format":"string","isSecret":true,"name":"PG_SSH_PASSWORD"},{"description":"Pinned host-key fingerprint (SHA256:...). Host-key verification is mandatory and set only this way: without it the tunnel refuses to connect. Get it with ssh-keygen -lF host.","format":"string","placeholder":"SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"PG_SSH_FINGERPRINT"},{"description":"SSH keepalive interval in ms; the tunnel drops after 3 unanswered keepalives, and the next call reconnects.","format":"number","default":"15000","name":"PG_SSH_KEEPALIVE_INTERVAL"}]}],"tools":[{"name":"connect_db","description":"Switch the server to a different PostgreSQL database at runtime, replacing the current connection.","write_action":false,"price_micros":0,"input_schema":null},{"name":"describe_table","description":"Show the structure of one table: column names, data types, nullability, defaults, and primary-key membership. Call this before writing non-trivial queries against a table.","write_action":false,"price_micros":0,"input_schema":null},{"name":"execute","description":"","write_action":true,"price_micros":0,"input_schema":null},{"name":"list_schemas","description":"List every schema in the connected database. Start here when exploring an unfamiliar database, then call list_tables for the schema you care about.","write_action":false,"price_micros":0,"input_schema":null},{"name":"list_tables","description":"List all tables in a schema (default: 'public'). Use this before querying tables you have not seen yet, then call describe_table for column details.","write_action":false,"price_micros":0,"input_schema":null},{"name":"query","description":"","write_action":false,"price_micros":0,"input_schema":null}],"scan":{"score":83,"grade":"B","scanned_at":"2026-09-19T19:54:07.848Z","report":{"scannerVersion":"0.1.5","scannedAt":"2026-09-19T19:54:07.779Z","components":{"code":{"score":25,"max":25,"notes":["4 source files scanned"]},"reliability":{"score":-1,"max":20,"notes":["no gateway calls yet and no remote to probe"]},"poisoning":{"score":-1,"max":15,"notes":["tools not inspected (local package is not executed); not counted"]},"auth":{"score":6,"max":15,"notes":["static API keys via environment variables"]},"maintenance":{"score":15,"max":15,"notes":["last push 3 days ago"]},"identity":{"score":8,"max":10,"notes":["registry namespace matches repository owner","GitHub account older than a year"]}},"findings":[],"inputs":{"packages":[{"registryType":"npm","identifier":"mcp-postgres-server","version":"0.3.1","found":true,"license":"MIT","hasInstallScripts":false,"dependencyCount":4,"publishedAt":"2026-09-14T20:22:30.783Z","repositoryUrl":"git+https://github.com/antonorlov/mcp-postgres-server.git","weeklyDownloads":2923}],"repo":{"found":true,"owner":"antonorlov","repo":"mcp-postgres-server","archived":false,"pushedAt":"2026-09-16T14:01:16Z","stars":22,"forks":8,"openIssues":0,"ownerType":"User","ownerAvatarUrl":"https://avatars.githubusercontent.com/u/1664205?v=4","ownerCreatedAt":"2012-04-20T21:27:01Z","license":"MIT"},"icon":{"url":"https://avatars.githubusercontent.com/u/1664205?v=4&s=128","source":"registry","width":128,"height":128},"presence":{"stars":22,"forks":8,"downloadsWeek":2923,"license":"MIT","lastPushAt":"2026-09-16T14:01:16.000Z","score":48}}}},"grade_history":[],"reviews":[]}