Get the FREE Ultimate OpenClaw Setup Guide →

mcp -trino

MCP Server for Trino

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dataring-engineering-mcp-server-trino uv --directory <path_to_mcp_server_trino> run mcp_server_trino \
  --env TRINO_HOST="<host>" \
  --env TRINO_PORT="<port>" \
  --env TRINO_USER="<user>" \
  --env TRINO_SCHEMA="<schema>" \
  --env TRINO_CATALOG="<catalog>" \
  --env TRINO_PASSWORD="<password>"

How to use

This MCP server exposes Trino-backed table resources via the MCP protocol. It lists tables available in the configured Trino catalog/schema as MCP resources and allows reading table contents or running arbitrary SQL queries against Trino through the MCP toolset. The server connects to Trino using the Python driver and integrates with the MCP framework so clients can discover, read, and query data programmatically as MCP resources. You can interact with it as part of a broader MCP-enabled tooling ecosystem, using the provided resources to fetch table metadata, stream rows, or execute custom SQL statements through the included MCP tool.

How to install

Prerequisites:

  • Python 3.9+ installed on your system
  • access to a Trino cluster (host, port, catalog, and schema)
  • network connectivity from the machine running the MCP server to Trino

Installation steps:

  1. Install Python packages needed by the server:

    • pip install mcp trino
  2. Clone or download the MCP server repository for Trino and navigate to the directory containing the mcp_server_trino entry point.

  3. Ensure you have the Trino connection details ready (host, port, user, catalog, schema). Optionally, set TRINO_PASSWORD if your setup requires authentication.

  4. Run the MCP server using the uv-based runner (as shown in the example configuration):

    uv --directory <path_to_mcp_server_trino> run mcp_server_trino

  5. Verify the server starts and exposes the MCP resources for Trino tables.

Notes:

  • If you change any Trino connection details, update the corresponding environment variables (TRINO_HOST, TRINO_PORT, TRINO_USER, TRINO_PASSWORD, TRINO_CATALOG, TRINO_SCHEMA).
  • For production, consider securing credentials and using appropriate network access controls.

Additional notes

Tips and common issues:

  • Ensure TRINO_USER has the necessary privileges to list tables and read data from the specified catalog/schema.
  • If TRINO_PASSWORD is not required by your setup, you can omit it; otherwise, provide a secure value.
  • The MCP server relies on the Trino Python client (trino). If you encounter driver errors, verify compatibility between your Python version and the trino package version.
  • If you run behind a firewall or require TLS, configure Trino connection settings accordingly and pass them via TRINO_* environment variables.
  • The MCP resources expose two capabilities: listing/mapping tables as resources and reading table contents. The included tool allows executing arbitrary SQL against Trino; craft SQL carefully to avoid long-running queries.
  • When using uv, the directory path should point to where the mcp_server_trino module is located and where its entry point is defined.

Related MCP Servers

Sponsor this space

Reach thousands of developers