# AI coding agents and SQLEye

> SQLEye has a local MCP server that lets coding agents manage instances and read captured queries, slow queries and N+1 groups. Off by default.

Source: https://sqleye.com/docs/ai-agents/ · Last updated: 2026-11-29 · Publisher: CodeROG (https://coderog.com)

SQLEye includes a local MCP server, so a coding agent such as Claude Code can manage your database instances and read what your code actually sent to the database: captured queries, slow queries and N+1 groups. It is off by default and has no tool for running arbitrary SQL.

> **Status.**
SQLEye 0.1.0 is not released yet and there is no download. Everything on these pages describes the code as it is today. Of the agent setups, only **Claude Code** has been checked against a real install; the others follow each agent's published documentation and have not been tested against the agent itself. See [which setups are verified](/docs/ai-agents/setup/#which-setups-have-been-verified).

## What can an agent do with SQLEye?

An agent can do two kinds of things through [16 tools](/docs/ai-agents/tools/):

- **Manage local instances:** list engine versions and instances, install an engine version, create, start, stop, rename and delete an instance, and read its connection string.
- **Read what the database saw:** turn [capture](/docs/live-eye/capture/) on or off, then read recent queries (filterable by time, slow, N+1, errors or SQL text), queries grouped by [shape](/docs/live-eye/query-shapes/), [N+1](/docs/live-eye/n-plus-one/) groups, current connections and an [Explain](/docs/live-eye/explain/) plan for one statement. It can also clear the captured history.

The server tells the agent a typical loop: list instances, turn capture on, run the app or its tests, read N+1 groups, shapes and queries, fix the code, clear the queries and run again.

## How does the connection work?

```text
agent --stdio--> sqleye-mcp (small bundled helper) --local socket--> SQLEye app --> engines + Live Eye
```

- The agent runs `sqleye-mcp`, a small helper shipped next to the app. It only forwards messages and opens SQLEye if it is not running.
- The app listens on a Unix domain socket on macOS and Linux (`mcp.sock` in the [app data directory](/docs/instances/data-location/), owner-only permissions) or a named pipe on Windows. There is no TCP port and no HTTP server.
- Only the same operating-system user can connect. SQLEye accepts MCP protocol versions 2024-11-05, 2025-03-26, 2025-06-18 and 2025-11-25.

## What is off until I turn it on?

The MCP server is off by default. While it is off there is no socket, no background thread and no timer. See [enable the MCP server](/docs/ai-agents/enable/).

## What keeps an agent from doing damage?

- There is no tool that runs arbitrary SQL. `explain_query` takes one SELECT, INSERT, UPDATE or DELETE statement, never uses `ANALYZE` and rejects anything else.
- Deleting an instance and downloading an engine ask you for approval by default, and deleting moves the data to the Trash where the system supports it.
- **Read-only mode** hides every tool that changes anything.
- Captured SQL and error text reach the agent as data and are marked as untrusted in the tool descriptions.

Details are in [security and approvals](/docs/ai-agents/security/).

## Where do I go next?

1. [Enable the MCP server](/docs/ai-agents/enable/).
2. [Set up your agent](/docs/ai-agents/setup/), or use [Manual Setup](/docs/ai-agents/manual-setup/) for any other client.
3. Look up arguments and limits in the [tool reference](/docs/ai-agents/tools/).
4. If something fails, see [troubleshooting](/docs/ai-agents/troubleshooting/).
