Skip to main content

Trino MCP Server

This repository provides an MCP (Model-Control-Protocol) server that allows you to list and query tables via Trino using Python.

Overview

  • MCP: MCP is a protocol for bridging AI models, data, and tools. This example MCP server provides:
    • A list of Trino tables as MCP resources
    • Ability to read table contents through MCP
    • A tool for executing arbitrary SQL queries against Trino
  • Trino: A fast, distributed SQL query engine for big data analytics. This server makes use of Trino’s Python client (trino.dbapi) to connect to a Trino host, catalog, and schema.

Requirements

  • Python 3.9+ (or a version compatible with mcp, trino, and asyncio)
  • trino (the Python driver for Trino)
  • mcp (the Model-Control-Protocol Python library)

Configuration

The server reads Trino connection details from environment variables:

Variable Description Default
TRINO_HOST Trino server hostname or IP localhost
TRINO_PORT Trino server port 8080
TRINO_USER Trino user name required
TRINO_PASSWORD Trino password (optional, depends on your authentication setup) (empty)
TRINO_CATALOG Default catalog to use (e.g., hive, tpch, postgresql, etc.) required
TRINO_SCHEMA Default schema to use (e.g., default, public, etc.) required

Usage

{
  "mcpServers": {
    "trino": {
      "command": "uv",
      "args": [
        "--directory", 
        "<path_to_mcp_server_trino>",
        "run",
        "mcp_server_trino"
      ],
      "env": {
        "TRINO_HOST": "<host>",
        "TRINO_PORT": "<port>",
        "TRINO_USER": "<user>",
        "TRINO_PASSWORD": "<password>",
        "TRINO_CATALOG": "<catalog>",
        "TRINO_SCHEMA": "<schema>"
      }
    }
  }
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_mcp_server_trino-0.1.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_mcp_server_trino-0.1.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_mcp_server_trino-0.1.2.tar.gz.

File metadata

  • Download URL: iflow_mcp_mcp_server_trino-0.1.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_mcp_server_trino-0.1.2.tar.gz
Algorithm Hash digest
SHA256 772ab412c3d21d16412daf471bd820e830641479ff20766c71b634e93a42c18c
MD5 17a74f3dfb25315dde9c862af5ebc85f
BLAKE2b-256 baa2981e34d1ed5cb672c13d6b5d51026d1275307e9adf722a9606e646f7aa82

See more details on using hashes here.

File details

Details for the file iflow_mcp_mcp_server_trino-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_mcp_server_trino-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_mcp_server_trino-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 708950c6b5c4b761801ba949b50130759411cb731c5715579c90f46b7d376b11
MD5 5d84bf4b677446330480d9842febea14
BLAKE2b-256 eb68a738d4821dc966217780e1d0e3df952a738333ab76c301ae644674947bf3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page