Trino

v0.8.2
io.github.alaturqua/mcp-trino-python Checked 3 hours ago Published 5 days ago

Query Trino and inspect or maintain Iceberg tables: catalogs, schemas, SQL, snapshots.

Values you need

VariableWhat it is
TRINO_HOSTrequired Trino server hostname Default: localhost
TRINO_PORToptional Trino server port Default: 8080
TRINO_USERrequired Trino username Default: trino
TRINO_PASSWORDoptional secret Trino password (enables basic auth; use with https)
TRINO_HTTP_SCHEMEoptional http or https Default: http
TRINO_CATALOGoptional Default catalog
TRINO_SCHEMAoptional Default schema
TRINO_READ_ONLYoptional Allow only read statements and hide maintenance tools Default: false

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add mcp-trino-python -e TRINO_HOST=localhost -e TRINO_USER=trino -- uvx --from mcp-trino-python==0.8.2 mcp-trino
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-trino-python": {
      "args": [
        "--from",
        "mcp-trino-python==0.8.2",
        "mcp-trino"
      ],
      "command": "uvx",
      "env": {
        "TRINO_HOST": "localhost",
        "TRINO_USER": "trino"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-trino-python": {
      "args": [
        "--from",
        "mcp-trino-python==0.8.2",
        "mcp-trino"
      ],
      "command": "uvx",
      "env": {
        "TRINO_HOST": "localhost",
        "TRINO_USER": "trino"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "TRINO_HOST",
      "id": "trino-host",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "TRINO_USER",
      "id": "trino-user",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mcp-trino-python": {
      "args": [
        "--from",
        "mcp-trino-python==0.8.2",
        "mcp-trino"
      ],
      "command": "uvx",
      "env": {
        "TRINO_HOST": "${input:trino-host}",
        "TRINO_USER": "${input:trino-user}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-trino-python]
command = "uvx"
args = ["--from", "mcp-trino-python==0.8.2", "mcp-trino"]
env = { "TRINO_HOST" = "localhost", "TRINO_USER" = "trino" }

Docker

Requires Docker

Run in a terminal
claude mcp add mcp-trino-python -e TRINO_HOST=localhost -e TRINO_USER=trino -- docker run -i --rm -e TRINO_HOST -e TRINO_USER ghcr.io/alaturqua/mcp-trino-python:0.8.2
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-trino-python": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "TRINO_HOST",
        "-e",
        "TRINO_USER",
        "ghcr.io/alaturqua/mcp-trino-python:0.8.2"
      ],
      "command": "docker",
      "env": {
        "TRINO_HOST": "localhost",
        "TRINO_USER": "trino"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-trino-python": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "TRINO_HOST",
        "-e",
        "TRINO_USER",
        "ghcr.io/alaturqua/mcp-trino-python:0.8.2"
      ],
      "command": "docker",
      "env": {
        "TRINO_HOST": "localhost",
        "TRINO_USER": "trino"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "TRINO_HOST",
      "id": "trino-host",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "TRINO_USER",
      "id": "trino-user",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mcp-trino-python": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "TRINO_HOST",
        "-e",
        "TRINO_USER",
        "ghcr.io/alaturqua/mcp-trino-python:0.8.2"
      ],
      "command": "docker",
      "env": {
        "TRINO_HOST": "${input:trino-host}",
        "TRINO_USER": "${input:trino-user}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-trino-python]
command = "docker"
args = ["run", "-i", "--rm", "-e", "TRINO_HOST", "-e", "TRINO_USER", "ghcr.io/alaturqua/mcp-trino-python:0.8.2"]
env = { "TRINO_HOST" = "localhost", "TRINO_USER" = "trino" }

For AI agents

  1. Ask the user for: TRINO_HOST, TRINO_USER. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: show_catalogs, show_schemas, show_tables, describe_table, show_create_table, show_create_view, show_stats, show_catalog_tree, ….
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json