PostgreSQL logoDatabase connector

PostgreSQL in Claude, ChatGPT and any MCP client. For your whole team.

Ask your PostgreSQL tables questions in plain language, read-only unless you allow changes. One technical login in Loopthink, one login per person, roles per tool and an audit entry for every call.

Free for 2 connectors, no card · Pro €19 · EU-hosted · 3 read tools, 1 write tools off by default

Your AI clientPostgreSQL

“How many orders did we get per month this year?”

Used query from PostgreSQL

Orders per month since July, from the orders table:

MonthOrdersRevenue
July1,284€212,480
August1,107€183,950
September1,392€236,710
October1,451€248,300
  • read-only
  • masked
An example answer in an AI client: the question “How many orders did we get per month this year?” is answered from PostgreSQL through the tool query, and the call was read-only, masked.

Most of what a company knows sits in a database: orders, customers, contracts, tickets. Getting a number out of PostgreSQL usually means asking the one colleague who writes SQL, and waiting until they have time.

With the PostgreSQL connector, Sales, Finance and Management ask in Claude or ChatGPT, or in the ChatGPT app "PostgreSQL by Loopthink". The assistant looks up the tables and columns, writes one SELECT and answers from the rows. Loopthink holds one database login, every person signs in with their own identity, and every statement is logged under their name.

Three read tools list the tables, describe a table and run a query. Every query runs inside a read-only transaction, so a statement that would change data is refused by the database itself. The fourth tool, execute, changes rows one statement at a time and stays off until you allow changes on the connection and grant it to a member group.

What your team asks
  • Management

    “How many orders did we get per month this year?”

    Answered by query

  • Sales

    “Who are our ten largest customers by revenue?”

    Answered by query

  • Operations

    “Which products have not been ordered in the last 90 days?”

    Answered by query

  • Finance

    “Compare this quarter's revenue with the same quarter last year.”

    Answered by query

  • Data

    “Which tables hold customer data, and which columns do they have?”

    Answered by describe_table

  • Support

    “Set the status of order 4711 to shipped.”

    Answered by execute

Tools

What the PostgreSQL connector can do.

ToolWhat it doesAccessDefault
list_tablesLists the tables and views of the database with their schema. Start here, then call describe_table for the ones you need before writing SQL. ReadOn
describe_tableReturns the columns of one table: name, data type, whether it can be empty, and its default. Call it before query, so column names are read and not guessed. ReadOn
queryRuns one read-only SQL SELECT and returns the rows. It runs inside a read-only transaction, so a statement that changes data is refused by the database. ReadOn
executeChanges data with one SQL statement: INSERT, UPDATE or DELETE. Confirm the statement with the user before you run it. WriteOff

Write tools are off for every role until you switch them on, one tool for one role. The names are what the model sees; it also gets the full parameter description of each tool.

Setup

Setting up access to PostgreSQL.

Five minutes, once. Nobody on your team ever sees the credentials.

  1. 1

    Create a user of its own for the assistant: CREATE ROLE loopthink_reader LOGIN PASSWORD '…';

  2. 2

    Let it read, and nothing else: GRANT CONNECT ON DATABASE crm TO loopthink_reader; GRANT USAGE ON SCHEMA public TO loopthink_reader; GRANT SELECT ON ALL TABLES IN SCHEMA public TO loopthink_reader; (replace crm and public with your database and schema).

  3. 3

    Only when the assistant should also change data: grant INSERT, UPDATE and DELETE on the tables it may change, and allow changes on the connection.

  4. 4

    Make sure the database is reachable from the internet. A hosted database (Supabase, Neon, AWS RDS, Azure, Google Cloud SQL) usually is; keep "Encrypt the connection (SSL)" ticked for it.

  5. 5

    In ChatGPT, add "PostgreSQL by Loopthink": right after sign-in a form asks for the fields below, logs in once and lists the tables. In the Loopthink web app, tick "Schema and read-only query tools" on the connection instead.

  6. 6

    In Loopthink, add PostgreSQL from the catalog and enter the password. It also asks for host, port, database and user. Your team sees the tools a minute later.

Every query runs inside a read-only transaction, so even a user with more rights cannot change data through it. The user that may only read is the second safeguard, and the one that is entirely in your hands.

Masking

What we suggest masking in PostgreSQL.

Customer tables carry names, e-mail addresses, phone numbers and bank details in columns of their own. Rows come back with the column names as fields, so a masking rule on a field such as email or iban removes or masks that column for a role, and the e-mail and IBAN patterns catch those values wherever they appear in a row. Give Finance the full rows and other roles the totals.

  • email
  • phone
  • iban
  • name
  • address
Questions

PostgreSQL and Loopthink

Can the assistant change or delete data?
Not with the query tool: every query runs inside a read-only transaction, and PostgreSQL itself refuses a statement that writes. Changes need the execute tool, which is off until a workspace admin allows changes on the connection. Even then it runs one INSERT, UPDATE or DELETE per call and asks you first, UPDATE and DELETE need a WHERE clause, a statement that would change more than 1000 rows is rolled back, and the schema cannot be changed.
Which PostgreSQL hosts work?
Any PostgreSQL that accepts a user with a password from the internet: your own server, AWS RDS and Aurora, Azure, Google Cloud SQL, Supabase, Neon and the like. A read replica is a good choice, because long questions then never compete with your application.
How does it know our tables and columns?
It asks the database: list_tables first, then describe_table for every table the question touches, and only then it writes the SELECT. Nothing about your schema has to be described beforehand.
How much comes back per question?
100 rows unless the assistant asks for more, at most 500 per query, and a query is stopped after 20 seconds. That is why the assistant counts and sums in SQL instead of reading every row.
Is this the same as the ChatGPT app "PostgreSQL by Loopthink"?
Yes. The app is the quickest way in from ChatGPT: you add it, sign in, and a form on our page asks for host, port, database, user and password, then logs in once to test it. In ChatGPT the tools are called postgres_list_tables, postgres_describe_table, postgres_query and postgres_execute. Claude and other MCP clients reach the same database through your Loopthink connector, with the same roles and the same log.
Does the database have to be reachable from the internet?
Yes. Loopthink connects from the cloud, so the host has to answer from outside. Hosted databases usually do. Use a user that may only read, and keep the connection encrypted.
Does every team member need their own PostgreSQL account?
No. Loopthink holds one key or token for PostgreSQL. Your people sign in to Loopthink with their own identity, and every call to PostgreSQL is logged under their name. Seats in PostgreSQL stay where they are today.
Where does the PostgreSQL key live?
In Loopthink, encrypted, in the EU. It never reaches the AI client and never reaches the people using the connector. Rotate it in PostgreSQL whenever you like and paste the new one once.
Can somebody write to PostgreSQL from the chat?
Not unless you switch it on. Write actions are a separate row in the permission matrix and are off for every role by default. If a role needs one write tool, you grant that one tool to that one role.
What does the model see?
The result of the tool call, after masking. Fields you mark as personal, such as emails, names or card details, are masked before the answer travels to the AI client. The model gets the numbers, not the people.
What does it cost?
Free for one person and two connectors, no card. Pro is €19 a month for up to five people and every connector on the site, with roles, field masking and a 30-day audit. Team is €49 for ten people and adds your own REST APIs and SQL databases, your own domain and your own identity provider. No call needed.

Stuck, or a tool you need is missing? A person who knows this connector answers within one working day.

Works in Claude, ChatGPT, Langdock and any other MCP client.