# Enable the MCP server

> Turn on SQLEye's MCP server in Settings, MCP, see its status and connected agents, and learn what it creates and removes when switched on or off.

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

Open **Settings → MCP** and switch on **Enable MCP server**. Until you do, nothing is listening and agents cannot reach SQLEye.

## How do I turn it on?

1. Open **Settings** and choose the **MCP** tab.
2. Switch on **Enable MCP server** ("Lets coding agents list databases and read the live query stream").
3. Check the status line under the toggle. It should read **Running**.
4. Add your agent under **Client Setup**, see [set up an agent](/docs/ai-agents/setup/).

The choice is saved in `mcp.json` in the [app data directory](/docs/instances/data-location/), so it survives restarts. If it was on when SQLEye last ran, the server starts again at launch.

## What does the status line say?

| Status | Meaning |
|---|---|
| Off — nothing is listening | The toggle is off. No socket exists. |
| Running | The server is listening. When agents are connected it adds, for example, "· 1 agent connected". |
| Error: … | The server could not start, with the reason. See [troubleshooting](/docs/ai-agents/troubleshooting/). |
| Stopped | The server is not running. |

## What happens when I switch it off?

SQLEye stops listening, removes the socket file, closes open agent connections and discards any approval that was waiting. Nothing stays running.

## Where is the endpoint?

On macOS and Linux it is `mcp.sock` in the app data directory, created with owner-only permissions (0600). On Windows it is the named pipe `\\.\pipe\sqleye-mcp-<user>`. A Unix socket path longer than about 100 bytes is rejected with an error that says so. If another SQLEye already serves MCP for the same user, a second one reports that it is already being served.

## What does an agent start when it connects?

The agent runs `sqleye-mcp`. If SQLEye is not running, the helper tries to open it and waits up to 8 seconds for the socket. If SQLEye is running but MCP is off, the helper cannot connect and answers with an error that tells you to switch it on, see [SQLEye is not reachable](/docs/ai-agents/troubleshooting/#what-does-sqleye-is-not-reachable-mean).

## Where can I see what agents did?

Under the settings, **Recent activity** lists the last 100 calls, newest first: the agent, the tool, the instance it targeted and the time. Calls that failed or were refused are marked. The list is kept in memory and is empty after a restart.
