Trino MCP Server logo

Trino MCP Server

by MCP-Mirror

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 the ability to execute SQL queries.

View on GitHub

Last updated: N/A

What is Trino MCP Server?

This is an MCP (Model-Control-Protocol) server that allows you to interact with Trino, a fast, distributed SQL query engine for big data analytics. It leverages Trino's Python client to connect to a Trino host, catalog, and schema, exposing Trino tables as MCP resources.

How to use Trino MCP Server?

  1. Ensure you have Python 3.9+ installed along with the trino and mcp Python libraries.
  2. Configure the server by setting the required environment variables (TRINO_HOST, TRINO_PORT, TRINO_USER, TRINO_CATALOG, TRINO_SCHEMA, and optionally TRINO_PASSWORD).
  3. Use the provided JSON configuration to run the server using a command like uv run mcp_server_trino.

Key features of Trino MCP Server

  • Lists Trino tables as MCP resources

  • Allows reading table contents through MCP

  • Enables executing arbitrary SQL queries against Trino

  • Uses Trino's Python client for connectivity

  • Configurable via environment variables

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 are the required environment variables?

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

What Python version is required?

Python 3.9+ is recommended.

How do I install the necessary Python libraries?

Use pip or a similar package manager to install trino and mcp.