Lagaam
v1.0.0Stops an agent's Trino or Pinot query before it runs if it costs too much or reads outside its grant
Values you need
| Variable | What it is | |
|---|---|---|
LAGAAM_ALLOWED_TABLES | required | Comma list of catalog.schema.table grants; the server will not start without it |
LAGAAM_ALLOW_ALL_TABLES | optional | true to run with no grant at all: an explicit opt-out, off by default |
LAGAAM_ENGINE | optional | Which adapter to run Default: trino |
TRINO_HOST | optional | Trino coordinator host Default: localhost |
TRINO_PORT | optional | Trino coordinator port Default: 8080 |
TRINO_USER | optional | Trino user Default: lagaam |
TRINO_PASSWORD | optional secret | Password for TRINO_USER; unset means no login. Not with TRINO_JWT |
TRINO_JWT | optional secret | JWT to log in with instead of a password; unset means no login |
TRINO_HTTP_SCHEME | optional | http or https; unset means https once a password or JWT is set, else http |
TRINO_VERIFY | optional | TLS cert check: true, false, or the path of a CA bundle (PEM) Default: true |
PINOT_CONTROLLER_URL | optional | Pinot controller URL Default: http://localhost:9000 |
PINOT_BROKER_URL | optional | Pinot broker URL Default: http://localhost:8000 |
PINOT_USER | optional | Pinot user; unset means no auth |
PINOT_PASSWORD | optional secret | Pinot password; unset means no auth |
LAGAAM_AGENT_NAME | optional | Identity stamped on the audit trail Default: anonymous |
LAGAAM_MAX_SCAN_BYTES | optional | Scan-bytes budget per query, checked before it runs (default 50 GiB) Default: 53687091200 |
LAGAAM_MAX_ROWS | optional | Scanned-row estimate budget per query; unset means ungated |
LAGAAM_MAX_INTERMEDIATE_ROWS | optional | Rows the engine would build at its widest step, not rows returned, so a LIMIT doesn't lower it Default: 50000000 |
LAGAAM_MAX_RETURNED_ROWS | optional | Rows returned to the agent per query, capped at 100000; a bigger LIMIT in the query is lowered to it Default: 1000 |
LAGAAM_QUERY_TIMEOUT | optional | Wall-clock seconds per query Default: 300 |
LAGAAM_METADATA_TTL | optional | Metadata cache TTL, seconds Default: 300 |
LAGAAM_AUDIT_LOG | optional | Audit JSONL file path; unset means stderr |
PyPI (uvx)
Requires uv (https://docs.astral.sh/uv/)
Run in a terminal
claude mcp add lagaam -e 'LAGAAM_ALLOWED_TABLES=<LAGAAM_ALLOWED_TABLES>' -- uvx lagaam==1.0.0Add to
claude_desktop_config.json{
"mcpServers": {
"lagaam": {
"args": [
"lagaam==1.0.0"
],
"command": "uvx",
"env": {
"LAGAAM_ALLOWED_TABLES": "<LAGAAM_ALLOWED_TABLES>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"lagaam": {
"args": [
"lagaam==1.0.0"
],
"command": "uvx",
"env": {
"LAGAAM_ALLOWED_TABLES": "<LAGAAM_ALLOWED_TABLES>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "LAGAAM_ALLOWED_TABLES",
"id": "lagaam-allowed-tables",
"password": true,
"type": "promptString"
}
],
"servers": {
"lagaam": {
"args": [
"lagaam==1.0.0"
],
"command": "uvx",
"env": {
"LAGAAM_ALLOWED_TABLES": "${input:lagaam-allowed-tables}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.lagaam]
command = "uvx"
args = ["lagaam==1.0.0"]
env = { "LAGAAM_ALLOWED_TABLES" = "<LAGAAM_ALLOWED_TABLES>" }For AI agents
- Ask the user for: LAGAAM_ALLOWED_TABLES. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.
Machine-readable: install.md · manifest.json