PostgreSQL connector
The PostgreSQL connector opens a read-only TLS connection from OrgMCP to your database and exposes six live MCP tools (postgres_list_schemas, postgres_list_tables, postgres_describe_table, postgres_sample_rows, postgres_run_query, postgres_explain_query). It is tools-only — there is no knowledge-source picker and no RAG crawler. An LLM agent runs guarded SQL against the live database instead of searching an index.
Connect
- Create a least-privilege read-only role on your database (see the operator runbook for a
CREATE ROLE … GRANT SELECTtemplate). - In the OrgMCP admin console, open Connectors → Add → PostgreSQL.
- Paste a
postgres://user:password@host:5432/databaseURI (exactly one host and database). Do not append libpq query parameters such as?sslmode=— configure TLS with the connector fields instead. - Choose
sslMode(verify-fullrecommended) and optionally paste a private CA PEM incaCert. - Click Test connection. A green result shows the connected user, database, and whether the session is read-only.
Network requirements
- The database host must be publicly routable. Private, loopback, CGNAT, and cloud-metadata addresses are refused (SSRF protection).
- Allow OrgMCP egress (NAT gateway EIPs from your environment's Terraform outputs) to port
5432on the database — and port22when using an SSH bastion.
SSH bastion (optional)
Fill bastionHost, bastionUser, and bastionPrivateKey together to tunnel over SSH. The bastion host must also be publicly routable. In v1 the database host behind the tunnel must still resolve to a public IP (the same target guard runs on both).
What does not get indexed
- Nothing — this connector has no RAG ingest and no
source_type. Use the livepostgres_*tools (or another connector) for searchable knowledge. - An empty
postgres_list_schemasresult usually means the role only sees system catalogs — grantUSAGE/SELECTon the schemas you intend to expose.
Honesty surface
- Test connection reports identity plus
extra.readOnlywhen the live session is read-only. - SQL is wrapped in a read-only transaction; mutating statements and SSRF-like hosts fail with clear errors rather than silent empty results.
- The Sources / resource lister is intentionally empty — there is nothing to pick for indexing.
Operator runbook (role template, TLS pitfalls, bastion limits): docs/RUN-postgres-connector.md. Canonical matrix: docs/ARCH-connector-capabilities.md. See also GitHub and Google Drive for connectors that do index into the knowledge corpus.