Documentation

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

  1. Create a least-privilege read-only role on your database (see the operator runbook for a CREATE ROLE … GRANT SELECT template).
  2. In the OrgMCP admin console, open Connectors → Add → PostgreSQL.
  3. Paste a postgres://user:password@host:5432/database URI (exactly one host and database). Do not append libpq query parameters such as ?sslmode= — configure TLS with the connector fields instead.
  4. Choose sslMode (verify-full recommended) and optionally paste a private CA PEM in caCert.
  5. 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 5432 on the database — and port 22 when 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 live postgres_* tools (or another connector) for searchable knowledge.
  • An empty postgres_list_schemas result usually means the role only sees system catalogs — grant USAGE / SELECT on the schemas you intend to expose.

Honesty surface

  • Test connection reports identity plus extra.readOnly when 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.