Skip to content

AI coding agents and SQLEye

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.

An agent can do two kinds of things through 16 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 on or off, then read recent queries (filterable by time, slow, N+1, errors or SQL text), queries grouped by shape, N+1 groups, current connections and an 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.

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, 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.

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.

  • 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.

  1. Enable the MCP server.
  2. Set up your agent, or use Manual Setup for any other client.
  3. Look up arguments and limits in the tool reference.
  4. If something fails, see troubleshooting.

SQLEye is developed and maintained by CodeROG. This page is also available as Markdown.