---
title: "Ask your database questions in plain English, without writing SQL | FluxOS MCP Blog"
description: "See how to turn PostgreSQL, MySQL or SQL Server tables into tools an AI assistant can use safely, without handing over the database password."
url: "https://www.fluxosmcp.com/en/blog/ask-your-database-questions-in-plain-english-without-writing-sql"
lang: "en-US"
---

[Blog](https://www.fluxosmcp.com/en/blog) · Nov 25, 2026 · FluxOS MCP Team

# Ask your database questions in plain English, without writing SQL

[Leia este artigo em português](https://www.fluxosmcp.com/blog/pergunte-ao-seu-banco-de-dados-em-portugues-sem-escrever-sql)

Every company has a database that knows more than anyone on the team. And every company has a queue of requests for the people who know how to query it: “can you pull the late orders for me?”, “how many customers bought this month?”, “was this invoice paid?”

The knowledge is there. The bottleneck is the query.

Now imagine asking your AI assistant, in plain English, and having it fetch the answer itself, without anyone writing a line of SQL and **without it seeing anything beyond what you allowed**. That is what happens when the tables in your database become MCP tools.

## The wrong way: handing the database password to the AI

The temptation is real: give the assistant a connection and let it write the SQL. It works in the demo and it’s scary in production, for three reasons:

1. it sees **every** table, including the ones it shouldn’t;
2. it writes whatever query it wants, including the one that deletes;
3. nothing separates one client’s data from another’s.

The problem isn’t that the AI is malicious. It’s that nobody set limits.

## The right way: tables become tools

With an MCP server, the assistant doesn’t get the database. It gets **tools with a name, a purpose and limits**, such as `consultar_pedidos` or `buscar_clientes_por_id`. It picks the tool and fills in the arguments; the server is what builds and runs the query.

In FluxOS MCP, this works with PostgreSQL, MySQL and SQL Server, and you don’t write SQL to get there.

### 1\. Connect the database

Enter the connection details and test before saving. The credential goes into an encrypted vault; what stays in the record is only a reference.

A piece of advice worth its weight in gold: create a **service user with minimal permissions**, only on the tables you intend to expose. The platform does not replace database permissions; it adds a layer on top.

### 2\. Read the schema

The platform reads the catalog: tables, views, columns and keys. **Table data is not read at this stage.**

### 3\. Choose the tools

Up to five tools are proposed for each table:

| Tool      | What it does                                       | Type  |
| --------- | -------------------------------------------------- | ----- |
| Query     | lists records with filters, sorting and pagination | read  |
| Get by id | fetches one record by primary key                  | read  |
| Insert    | creates a record                                   | write |
| Update    | changes a record                                   | write |
| Delete    | removes a record                                   | write |

You check only the ones that make sense. Nobody is required to expose `excluir_pedidos` to an assistant, and to start with almost nobody should.

### 4\. Say which column identifies the client

If the server serves more than one client, you point to the column that says who each row belongs to, for example `cliente_id`. From then on, the server adds the client filter to every read, update and delete, and fills it in on inserts. The assistant doesn’t even see that column as an argument.

### 5\. Publish and hand over the key

The server gets an MCP address. You create a key with a per-minute and per-day limit, connect the assistant and ask the first question.

## Three protections you don’t have to remember to turn on

- **Nothing is concatenated into the SQL.** All values go in as bound parameters, and the server only builds queries with tables and columns present in the imported schema.
- **There is a cap per call.** A query returns at most 200 records; if there are more, the response says so and the assistant paginates.
- **A tool without a client filter does not publish**, unless you deliberately mark it as global.

## Where this doesn’t help

So we don’t sell more than we deliver:

- **Heavy analytical questions** (joining many tables, large aggregations) are not the strong suit of per-table tools. For those, the way to go is a saved query, written and reviewed by someone on the team.
- **MySQL has no row-level security in the database itself.** Isolation depends solely on the client filter. With PostgreSQL and SQL Server you can add that second layer.
- **A database on an internal network** has to be reachable from the installation. Internal addresses are blocked by default.

## Where to start

Pick **one table and one question**. “What’s the status of order X?” is a great start: it’s a read, it comes up often and today it takes up someone’s time.

Enable only the query tool for that table, create a key with a low limit and test. When the answer comes back right, you’ll have an exact measure of what is worth enabling next.

The step-by-step guide with screenshots is in [SQL database](https://www.fluxosmcp.com/en/docs/origens/sql). Before exposing anything, it’s worth going through the [seven security questions](https://www.fluxosmcp.com/en/blog/7-questions-to-ask-before-connecting-ai-to-your-companys-data). And the [plans](https://www.fluxosmcp.com/en/planos) show what each one includes.
