QueryBench

Docs / Desktop AI access (MCP)

Desktop AI access (MCP)

Let an AI agent discover connections, describe tables and run paginated queries through a loopback MCP server.

The MCP title-bar button starts an authenticated, loopback-only Model Context Protocol server. It exposes saved connection discovery, connection opening, table metadata and paginated queries through the same adapters the interface uses. This feature is desktop-only.

Tools

ToolPurpose
list_databasesList saved connections without stored passwords
connectOpen a saved connection
list_tablesList tables and views in a schema
describe_tableReturn column metadata for a table
run_queryRun a paginated query with backend limits

Security

  • The server binds to loopback, never the Wi-Fi interface, and requires an unpredictable bearer token. Host and origin restrictions are enforced.
  • Enablement is explicit and session-scoped. The panel shows concrete client configuration and server status.
  • MCP respects the connection's No-Edit and read-only policy and cannot unlock a connection.
  • Query timeouts, pagination and maximum page sizes match backend limits. Errors and cancellation propagate to the caller.

Client configuration

Copy the endpoint and token from the MCP panel into your agent's MCP client settings. The token changes each time the server starts. A typical configuration entry looks like this:

{
  "mcpServers": {
    "querybench": {
      "url": "http://127.0.0.1:<port>/mcp",
      "headers": { "Authorization": "Bearer <token from the MCP panel>" }
    }
  }
}