ChatGPT / PostgreSQL / MCP app

Connect ChatGPT to PostgreSQL.
Ask real data, within real boundaries.

Publish a remote PostgreSQL MCP app for ChatGPT with OAuth, explicit database permissions, encrypted credentials, and a record of every query. Developer mode must be available for the account or workspace.

OAuth-secured MCPRead-only availableChatGPT Apps on all plans
LIVE ROUTEACCESS POLICY / ENFORCED
SOURCEPostgreSQLschema discovered
GATEWAYdatamcpauth · policy · route
CLIENTChatGPThosted MCP link
REQUESTtools/call → productionPOLICY CHECKED
AUTHOAuth 2.0
ACCESSScoped
SECRETSEncrypted
ROUTEHosted

The production path

A controlled database app for ChatGPT

ChatGPT can use remote MCP apps to discover tools and act on connected systems. DataMCP turns PostgreSQL schema inspection and approved SQL operations into those tools, then hosts the remote endpoint ChatGPT requires.

The gateway separates ChatGPT from the database secret. Users authorize through OAuth, while each MCP link defines whether ChatGPT can only read data, write approved records, or access selected tables.

For the current ChatGPT controls, read the ChatGPT MCP setup guide. Then follow the PostgreSQL-specific walkthrough for database permissions and testing.

What you get

Production access.
Without production guesswork.

01 / CAPABILITY
RE

Remote MCP endpoint

Meet ChatGPT's requirement for a reachable remote MCP server without operating your own transport.

02 / CAPABILITY
OA

OAuth authorization

Users authorize the app without copying PostgreSQL credentials or shared database secrets into ChatGPT.

03 / CAPABILITY
PL

Plain-English analysis

Ask business questions while ChatGPT inspects the live schema and executes approved SQL tools.

04 / CAPABILITY
DA

Database permissions

Start read-only or choose write and custom table permissions when the workspace and use case require them.

05 / CAPABILITY
EN

Encrypted connection strings

PostgreSQL credentials remain encrypted on DataMCP and are never exposed to the ChatGPT app.

06 / CAPABILITY
QU

Query audit trail

Review the database calls made through the MCP app, including time, user context, status, and result metadata.

Source to controlled MCP link

One. Two.
Three.

Connect the source once. DataMCP handles discovery, hosted transport, client authentication, and link policy.

Read the setup guide
  1. 01
    Connect PostgreSQL

    Add the database to DataMCP and verify the discovered schema and available database tools.

  2. 02
    Create an OAuth MCP link

    Choose a safe permission preset, then copy the ChatGPT-compatible remote endpoint.

  3. 03
    Create the ChatGPT app

    Enable Developer mode, add the endpoint from Settings → Plugins, complete OAuth, review tools, and test the app.

Build or use datamcp

DataMCP app vs. giving an AI direct database access

See what stays on your engineering backlog when the MCP runtime and control layer are managed for you.

CAPABILITYDATAMCPDirect database access
ConnectionRemote MCP app over HTTPS

Custom code or unsupported database socket

AuthenticationOAuth to the MCP endpoint

Shared PostgreSQL credential

PermissionsPer-link database policy

Whatever the database user can do

Credential exposureEncrypted behind the gateway

Distributed to integration code

AuditabilityCentral query history

Assemble from application and database logs

Frequently asked questions

Questions before
you connect.

Clear answers about architecture, access, credentials, and supported clients.

01

Can ChatGPT connect directly to PostgreSQL?

ChatGPT does not connect to a PostgreSQL socket directly. It connects to a remote MCP app that exposes database tools. DataMCP provides that remote endpoint and handles PostgreSQL connectivity, authentication, permissions, and query execution.

02

Which ChatGPT plans support custom MCP apps?

OpenAI currently says ChatGPT Apps are supported on all plans. Developer mode can still be unavailable when an organization administrator disables it, and workspace policy controls app permissions.

03

Does ChatGPT see the PostgreSQL connection string?

No. ChatGPT authenticates to the DataMCP endpoint through OAuth. The PostgreSQL connection string remains encrypted on DataMCP and is not provided to ChatGPT or stored in the app configuration.

04

Can ChatGPT be restricted to read-only database access?

Yes. Use a read-only MCP link for analytics and exploration, or define a custom table-level policy. ChatGPT can only call database tools allowed by both the DataMCP link and the underlying PostgreSQL role.

05

Can ChatGPT modify database records through MCP?

Only when the MCP link and workspace allow write actions. OpenAI currently describes full MCP write support as a beta feature for eligible workspaces, and ChatGPT may request confirmation before consequential actions.

Start with one link

Let ChatGPT query the data you approve

Connect one PostgreSQL database and create one controlled remote MCP link for free. Add it where ChatGPT Developer mode is available.