# SQL Benchmarks Lab MCP server

> Provides a deterministic orchestration harness for verifying database performance using synthetic and canonical SQL benchmarks.

- Repository: https://github.com/rctruta/sql-benchmarks-dagster
- Page: https://hostedmcp.org/servers/rctruta/sql-benchmarks-dagster
- Transport: stdio
- Stars: 3
- License: Apache-2.0
- Latest version: 0.1.2

## Install

### Claude Code

```sh
claude mcp add sql-benchmarks-dagster -- uvx sqlbenchdag
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "sql-benchmarks-dagster": {
      "command": "uvx",
      "args": [
        "sqlbenchdag"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "sql-benchmarks-dagster": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "sqlbenchdag"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"sql-benchmarks-dagster","type":"stdio","command":"uvx","args":["sqlbenchdag"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "sql-benchmarks-dagster": {
      "command": "uvx",
      "args": [
        "sqlbenchdag"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add sql-benchmarks-dagster -- uvx sqlbenchdag
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.sql-benchmarks-dagster]
command = "uvx"
args = ["sqlbenchdag"]
```

### Gemini CLI

```sh
gemini mcp add -s user sql-benchmarks-dagster uvx -- sqlbenchdag
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "sql-benchmarks-dagster": {
      "command": "uvx",
      "args": [
        "sqlbenchdag"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `SB_API_BASE` | no | no | Optional. Base URL of a running SQL Benchmarks REST API. Leave unset and the read tools mount the API in-process — no server needed. Set it only when the API runs elsewhere, or to use submit_experiment, which needs a process that outlives the request. |
| `SB_RESULTS_DIR` | no | no | Directory of experiment result capsules. The package ships the SQL suites, taxonomy and templates but NOT capsules, which are run output — so on a fresh install the catalog tools work and list_results is empty until this points at a results directory. |

## FAQ

### How does the system handle database cache isolation?

It uses Docker container restarts for Postgres and fresh worker processes for DuckDB to clear engine-level buffers.

### Can AI agents use this platform?

Yes, the platform is designed for autonomous engineering, allowing AI agents to use the Experiment ID as a deterministic performance API.
