Skip to main content

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"
      }
    }
  }
}

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
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

Release files for lagaam 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lagaam 0.2.3
File Size Uploaded
lagaam-0.2.3.tar.gz 107.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lagaam 0.2.3
File Interpreter ABI Platform
lagaam-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 233.3 kB

Release files / lagaam-0.2.3.tar.gz

Download URL lagaam-0.2.3.tar.gz
Size 107.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9107b3a87e515c70196436cdcce24504534c3115c27ea65d9a4fb859dcfe45a8
BLAKE2b-256 checksum
How to use checksums
e88e92f8304972bc0982cbf5e7b5c276e1c054cd0ab8fb83b172144fa2be21b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 27, 2026.

Transparency log

Release files / lagaam-0.2.3-py3-none-any.whl

Download URL lagaam-0.2.3-py3-none-any.whl
Size 126.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99e5d7a86bbe96ad670969f0d0dc9c734727c9ee73d6e65b0de2c7487f01f53e
BLAKE2b-256 checksum
How to use checksums
fe796b01dc1b9cd5adcbe2581997c8b5ecfee8d7a0bdea807177256f077d95d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.4

2 release files

This release

0.2.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page