| Database URL | DATABASE_URL | --database-url | string | (required) | PostgreSQL connection string, e.g. postgres://user:pass@localhost:5432/mydb |
| Read only | READ_ONLY | — | bool | true | Wrap all queries in read-only transactions |
| Max rows | MAX_ROWS | --max-rows | int | 100 | Maximum rows returned per query |
| Query timeout | QUERY_TIMEOUT | --query-timeout | duration | 10s | Query execution timeout (Go duration format, e.g. 30s, 1m) |
| Schemas | SCHEMAS | — | string | (all non-system) | Comma-separated list of schemas to expose, e.g. public,analytics |
| Policy file | POLICY_FILE | --policy-file | string | (none) | Path to a policy YAML file for business context enrichment and column masking |
| Log level | LOG_LEVEL | --log-level | string | info | Log verbosity: debug, info, warn, error |
| Dry run | — | --dry-run | bool | false | Validate config, connect to DB, ping, then exit |
| Explain only | — | --explain-only | bool | false | Force all query calls to return EXPLAIN plans instead of results |
| Transport | TRANSPORT | --transport | string | stdio | Transport mode: stdio or http (docs) |
| HTTP address | HTTP_ADDR | --http-addr | string | :8080 | Listen address for HTTP transport, e.g. :3000, 127.0.0.1:8080 |
| Bearer token | HTTP_BEARER_TOKEN | --http-bearer-token | string | (required for HTTP) | Bearer token for authenticating HTTP requests. See HTTP Transport |
| Audit log | — | --audit-log | string | (none) | Path to NDJSON file for query audit logging |
| OpenTelemetry | OTEL_ENABLED | --otel | bool | false | Enable OpenTelemetry tracing and metrics (OTLP gRPC) |
| Version | — | --version | bool | — | Print version and exit |