Lagaam
Stop your agent's query from taking down a shared Trino or Pinot cluster. Lagaam is an MCP server that sits between your AI agents and your lakehouse (Trino and Apache Pinot). Every query is schema-grounded, priced before it runs, checked against a budget, and audited. Over budget, it is refused before it runs — and the rejection tells the agent exactly how to fix its SQL.
Run it
Against the Trino you already have:
TRINO_HOST=trino.internal LAGAAM_ALLOWED_TABLES=hive.sales.orders uvx lagaam
Wire it into any MCP client (Claude Code, Claude Desktop, or your own agent):
{
"mcpServers": {
"lagaam": {
"command": "uvx",
"args": ["lagaam"],
"env": {
"TRINO_HOST": "localhost",
"LAGAAM_MAX_SCAN_BYTES": "5368709120",
"LAGAAM_ALLOWED_TABLES": "hive.sales.orders,hive.sales.customers"
}
}
}
}
In Claude Code, install it as a plugin instead — it asks for the tables to allow and your Trino host:
/plugin marketplace add lagaam-ai/lagaam
/plugin install lagaam@lagaam
On Pinot, pick engine=pinot and set the controller and broker URLs:
claude plugin install lagaam@lagaam --config engine=pinot \
--config allowed_tables=pinot.default.baseballStats \
--config pinot_controller_url=http://pinot.internal:9000 \
--config pinot_broker_url=http://pinot.internal:8099
The agent gets three tools — list_catalogs, describe_table,
query_data — and cannot reach the engine any other way.
Configure it
| Env var | Meaning | Default |
|---|---|---|
LAGAAM_ALLOWED_TABLES |
Comma list of catalog.schema.table grants |
required |
TRINO_HOST / TRINO_PORT / TRINO_USER |
Trino coordinator | localhost / 8080 / lagaam |
TRINO_PASSWORD |
Password for TRINO_USER, for a cluster that wants a login |
unset (no login) |
TRINO_JWT |
JWT to log in with instead of a password — set one or the other, not both | unset |
TRINO_HTTP_SCHEME |
http or https |
https once a password or JWT is set, else http |
TRINO_VERIFY |
Check the cluster's TLS cert: true, false, or the path of your CA bundle (PEM) for a private CA |
true |
LAGAAM_ENGINE |
pinot to run the native Pinot adapter |
trino |
PINOT_CONTROLLER_URL / PINOT_BROKER_URL |
Pinot controller and broker | http://localhost:9000 / http://localhost:8000 |
LAGAAM_MAX_SCAN_BYTES |
Scan-bytes budget per query, pre-execution | 50 GiB |
The server will not start without LAGAAM_ALLOWED_TABLES. An agent that
can reach every table in every catalog is the thing this exists to prevent, so
that has to be asked for — set LAGAAM_ALLOW_ALL_TABLES=true if you mean it.
Every budget and setting: Configuration.
Full docs: github.com/lagaam-ai/lagaam
Metadata
Release files for lagaam 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lagaam-1.0.0.tar.gz | 110.9 kB | With provenance | Details for lagaam-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lagaam-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for lagaam-1.0.0-py3-none-any.whl |
Total release size: 241.5 kB
Release files / lagaam-1.0.0.tar.gz
| Download URL | lagaam-1.0.0.tar.gz |
|---|---|
| Size | 110.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
138327b92f6542866a1b9b066928cb6c032a9905e375bd3492e127ae7bf70c3c
|
|
BLAKE2b-256 checksum How to use checksums |
920a0c64f1b257fa59626508d79d37859158b8c615457303cc96402ec835bdf6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / lagaam-1.0.0-py3-none-any.whl
| Download URL | lagaam-1.0.0-py3-none-any.whl |
|---|---|
| Size | 130.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e22f3035b2f4792ead45bf77fbe3b2c85f9be6de4d20e3e19e5be0b6aa900770
|
|
BLAKE2b-256 checksum How to use checksums |
dfb3bc7835560484f829cca26aaf5a9df3f40f4feda262e9a2f153b5ec809649
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for lagaam 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lagaam-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.