Skip to content
Datablare
ChatGPT on the web, paid plans

Connect ChatGPT to Your Database, Read-Only

Connect ChatGPT to database sources like MySQL with a custom MCP connector: OAuth sign-in, read-only queries, only tables you allow, full audit log.

  • Read-only, checked by the SQL guard and kept read-only by the database.
  • Only the tables and columns you allow reach ChatGPT.
  • Every query on record under the person who asked.

Setup

Set up ChatGPT in 5 steps

  1. Step 1: Copy your project's link

    In Datablare, open Connect your AI agent, choose ChatGPT and copy the link. It points to your project; it is not a secret.

  2. Step 2: Turn on Developer mode

    In ChatGPT on the web, open Settings → Apps & Connectors → Advanced settings and switch on Developer mode.

  3. Step 3: Create the connector

    Back in Apps & Connectors, choose Create. Name it Datablare, paste the link as the MCP server URL, set authentication to OAuth and click Create.

  4. Step 4: Sign in to Datablare and allow

    ChatGPT sends you to Datablare. Sign in if asked, check the request and choose Allow.

  5. Step 5: Use it in a chat

    Start a new chat, turn on Datablare from the + menu (under Developer mode) and ask your question.

Datablare Connect page listing Claude, ChatGPT, Cursor, VS Code, Claude Code and other MCP clients, with the project’s MCP link and step-by-step sign-in instructions.
The Connect page in Datablare shows the exact steps and your project’s link for each tool.

You can connect ChatGPT to your database by adding Datablare as a custom MCP connector. Turn on Developer mode in ChatGPT, create a connector with your Datablare project link and OAuth sign-in, then allow it in Datablare. ChatGPT can then answer questions from MySQL, PostgreSQL, SQL Server, Snowflake and other databases — but only by reading, only from the tables and columns you choose, and with every query recorded.

The problem with pasting data into ChatGPT

Most teams already “connect” ChatGPT to their data the hard way: someone exports a CSV, pastes it into a chat, and asks for a summary. That copy has no access control, goes stale the moment it is made, and leaves no trail of who shared what.

Wiring ChatGPT straight to a database login is not much better. The model writes SQL; if the login can write, so can the model, and every table the login can see is in play.

What Datablare puts in between

Datablare is a governed MCP server. ChatGPT sends it a question as a tool call; Datablare checks it and runs it.

  1. A SQL guard. Only a single SELECT, WITH or VALUES query passes. Write keywords, stacked statements, functions that read files or other servers, and sleep or lock functions are refused with a reason.
  2. An allow-list of tables and columns. You pick the tables per project and can hide individual columns — a PAN, a phone number, a salary. A query that touches a hidden column is refused even if ChatGPT spells it out.
  3. A read-only session. On PostgreSQL, MySQL, MariaDB, Oracle and ClickHouse the database itself refuses writes; on SQL Server and Snowflake every query runs in a transaction that is always rolled back.
  4. An audit trail. Who asked, the question, the SQL, the outcome, rows and time — in the Audit page, with CSV export for managers on paid plans.

Query results go straight back to ChatGPT and are never stored by Datablare, which is hosted in India. Read more on how it works and security.

How the ChatGPT connector authenticates

ChatGPT connects to Datablare only with OAuth. When you create the connector, ChatGPT redirects you to Datablare’s consent page. You sign in with your own account and click Allow. Access follows your role: you need Analyst or higher on the project to allow it, and if an admin later removes you or lowers you to Viewer, the connection stops at its next refresh.

On a ChatGPT Business or Enterprise workspace, each colleague signs in with their own Datablare account, so a finance analyst and a sales lead can share the same connector setup yet see different data — each limited to what their Datablare role allows.

Create a read-only login first

Before you add the database, give Datablare a login that can only read. For MySQL:

CREATE USER 'datablare_reader'@'%' IDENTIFIED BY 'choose-a-strong-password'
  WITH MAX_USER_CONNECTIONS 5;

GRANT SELECT, SHOW VIEW ON shop.* TO 'datablare_reader'@'%';

-- Keep a column out entirely by granting columns instead of the table:
-- GRANT SELECT (id, city, created_at) ON shop.customers TO 'datablare_reader'@'%';

When you test the connection, Datablare tells you whether the login can only read. If it can write, you are asked to confirm before continuing — writes stay blocked either way. Engine notes: MySQL, PostgreSQL, Snowflake.

Try it on the e-commerce sample

Datablare’s built-in e-commerce sample lets you test the ChatGPT connector without connecting anything of your own. Once it is connected, ask:

  • What was our average order value per month this year?
  • Which product categories brought in the most revenue last quarter?
  • Which customers ordered more than five times?
  • Which sizes are most often out of stock?

Each answer shows up in Audit with the SQL that produced it, so you can check ChatGPT’s working.

Start now

Sign up free, connect a database or the sample, and follow the five steps above. Compare plans on the pricing page. Prefer Claude? See connect Claude to your database.

FAQ

ChatGPT and Datablare: questions

Which ChatGPT plans support custom connectors?

Datablare's Connect page notes that you need a paid ChatGPT plan, and that on Business or Enterprise a workspace admin may have to allow custom connectors first. ChatGPT renames these menus from time to time — look for Developer mode and Create.

Can I use an API key instead of signing in?

Not with ChatGPT. It connects only by signing in with OAuth, so personal keys don't apply. Tools such as Cursor, VS Code and Claude Code can use either.

Can ChatGPT run UPDATE or DELETE on my database?

No. Datablare refuses any statement that is not a single read before it reaches your database, and runs the read in a read-only session (or an always rolled-back transaction on SQL Server and Snowflake).

What does OpenAI receive?

ChatGPT receives the rows it asks for, only from tables and columns you have allowed, under OpenAI's own terms. Hide sensitive columns in Datablare's Modeling page so they can never be queried.

Which databases can ChatGPT query through Datablare?

PostgreSQL, MySQL, MariaDB, SQL Server (including Azure SQL), Oracle, ClickHouse and Snowflake.

Connect ChatGPT to your database today.

Start free with the e-commerce sample or your own database. Connect Claude in about two minutes.

30 minutes with the founder. Or WhatsApp / [email protected]