Use ChatGPT to Talk to Your AlloyDB Data via CData Connect AI
ChatGPT is an AI chatbot developed by OpenAI, launched in November 2022. Based on large language models (LLMs), it enables users to refine and steer conversations through natural language processing. ChatGPT's developer mode, available to Plus and Pro subscribers, provides full Model Context Protocol (MCP) support for connecting to external data sources and tools.
CData Connect AI offers a dedicated cloud-to-cloud interface for connecting to AlloyDB data. The CData Connect AI Remote MCP Server enables secure communication between ChatGPT and AlloyDB. This allows you to ask questions and take actions on your AlloyDB data using ChatGPT, all without the need for data replication to a natively supported database. With its inherent optimized data processing capabilities, CData Connect AI efficiently channels all supported SQL operations, including filters and JOINs, directly to AlloyDB. This leverages server-side processing to swiftly deliver the requested AlloyDB data.
Step 1: Configure AlloyDB Connectivity for ChatGPT
Connectivity to AlloyDB from ChatGPT is made possible through CData Connect AI Remote MCP. To interact with AlloyDB data from ChatGPT, we start by creating and configuring a AlloyDB connection in CData Connect AI.
- Log into Connect AI, click Sources, and then click Add Connection
- Select "AlloyDB" from the Add Connection panel
-
Enter the necessary authentication properties to connect to AlloyDB.
The following connection properties are usually required in order to connect to AlloyDB.
- Server: The host name or IP of the server hosting the AlloyDB database.
- User: The user which will be used to authenticate with the AlloyDB server.
- Password: The password which will be used to authenticate with the AlloyDB server.
You can also optionally set the following:
- Database: The database to connect to when connecting to the AlloyDB Server. If this is not set, the user's default database will be used.
- Port: The port of the server hosting the AlloyDB database. This property is set to 5432 by default.
Authenticating with Standard Authentication
Standard authentication (using the user/password combination supplied earlier) is the default form of authentication.
No further action is required to leverage Standard Authentication to connect.
Authenticating with pg_hba.conf Auth Schemes
There are additional methods of authentication available which must be enabled in the pg_hba.conf file on the AlloyDB server.
Find instructions about authentication setup on the AlloyDB Server here.
Authenticating with MD5 Authentication
This authentication method must be enabled by setting the auth-method in the pg_hba.conf file to md5.
Authenticating with SASL Authentication
This authentication method must be enabled by setting the auth-method in the pg_hba.conf file to scram-sha-256.
Authenticating with Kerberos
The authentication with Kerberos is initiated by AlloyDB Server when the ∏ is trying to connect to it. You should set up Kerberos on the AlloyDB Server to activate this authentication method. Once you have Kerberos authentication set up on the AlloyDB Server, see the Kerberos section of the help documentation for details on how to authenticate with Kerberos.
- Click Save & Test
With the connection configured, we are ready to connect to AlloyDB data from ChatGPT.
Step 2: Connect ChatGPT to CData Connect AI
Follow these steps to add a CData Connect AI connector in ChatGPT:
- Sign in to ChatGPT with a Plus or Pro subscription.
- Navigate to Settings > Connectors.
- Under the "Advanced settings" section, toggle on Developer mode.
- Once developer mode is enabled, return to the Connectors page and click Create.
- Enter a name for the connector (such as Connect AI MCP).
- In the Remote MCP server URL field, enter:
https://mcp.cloud.cdata.com/mcp
- Set Authentication to "OAuth."
- Check I trust this application and click Create
- You will be redirected to CData Connect AI's OAuth authorization page. Sign in with your Connect AI credentials.
- Review the permissions requested and click Authorize to grant ChatGPT access to your Connect AI resources.
- After successful authorization, you will be redirected back to ChatGPT.
- The Connect AI MCP Server will now appear in your available connectors list where you can manage the connector and enable/disable actions (tools).
Step 3: Explore Live AlloyDB Data with ChatGPT
- Start a new conversation in ChatGPT.
- In the tool picker, enable "Developer Mode."
- Enable your Connect AI MCP Sever.
- You can now start exploring your data with natural language prompts. ChatGPT will use the Connect AI MCP server to query your live AlloyDB data. Example prompts:
- "Show me all customers from the last 30 days"
- "What are my top performing products?"
- "Analyze sales trends for this quarter"
- "List all active projects and their current status"
- ChatGPT will translate your natural language queries into SQL and execute them against your AlloyDB data through the Connect AI MCP server.
IMPORTANT: ChatGPT's developer mode provides full read/write MCP access. Be cautious when allowing write operations to your AlloyDB data. Always review and confirm any data modifications before allowing them to proceed.
NOTE: Developer mode is in beta and only available to ChatGPT Plus and Pro subscribers. Refer to OpenAI's documentation for the latest setup information.
Get CData Connect AI
To get live data access to 300+ SaaS, Big Data, and NoSQL sources directly from your cloud applications, try CData Connect AI today!