Trino

Provides an MCP server that executes Trino SQL and discovers catalogs, schemas, and tables through MCP tools.
  • go

90

GitHub Stars

go

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "tuannvm-mcp-trino": {
      "command": "mcp-trino",
      "args": [],
      "env": {
        "JWT_SECRET": "YOUR_SECRET",
        "OAUTH_MODE": "native",
        "TRINO_HOST": "localhost:8080 or your Trino host",
        "TRINO_USER": "trino user for Trino connection",
        "OIDC_ISSUER": "https://company.okta.com",
        "TRINO_SCHEME": "http or https",
        "MCP_TRANSPORT": "stdio or http depending on integration",
        "OIDC_AUDIENCE": "https://mcp-server.example",
        "OAUTH_PROVIDER": "native or proxy",
        "TRINO_IMPERSONATION_FIELD": "email",
        "TRINO_ENABLE_IMPERSONATION": "true"
      }
    }
  }
}

You can run a high-performance MCP server implemented in Go that lets AI assistants query Trino's distributed SQL engine using standardized MCP tools, enabling seamless data exploration and analysis across multiple data sources.

How to use

Start the local MCP server using the standard runtime you installed. Once running, you can connect MCP-compatible clients to the server over the supported transports and issue tools like execute_query, list_catalogs, list_schemas, list_tables, get_table_schema, and explain_query. The server authenticates users (with optional OAuth support) and forwards your SQL queries to Trino, returning results and metadata compatible with your client’s MCP tooling.

How to install

Prerequisites: you need a working Go toolchain to build or you can install a prebuilt binary. You also need a Trino cluster reachable from the server if you plan to run actual queries.

Install the MCP Trino server using the provided package manager or installation script.

# Homebrew (macOS/Linux)
brew install tuannvm/mcp/mcp-trino

# Or one-liner (macOS/Linux)
curl -fsSL https://raw.githubusercontent.com/tuannvm/mcp-trino/main/install.sh | bash

Additional configuration and usage notes

Configuration revolves around connecting to your Trino cluster, choosing the transport, and optionally enabling OAuth for user authentication. The server exposes multiple transports (STDIO for local development and HTTP for remote connections) and supports both native and proxy OAuth flows. You can customize which Trino catalogs and schemas are visible to optimally focus AI assistants on relevant data sources.

For local development, you typically start the server after setting essential environment variables that point to Trino and define transport type. The most common setup simply runs the server binary in your environment.

Security and OAuth

OAuth 2.1 authentication is supported via a dedicated library and can operate in native mode (client handles OAuth directly with no server-side secrets) or proxy mode (the server proxies OAuth flow for simpler clients). This setup includes token caching, PKCE, and defense-in-depth security features to protect tokens and sessions.

You can enable OAuth by configuring environment variables that select the mode and provider, such as enabling OAUTH and choosing the provider, issuer, and audience in native mode, or providing client credentials in proxy mode.

Troubleshooting

If you cannot reach Trino from the MCP server, verify the TRINO_HOST setting and network access. Check that the transport you are using matches your client configuration (STDIO for local tools, HTTP for remote clients). Ensure OAuth configuration is correct if you enable authentication, and verify that tokens are being sent in the appropriate headers.

Available tools

execute_query

Run a SQL query against Trino and return results to the MCP client.

list_catalogs

Discover available Trino catalogs.

list_schemas

List schemas within a catalog.

list_tables

List tables within a schema.

get_table_schema

Retrieve the schema for a specific table.

explain_query

Explain the execution plan for a query.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational