Mira Vantis

How does an AI agent actually reach your database?

It doesn't, directly. The model only writes a tool call request: a tool name and arguments. In the MCP spec, the client sends that request as tools/call, and the MCP server runs the tool, which for a database tool means running the query. So every tool call passes through a spot you control, which is where the checks belong.

Posted Oct 14, 2026

The breakdown

The model only writes text

A language model can't open a database connection. When it needs data, it writes a structured request that names a tool and passes arguments. Something else decides whether to run it.

Who runs the call

In the Model Context Protocol, the client sends a tools/call request to the server, with the tool name and its arguments. The server runs the tool. For a database tool, the server is the one connected to the database and running the query. The model never touches the database itself.

One spot you control

Every tool call passes through the client and the server before it reaches your data. That path is where checks belong: which tools exist, which arguments are allowed, and which calls need approval.

Example: Supabase's MCP server

Supabase's MCP docs list a read_only option that runs all queries as a read-only Postgres user, and a project_ref option that scopes the server to one project. Both limit what a bad tool call can do, no matter what the model writes.

What the spec says about humans

The tools section of the MCP spec says that for trust and safety, there should always be a human in the loop with the ability to deny tool invocations. The JSON in the clip is an illustration in the spec's format, not a captured log.

Check today

Find where your agent's tool calls go. Is the database tool read-only? Is it scoped to one project? Can a person deny a call before it runs?

The question at the end of the video: Where do your agent's tool calls get checked today?

Sources

  1. Model Context Protocol specification (2025-06-18): Server, Tools
  2. Supabase docs: Supabase MCP server

FAQ

Can an AI model query a database directly?

No. The model writes text, including tool call requests. A client and a tool server decide whether to run the request, and the server is what actually connects to the database and runs the query.

What is a tools/call request in MCP?

It is the message an MCP client sends to a server to run a tool. In the 2025-06-18 spec, it carries the tool name in params.name and the inputs in params.arguments.

How do you make an MCP database tool safer?

Limit what the server can do. Supabase's MCP server, for example, can run every query as a read-only Postgres user and be scoped to a single project. Add a human approval step for calls that change data.

Does the MCP spec require human approval for tool calls?

The spec says there SHOULD always be a human in the loop with the ability to deny tool invocations. That is a strong recommendation, not a hard requirement, so check what your client actually does.

More clips