Lagaam MCP
Lagaam is an MCP server that prevents AI agents from stalling shared Trino or Apache Pinot clusters by intercepting queries before execution. It prices queries using the engine's own plan, checks them against a budget, and refuses those that are over budget or un-estimable. It enforces read-only access, validates SQL via AST, and provides audit logs for every tool call.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Stop catastrophic SQL queries before they run
- Price queries against a budget using engine plans
- Enforce read-only access for AI agents
- Audit agent database interactions
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
lagaam 0.2.5
{
"version": "0.2.5",
"transport": "stdio",
"identifier": "lagaam",
"registryType": "pypi",
"environmentVariables": [
{
"name": "LAGAAM_ALLOWED_TABLES",
"isRequired": true,
"description": "Comma list of catalog.schema.table grants; the server will not start without it"
},
{
"name": "LAGAAM_ALLOW_ALL_TABLES",
"format": "boolean",
"description": "true to run with no grant at all: an explicit opt-out, off by default"
},
{
"name": "LAGAAM_ENGINE",
"choices": [
"trino",
"pinot"
],
"default": "trino",
"description": "Which adapter to run"
},
{
"name": "TRINO_HOST",
"default": "localhost",
"description": "Trino coordinator host"
},
{
"name": "TRINO_PORT",
"format": "number",
"default": "8080",
"description": "Trino coordinator port"
},
{
"name": "TRINO_USER",
"default": "lagaam",
"description": "Trino user"
},
{
"name": "PINOT_CONTROLLER_URL",
"default": "http://localhost:9000",
"description": "Pinot controller URL"
},
{
"name": "PINOT_BROKER_URL",
"default": "http://localhost:8000",
"description": "Pinot broker URL"
},
{
"name": "PINOT_USER",
"description": "Pinot user; unset means no auth"
},
{
"name": "PINOT_PASSWORD",
"description": "Pinot password; unset means no auth"
},
{
"name": "LAGAAM_AGENT_NAME",
"default": "anonymous",
"description": "Identity stamped on the audit trail"
},
{
"name": "LAGAAM_MAX_SCAN_BYTES",
"format": "number",
"default": "53687091200",
"description": "Scan-bytes budget per query, checked before it runs (default 50 GiB)"
},
{
"name": "LAGAAM_MAX_ROWS",
"format": "number",
"description": "Scanned-row estimate budget per query; unset means ungated"
},
{
"name": "LAGAAM_MAX_INTERMEDIATE_ROWS",
"format": "number",
"default": "50000000",
"description": "Rows the engine would build at its widest step, not rows returned, so a LIMIT doesn't lower it"
},
{
"name": "LAGAAM_MAX_RETURNED_ROWS",
"format": "number",
"default": "1000",
"description": "Rows returned to the agent per query, capped at 100000; a bigger LIMIT in the query is lowered to it"
},
{
"name": "LAGAAM_QUERY_TIMEOUT",
"format": "number",
"default": "300",
"description": "Wall-clock seconds per query"
},
{
"name": "LAGAAM_METADATA_TTL",
"format": "number",
"default": "300",
"description": "Metadata cache TTL, seconds"
},
{
"name": "LAGAAM_AUDIT_LOG",
"format": "filepath",
"description": "Audit JSONL file path; unset means stderr"
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"lagaam-mcp": {
"command": "uvx",
"args": [
"lagaam==0.2.5"
],
"env": {
"LAGAAM_ALLOWED_TABLES": "<YOUR_LAGAAM_ALLOWED_TABLES>",
"LAGAAM_ALLOW_ALL_TABLES": "<YOUR_LAGAAM_ALLOW_ALL_TABLES>",
"LAGAAM_ENGINE": "<YOUR_LAGAAM_ENGINE>",
"TRINO_HOST": "<YOUR_TRINO_HOST>",
"TRINO_PORT": "<YOUR_TRINO_PORT>",
"TRINO_USER": "<YOUR_TRINO_USER>",
"PINOT_CONTROLLER_URL": "<YOUR_PINOT_CONTROLLER_URL>",
"PINOT_BROKER_URL": "<YOUR_PINOT_BROKER_URL>",
"PINOT_USER": "<YOUR_PINOT_USER>",
"PINOT_PASSWORD": "<YOUR_PINOT_PASSWORD>",
"LAGAAM_AGENT_NAME": "<YOUR_LAGAAM_AGENT_NAME>",
"LAGAAM_MAX_SCAN_BYTES": "<YOUR_LAGAAM_MAX_SCAN_BYTES>",
"LAGAAM_MAX_ROWS": "<YOUR_LAGAAM_MAX_ROWS>",
"LAGAAM_MAX_INTERMEDIATE_ROWS": "<YOUR_LAGAAM_MAX_INTERMEDIATE_ROWS>",
"LAGAAM_MAX_RETURNED_ROWS": "<YOUR_LAGAAM_MAX_RETURNED_ROWS>",
"LAGAAM_QUERY_TIMEOUT": "<YOUR_LAGAAM_QUERY_TIMEOUT>",
"LAGAAM_METADATA_TTL": "<YOUR_LAGAAM_METADATA_TTL>",
"LAGAAM_AUDIT_LOG": "<YOUR_LAGAAM_AUDIT_LOG>"
}
}
}
}Cline
{
"mcpServers": {
"lagaam-mcp": {
"command": "uvx",
"args": [
"lagaam==0.2.5"
],
"env": {
"LAGAAM_ALLOWED_TABLES": "<YOUR_LAGAAM_ALLOWED_TABLES>",
"LAGAAM_ALLOW_ALL_TABLES": "<YOUR_LAGAAM_ALLOW_ALL_TABLES>",
"LAGAAM_ENGINE": "<YOUR_LAGAAM_ENGINE>",
"TRINO_HOST": "<YOUR_TRINO_HOST>",
"TRINO_PORT": "<YOUR_TRINO_PORT>",
"TRINO_USER": "<YOUR_TRINO_USER>",
"PINOT_CONTROLLER_URL": "<YOUR_PINOT_CONTROLLER_URL>",
"PINOT_BROKER_URL": "<YOUR_PINOT_BROKER_URL>",
"PINOT_USER": "<YOUR_PINOT_USER>",
"PINOT_PASSWORD": "<YOUR_PINOT_PASSWORD>",
"LAGAAM_AGENT_NAME": "<YOUR_LAGAAM_AGENT_NAME>",
"LAGAAM_MAX_SCAN_BYTES": "<YOUR_LAGAAM_MAX_SCAN_BYTES>",
"LAGAAM_MAX_ROWS": "<YOUR_LAGAAM_MAX_ROWS>",
"LAGAAM_MAX_INTERMEDIATE_ROWS": "<YOUR_LAGAAM_MAX_INTERMEDIATE_ROWS>",
"LAGAAM_MAX_RETURNED_ROWS": "<YOUR_LAGAAM_MAX_RETURNED_ROWS>",
"LAGAAM_QUERY_TIMEOUT": "<YOUR_LAGAAM_QUERY_TIMEOUT>",
"LAGAAM_METADATA_TTL": "<YOUR_LAGAAM_METADATA_TTL>",
"LAGAAM_AUDIT_LOG": "<YOUR_LAGAAM_AUDIT_LOG>"
}
}
}
}VS Code
{
"servers": {
"lagaam-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"lagaam==0.2.5"
],
"env": {
"LAGAAM_ALLOWED_TABLES": "<YOUR_LAGAAM_ALLOWED_TABLES>",
"LAGAAM_ALLOW_ALL_TABLES": "<YOUR_LAGAAM_ALLOW_ALL_TABLES>",
"LAGAAM_ENGINE": "<YOUR_LAGAAM_ENGINE>",
"TRINO_HOST": "<YOUR_TRINO_HOST>",
"TRINO_PORT": "<YOUR_TRINO_PORT>",
"TRINO_USER": "<YOUR_TRINO_USER>",
"PINOT_CONTROLLER_URL": "<YOUR_PINOT_CONTROLLER_URL>",
"PINOT_BROKER_URL": "<YOUR_PINOT_BROKER_URL>",
"PINOT_USER": "<YOUR_PINOT_USER>",
"PINOT_PASSWORD": "<YOUR_PINOT_PASSWORD>",
"LAGAAM_AGENT_NAME": "<YOUR_LAGAAM_AGENT_NAME>",
"LAGAAM_MAX_SCAN_BYTES": "<YOUR_LAGAAM_MAX_SCAN_BYTES>",
"LAGAAM_MAX_ROWS": "<YOUR_LAGAAM_MAX_ROWS>",
"LAGAAM_MAX_INTERMEDIATE_ROWS": "<YOUR_LAGAAM_MAX_INTERMEDIATE_ROWS>",
"LAGAAM_MAX_RETURNED_ROWS": "<YOUR_LAGAAM_MAX_RETURNED_ROWS>",
"LAGAAM_QUERY_TIMEOUT": "<YOUR_LAGAAM_QUERY_TIMEOUT>",
"LAGAAM_METADATA_TTL": "<YOUR_LAGAAM_METADATA_TTL>",
"LAGAAM_AUDIT_LOG": "<YOUR_LAGAAM_AUDIT_LOG>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"lagaam-mcp": {
"command": "uvx",
"args": [
"lagaam==0.2.5"
],
"env": {
"LAGAAM_ALLOWED_TABLES": "<YOUR_LAGAAM_ALLOWED_TABLES>",
"LAGAAM_ALLOW_ALL_TABLES": "<YOUR_LAGAAM_ALLOW_ALL_TABLES>",
"LAGAAM_ENGINE": "<YOUR_LAGAAM_ENGINE>",
"TRINO_HOST": "<YOUR_TRINO_HOST>",
"TRINO_PORT": "<YOUR_TRINO_PORT>",
"TRINO_USER": "<YOUR_TRINO_USER>",
"PINOT_CONTROLLER_URL": "<YOUR_PINOT_CONTROLLER_URL>",
"PINOT_BROKER_URL": "<YOUR_PINOT_BROKER_URL>",
"PINOT_USER": "<YOUR_PINOT_USER>",
"PINOT_PASSWORD": "<YOUR_PINOT_PASSWORD>",
"LAGAAM_AGENT_NAME": "<YOUR_LAGAAM_AGENT_NAME>",
"LAGAAM_MAX_SCAN_BYTES": "<YOUR_LAGAAM_MAX_SCAN_BYTES>",
"LAGAAM_MAX_ROWS": "<YOUR_LAGAAM_MAX_ROWS>",
"LAGAAM_MAX_INTERMEDIATE_ROWS": "<YOUR_LAGAAM_MAX_INTERMEDIATE_ROWS>",
"LAGAAM_MAX_RETURNED_ROWS": "<YOUR_LAGAAM_MAX_RETURNED_ROWS>",
"LAGAAM_QUERY_TIMEOUT": "<YOUR_LAGAAM_QUERY_TIMEOUT>",
"LAGAAM_METADATA_TTL": "<YOUR_LAGAAM_METADATA_TTL>",
"LAGAAM_AUDIT_LOG": "<YOUR_LAGAAM_AUDIT_LOG>"
}
}
}
}Let your agent find its tools
Find servers like Lagaam MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.