L

Lagaam

by lagaam-ai · io.github.lagaam-ai/lagaam

Enables AI agents to query Trino and Apache Pinot lakehouses under enforced governance, where every SQL statement is AST-validated, table-allowlisted, priced from the engine's own plan before it runs, and blocked or admitted against scan-byte and intermediate-row budgets. It also grounds agents with schema discovery tools, returns verified results with warnings instead of misleading answers, and records every tool call on an audit trail.

pypi Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-lagaam-ai-lagaam": {
      "command": "uvx",
      "args": [
        "lagaam"
      ],
      "env": {
        "LAGAAM_ALLOWED_TABLES": "<VALUE>",
        "LAGAAM_ALLOW_ALL_TABLES": "<VALUE>",
        "LAGAAM_ENGINE": "trino",
        "TRINO_HOST": "localhost",
        "TRINO_PORT": "8080",
        "TRINO_USER": "lagaam",
        "TRINO_PASSWORD": "<YOUR_VALUE>",
        "TRINO_JWT": "<YOUR_VALUE>",
        "TRINO_HTTP_SCHEME": "<VALUE>",
        "TRINO_VERIFY": "true",
        "PINOT_CONTROLLER_URL": "http://localhost:9000",
        "PINOT_BROKER_URL": "http://localhost:8000",
        "PINOT_USER": "<VALUE>",
        "PINOT_PASSWORD": "<YOUR_VALUE>",
        "LAGAAM_AGENT_NAME": "anonymous",
        "LAGAAM_MAX_SCAN_BYTES": "53687091200",
        "LAGAAM_MAX_ROWS": "<VALUE>",
        "LAGAAM_MAX_INTERMEDIATE_ROWS": "50000000",
        "LAGAAM_MAX_RETURNED_ROWS": "1000",
        "LAGAAM_QUERY_TIMEOUT": "300",
        "LAGAAM_METADATA_TTL": "300",
        "LAGAAM_AUDIT_LOG": "stderr"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-lagaam-ai-lagaam": {
      "command": "uvx",
      "args": [
        "lagaam"
      ],
      "env": {
        "LAGAAM_ALLOWED_TABLES": "<VALUE>",
        "LAGAAM_ALLOW_ALL_TABLES": "<VALUE>",
        "LAGAAM_ENGINE": "trino",
        "TRINO_HOST": "localhost",
        "TRINO_PORT": "8080",
        "TRINO_USER": "lagaam",
        "TRINO_PASSWORD": "<YOUR_VALUE>",
        "TRINO_JWT": "<YOUR_VALUE>",
        "TRINO_HTTP_SCHEME": "<VALUE>",
        "TRINO_VERIFY": "true",
        "PINOT_CONTROLLER_URL": "http://localhost:9000",
        "PINOT_BROKER_URL": "http://localhost:8000",
        "PINOT_USER": "<VALUE>",
        "PINOT_PASSWORD": "<YOUR_VALUE>",
        "LAGAAM_AGENT_NAME": "anonymous",
        "LAGAAM_MAX_SCAN_BYTES": "53687091200",
        "LAGAAM_MAX_ROWS": "<VALUE>",
        "LAGAAM_MAX_INTERMEDIATE_ROWS": "50000000",
        "LAGAAM_MAX_RETURNED_ROWS": "1000",
        "LAGAAM_QUERY_TIMEOUT": "300",
        "LAGAAM_METADATA_TTL": "300",
        "LAGAAM_AUDIT_LOG": "stderr"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-lagaam-ai-lagaam": {
      "command": "uvx",
      "args": [
        "lagaam"
      ],
      "env": {
        "LAGAAM_ALLOWED_TABLES": "<VALUE>",
        "LAGAAM_ALLOW_ALL_TABLES": "<VALUE>",
        "LAGAAM_ENGINE": "trino",
        "TRINO_HOST": "localhost",
        "TRINO_PORT": "8080",
        "TRINO_USER": "lagaam",
        "TRINO_PASSWORD": "<YOUR_VALUE>",
        "TRINO_JWT": "<YOUR_VALUE>",
        "TRINO_HTTP_SCHEME": "<VALUE>",
        "TRINO_VERIFY": "true",
        "PINOT_CONTROLLER_URL": "http://localhost:9000",
        "PINOT_BROKER_URL": "http://localhost:8000",
        "PINOT_USER": "<VALUE>",
        "PINOT_PASSWORD": "<YOUR_VALUE>",
        "LAGAAM_AGENT_NAME": "anonymous",
        "LAGAAM_MAX_SCAN_BYTES": "53687091200",
        "LAGAAM_MAX_ROWS": "<VALUE>",
        "LAGAAM_MAX_INTERMEDIATE_ROWS": "50000000",
        "LAGAAM_MAX_RETURNED_ROWS": "1000",
        "LAGAAM_QUERY_TIMEOUT": "300",
        "LAGAAM_METADATA_TTL": "300",
        "LAGAAM_AUDIT_LOG": "stderr"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-lagaam-ai-lagaam": {
      "command": "uvx",
      "args": [
        "lagaam"
      ],
      "env": {
        "LAGAAM_ALLOWED_TABLES": "<VALUE>",
        "LAGAAM_ALLOW_ALL_TABLES": "<VALUE>",
        "LAGAAM_ENGINE": "trino",
        "TRINO_HOST": "localhost",
        "TRINO_PORT": "8080",
        "TRINO_USER": "lagaam",
        "TRINO_PASSWORD": "<YOUR_VALUE>",
        "TRINO_JWT": "<YOUR_VALUE>",
        "TRINO_HTTP_SCHEME": "<VALUE>",
        "TRINO_VERIFY": "true",
        "PINOT_CONTROLLER_URL": "http://localhost:9000",
        "PINOT_BROKER_URL": "http://localhost:8000",
        "PINOT_USER": "<VALUE>",
        "PINOT_PASSWORD": "<YOUR_VALUE>",
        "LAGAAM_AGENT_NAME": "anonymous",
        "LAGAAM_MAX_SCAN_BYTES": "53687091200",
        "LAGAAM_MAX_ROWS": "<VALUE>",
        "LAGAAM_MAX_INTERMEDIATE_ROWS": "50000000",
        "LAGAAM_MAX_RETURNED_ROWS": "1000",
        "LAGAAM_QUERY_TIMEOUT": "300",
        "LAGAAM_METADATA_TTL": "300",
        "LAGAAM_AUDIT_LOG": "stderr"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-lagaam-ai-lagaam": {
      "command": "uvx",
      "args": [
        "lagaam"
      ],
      "env": {
        "LAGAAM_ALLOWED_TABLES": "<VALUE>",
        "LAGAAM_ALLOW_ALL_TABLES": "<VALUE>",
        "LAGAAM_ENGINE": "trino",
        "TRINO_HOST": "localhost",
        "TRINO_PORT": "8080",
        "TRINO_USER": "lagaam",
        "TRINO_PASSWORD": "<YOUR_VALUE>",
        "TRINO_JWT": "<YOUR_VALUE>",
        "TRINO_HTTP_SCHEME": "<VALUE>",
        "TRINO_VERIFY": "true",
        "PINOT_CONTROLLER_URL": "http://localhost:9000",
        "PINOT_BROKER_URL": "http://localhost:8000",
        "PINOT_USER": "<VALUE>",
        "PINOT_PASSWORD": "<YOUR_VALUE>",
        "LAGAAM_AGENT_NAME": "anonymous",
        "LAGAAM_MAX_SCAN_BYTES": "53687091200",
        "LAGAAM_MAX_ROWS": "<VALUE>",
        "LAGAAM_MAX_INTERMEDIATE_ROWS": "50000000",
        "LAGAAM_MAX_RETURNED_ROWS": "1000",
        "LAGAAM_QUERY_TIMEOUT": "300",
        "LAGAAM_METADATA_TTL": "300",
        "LAGAAM_AUDIT_LOG": "stderr"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-lagaam-ai-lagaam": {
      "command": "uvx",
      "args": [
        "lagaam"
      ],
      "env": {
        "LAGAAM_ALLOWED_TABLES": "<VALUE>",
        "LAGAAM_ALLOW_ALL_TABLES": "<VALUE>",
        "LAGAAM_ENGINE": "trino",
        "TRINO_HOST": "localhost",
        "TRINO_PORT": "8080",
        "TRINO_USER": "lagaam",
        "TRINO_PASSWORD": "<YOUR_VALUE>",
        "TRINO_JWT": "<YOUR_VALUE>",
        "TRINO_HTTP_SCHEME": "<VALUE>",
        "TRINO_VERIFY": "true",
        "PINOT_CONTROLLER_URL": "http://localhost:9000",
        "PINOT_BROKER_URL": "http://localhost:8000",
        "PINOT_USER": "<VALUE>",
        "PINOT_PASSWORD": "<YOUR_VALUE>",
        "LAGAAM_AGENT_NAME": "anonymous",
        "LAGAAM_MAX_SCAN_BYTES": "53687091200",
        "LAGAAM_MAX_ROWS": "<VALUE>",
        "LAGAAM_MAX_INTERMEDIATE_ROWS": "50000000",
        "LAGAAM_MAX_RETURNED_ROWS": "1000",
        "LAGAAM_QUERY_TIMEOUT": "300",
        "LAGAAM_METADATA_TTL": "300",
        "LAGAAM_AUDIT_LOG": "stderr"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
LAGAAM_ALLOWED_TABLES Yes Comma list of catalog.schema.table grants. Required unless LAGAAM_ALLOW_ALL_TABLES is set to true.
LAGAAM_ALLOW_ALL_TABLES No Set to true to run with no grant at all.
LAGAAM_ENGINE No Set to pinot to use the native Pinot adapter. Default: trino
TRINO_HOST No Trino coordinator host. Default: localhost
TRINO_PORT No Trino coordinator port. Default: 8080
TRINO_USER No Trino user. Default: lagaam
TRINO_PASSWORD secret No Password for TRINO_USER; unset means no login. Not with TRINO_JWT
TRINO_JWT secret No JWT to log in with instead of a password; unset means no login
TRINO_HTTP_SCHEME No http or https; unset means https once a password or JWT is set, else http
TRINO_VERIFY No TLS cert check: true, false, or the path of a CA bundle (PEM) Default: true
PINOT_CONTROLLER_URL No Pinot controller URL Default: http://localhost:9000
PINOT_BROKER_URL No Pinot broker URL Default: http://localhost:8000
PINOT_USER No Pinot user; unset means no auth
PINOT_PASSWORD secret No Pinot password; unset means no auth
LAGAAM_AGENT_NAME No Identity stamped on the audit trail. Default: anonymous
LAGAAM_MAX_SCAN_BYTES No Scan-bytes budget per query, pre-execution. Default: 53687091200
LAGAAM_MAX_ROWS No Scanned-row estimate budget per query.
LAGAAM_MAX_INTERMEDIATE_ROWS No Rows the engine would build at its widest step. Default: 50000000
LAGAAM_MAX_RETURNED_ROWS No Rows returned to the agent per query; max 100000. Default: 1000
LAGAAM_QUERY_TIMEOUT No Wall-clock seconds per query. Default: 300
LAGAAM_METADATA_TTL No Metadata cache TTL, seconds. Default: 300
LAGAAM_AUDIT_LOG No Audit JSONL file path. Default: stderr

Similar servers