Trino MCP Server logo

Trino MCP Server

by Dataring-engineering

This repository provides an MCP server that allows you to list and query tables via Trino using Python. It bridges AI models, data, and tools by providing access to Trino tables and enabling SQL query execution.

View on GitHub

Last updated: N/A

What is Trino MCP Server?

This is an MCP (Model-Control-Protocol) server that exposes Trino tables as MCP resources. It allows listing tables, reading table contents, and executing arbitrary SQL queries against a Trino instance.

How to use Trino MCP Server?

  1. Configure the server by setting the required environment variables (TRINO_HOST, TRINO_PORT, TRINO_USER, TRINO_PASSWORD, TRINO_CATALOG, TRINO_SCHEMA). 2. Install the necessary Python packages (trino, mcp). 3. Run the server using the provided configuration example.

Key features of Trino MCP Server

  • Lists Trino tables as MCP resources

  • Reads table contents through MCP

  • Executes arbitrary SQL queries against Trino

  • Uses Trino's Python client (trino.dbapi) for connectivity

Use cases of Trino MCP Server

  • Integrating Trino data with AI models

  • Providing a standardized interface for accessing Trino data

  • Building data pipelines that leverage Trino's query capabilities

  • Enabling data discovery and exploration through MCP

FAQ from Trino MCP Server

What is MCP?

MCP is a protocol for bridging AI models, data, and tools.

What is Trino?

Trino is a fast, distributed SQL query engine for big data analytics.

What Python version is required?

Python 3.9+ (or a version compatible with mcp, trino, and asyncio)

What environment variables are required?

TRINO_HOST, TRINO_PORT, TRINO_USER, TRINO_CATALOG, and TRINO_SCHEMA are required. TRINO_PASSWORD is optional.

How do I run the server?

Install the required dependencies and use the provided configuration example to run the server.