Main
Keep writes off: README documents
DANGEROUSLY_ALLOW_WRITE_OPS=falseby default; start with read-only query + schema inspection.Pick the transport your client supports: stdio is the default; HTTP mode serves a Streamable HTTP endpoint at
/mcp(PORT defaults to 3000).Use the provided resources (
postgres://tables,postgres://table/{schema}/{table}) to keep prompts short and structured.
Source-backed notes
- README provides an MCP client config snippet that runs
npx --yes pg-mcp-server --transport stdiowithDATABASE_URLset. - README lists env vars: DATABASE_URL, DANGEROUSLY_ALLOW_WRITE_OPS (default false), DEBUG, and PG_SSL_ROOT_CERT.
- README documents tools/resources including
querypluspostgres://tablesandpostgres://table/{schema}/{table}.
FAQ
- Can it connect over HTTP?: Yes. README says HTTP mode serves
/mcpon PORT (default 3000). - Is it safe to enable writes?: Only if you understand the risk. Keep writes disabled until you have guardrails and allowlists.
- Do I need a global install?: No. README supports running via
npx --yes ...without installing globally.