This repository provides an MCP (Model-Control-Protocol) server that allows you to list and query tables via Trino using Python. - 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, distribu
Add this skill
npx mdskills install Dataring-engineering/mcp-server-trinoWell-documented MCP server for Trino SQL queries with clear setup and environment configuration
1# Trino MCP Server23This repository provides an MCP (Model-Control-Protocol) server that allows you to list and query tables via Trino using Python.45## Overview67- MCP: MCP is a protocol for bridging AI models, data, and tools. This example MCP server provides:8 - A list of Trino tables as MCP resources9 - Ability to read table contents through MCP10 - A tool for executing arbitrary SQL queries against Trino11- 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.1213## Requirements1415- Python 3.9+ (or a version compatible with mcp, trino, and asyncio)16- trino (the Python driver for Trino)17- mcp (the Model-Control-Protocol Python library)1819## Configuration2021The server reads Trino connection details from environment variables:2223| Variable | Description | Default |24|------------------|----------------------------------------------------------------------|------------|25| `TRINO_HOST` | Trino server hostname or IP | `localhost`|26| `TRINO_PORT` | Trino server port | `8080` |27| `TRINO_USER` | Trino user name | *required* |28| `TRINO_PASSWORD` | Trino password (optional, depends on your authentication setup) | (empty) |29| `TRINO_CATALOG` | Default catalog to use (e.g., `hive`, `tpch`, `postgresql`, etc.) | *required* |30| `TRINO_SCHEMA` | Default schema to use (e.g., `default`, `public`, etc.) | *required* |3132## Usage3334``` json35{36 "mcpServers": {37 "trino": {38 "command": "uv",39 "args": [40 "--directory",41 "<path_to_mcp_server_trino>",42 "run",43 "mcp_server_trino"44 ],45 "env": {46 "TRINO_HOST": "<host>",47 "TRINO_PORT": "<port>",48 "TRINO_USER": "<user>",49 "TRINO_PASSWORD": "<password>",50 "TRINO_CATALOG": "<catalog>",51 "TRINO_SCHEMA": "<schema>"52 }53 }54 }55}5657```
Full transparency — inspect the skill content before installing.