Metadata-Version: 2.4
Name: lagaam
Version: 0.2.4
Summary: Lagaam — governed MCP analytics server for the open lakehouse
Keywords: mcp,trino,pinot,llm,agents,sql,lakehouse,cost-guard
Author: Mudit Kapoor
Author-email: Mudit Kapoor <muditk441@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Typing :: Typed
Requires-Dist: mcp>=1.28,<2
Requires-Dist: pydantic>=2.11
Requires-Dist: sqlglot>=30,<31
Requires-Dist: httpx>=0.27
Requires-Dist: anyio>=4
Requires-Dist: trino>=0.330
Requires-Python: >=3.12
Project-URL: Changelog, https://github.com/lagaam-ai/lagaam/releases
Project-URL: Homepage, https://github.com/lagaam-ai/lagaam
Project-URL: Issues, https://github.com/lagaam-ai/lagaam/issues
Project-URL: Repository, https://github.com/lagaam-ai/lagaam
Description-Content-Type: text/markdown

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

```bash
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):

```json
{
  "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](https://github.com/lagaam-ai/lagaam#configuration).

Full docs: [github.com/lagaam-ai/lagaam](https://github.com/lagaam-ai/lagaam)

<!-- mcp-name: io.github.lagaam-ai/lagaam -->
