Microsoft SQL Server in Claude, ChatGPT and any MCP client. For your whole team.
Ask your SQL Server or Azure SQL tables questions in plain language, nothing changes unless you allow it. 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
“How many orders did we get per month this year?”
Orders per month since July, from the orders table:
| Month | Orders | Revenue |
|---|---|---|
| July | 1,284 | €212,480 |
| August | 1,107 | €183,950 |
| September | 1,392 | €236,710 |
| October | 1,451 | €248,300 |
- read-only
- masked
Many ERP, merchandise management and accounting systems keep their data in Microsoft SQL Server, on a server in the office or in Azure. Getting a number out of it usually means a report someone built years ago, or the one colleague who writes T-SQL.
With the SQL Server connector, Sales, Finance and Management ask in Claude or ChatGPT, or in the ChatGPT app "SQL Server by Loopthink". The assistant looks up the tables and columns, writes one SELECT in T-SQL and answers from the rows. Loopthink holds one SQL 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. SQL Server has no read-only transaction, so a query is checked as text before it runs (one SELECT, no INTO, EXEC, comments or semicolons) and rolled back afterwards in any case. The safeguard that does not depend on us is the login: give it db_datareader and nothing more. The fourth tool, execute, changes rows one statement at a time and stays off until you allow changes.
- 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
What the Microsoft SQL Server connector can do.
| Tool | What it does | Access | Default |
|---|---|---|---|
| list_tables | Lists the tables and views of the database with their schema. Start here, then call describe_table for the ones you need before writing SQL. | Read | On |
| describe_table | Returns the columns of one table: name, data type, whether it can be empty, its default, and whether it is part of the primary key. Call it before query, so column names are rea… | Read | On |
| query | Runs one SELECT on SQL Server and returns the rows. Only a single SELECT is accepted, without INTO, EXEC, comments or semicolons, and it runs inside a transaction that is always… | Read | On |
| execute | Changes data with one T-SQL statement: INSERT, UPDATE or DELETE. Confirm the statement with the user before you run it. | Write | Off |
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.
Setting up access to Microsoft SQL Server.
Five minutes, once. Nobody on your team ever sees the credentials.
- 1
Create a SQL login for the assistant, in master: CREATE LOGIN loopthink_reader WITH PASSWORD = '…'; On Azure SQL you can instead create a contained user right in the database: CREATE USER loopthink_reader WITH PASSWORD = '…';
- 2
In your database, give it a user that can only read: CREATE USER loopthink_reader FOR LOGIN loopthink_reader; ALTER ROLE db_datareader ADD MEMBER loopthink_reader;
- 3
Only when the assistant should also change data: add the user to db_datawriter (or grant INSERT, UPDATE and DELETE on single tables), and allow changes on the connection.
- 4
Make sure the server is reachable from the internet and accepts SQL logins. For Azure SQL, allow the connection in the server firewall and keep "Encrypt the connection (SSL)" ticked.
- 5
In ChatGPT, add "SQL Server by Loopthink": right after sign-in a form asks for the fields below, logs in once, lists the tables and switches the query tools on.
- 6
In Loopthink, add Microsoft SQL Server from the catalog and enter the password. It also asks for host, port, database and user. Your team sees the tools a minute later.
SQL Server has no read-only transaction. A query is checked as text before it runs (one SELECT, no INTO, EXEC, comments or semicolons) and rolled back afterwards in any case. The login that is only a member of db_datareader is the safeguard that does not depend on us, so give it no more rights than reading.
What we suggest masking in Microsoft SQL Server.
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.
- phone
- iban
- name
- address
Microsoft SQL Server and Loopthink
- Can the assistant change or delete data?
- Not with the query tool: it accepts one SELECT, checks it as text before it runs and rolls it back afterwards in any case. With a login that is only a member of db_datareader, SQL Server itself refuses anything else. Changes need the execute tool, which is off until a workspace admin allows changes. Even then it runs one INSERT, UPDATE or DELETE per call and asks you first, UPDATE and DELETE need a WHERE clause, MERGE and EXEC are not possible, and a statement that would change more than 1000 rows is rolled back.
- Why do PostgreSQL and MySQL get a read-only transaction and SQL Server does not?
- Because SQL Server has none. PostgreSQL and MySQL can be told that a transaction may only read, and then refuse every write themselves. SQL Server cannot, so the connector checks the statement and rolls it back instead, and the rights of the login are what really limits it. That is why the setup asks for a login that is only a member of db_datareader.
- Does it work with Azure SQL?
- Yes. The host looks like yourserver.database.windows.net, the login is a SQL login or a contained database user with a password, and the connection stays encrypted. Sign-in with Microsoft Entra ID or Windows authentication is not supported; the connector logs in with a user name and a password.
- Does the assistant write T-SQL?
- Yes. The tools tell it that it is talking to SQL Server, so it writes TOP instead of LIMIT and puts square brackets around names that need them, such as [Order Details].
- 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 "SQL Server 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 mssql_list_tables, mssql_describe_table, mssql_query and mssql_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 Microsoft SQL Server account?
- No. Loopthink holds one key or token for Microsoft SQL Server. Your people sign in to Loopthink with their own identity, and every call to Microsoft SQL Server is logged under their name. Seats in Microsoft SQL Server stay where they are today.
- Where does the Microsoft SQL Server 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 Microsoft SQL Server whenever you like and paste the new one once.
- Can somebody write to Microsoft SQL Server 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.