MCP Directory

Trino MCP Server

High-performance Go MCP server that lets AI assistants run SQL queries and explore data across a Trino cluster.

Unverified
stdio (local)
OAuth
Go

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
brew install tuannvm/mcp/mcp-trino

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "trino-mcp-server": {
      "command": "mcp-trino",
      "args": [],
      "env": {
        "TRINO_HOST": "<HOST>",
        "TRINO_PORT": "<PORT>",
        "TRINO_USER": "<USERNAME>",
        "TRINO_PASSWORD": "<PASSWORD>"
      }
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • A reachable Trino (or PrestoSQL) cluster with host, port, and user credentials
  • The mcp-trino binary (installed via Homebrew or the install.sh script) or Docker to run ghcr.io/tuannvm/mcp-trino
  • For production HTTP/OAuth deployments: an OIDC provider (Okta, Google, or Azure AD) and TLS certificates

About Trino MCP Server

Trino MCP Server bridges AI assistants and Trino's distributed SQL query engine. It exposes six MCP tools for running queries, navigating the catalog/schema/table hierarchy, reading table schemas, and explaining query plans, letting an assistant explore and query large datasets conversationally. It can also run as a standalone interactive CLI similar to the Trino CLI or psql. Dual transport (STDIO and StreamableHTTP/SSE), optional OAuth 2.1 auth, schema allowlists, and named connection profiles make it suitable for both local development and production deployments.

Tools & capabilities (6)

execute_query

Execute a SQL query against Trino with full SQL support for complex analytical queries; returns columns and row data.

list_catalogs

List all catalogs available in the Trino server, providing a comprehensive view of the data ecosystem.

list_schemas

List all schemas in a given catalog to help navigate the data hierarchy.

list_tables

List all tables in a given catalog and schema, exposing the available datasets.

get_table_schema

Get the schema of a table, including column names, data types, and nullability, for better query planning.

explain_query

Analyze a Trino query execution plan without running it, showing distributed execution stages and resource estimates.

What this server can do

Trino MCP Server provides tools for these capabilities — tap one to see every MCP server that does the same:

When to use it

  • Letting an AI assistant answer business questions by querying data across Trino-connected sources (PostgreSQL, MySQL, S3/Hive, BigQuery, MongoDB)
  • Conversationally exploring an unfamiliar data warehouse — discovering catalogs, schemas, tables, and column types
  • Reviewing query execution plans and resource estimates before running expensive analytical queries
  • Using the built-in interactive CLI as a psql-like shell for direct Trino access
  • Deploying a secured, OAuth-authenticated remote MCP endpoint with per-user query attribution and impersonation

Security notes

Secrets (e.g. TRINO_PASSWORD) are read purely from environment variables; the docs recommend injecting them via a secrets CLI (1Password `op run`, Vault, or Kubernetes Secrets) rather than committing them — see docs/secrets.md for shell-history, process-list, and env-var leakage nuances. For production HTTP deployments the server supports OAuth 2.1 (native or proxy mode) with JWT validation, PKCE, and token caching; JWT_SECRET is required for multi-pod deployments. User impersonation (TRINO_ENABLE_IMPERSONATION) is opt-in and relies on Trino to enforce per-user permissions.

Trino MCP Server FAQ

What transports does the server support?

Both STDIO (default, used by Claude Desktop/Windsurf) and StreamableHTTP at the /mcp endpoint (recommended for web clients and remote deployments), with backward-compatible SSE at /sse. Set MCP_TRANSPORT=http to enable HTTP mode.

How is authentication handled?

Authentication is optional. For remote/HTTP deployments the server supports OAuth 2.1 via the oauth-mcp-proxy library with HMAC, Okta, Google, and Azure AD providers, in either native mode (client handles OAuth, zero server-side secrets) or proxy mode. Remote clients pass a JWT via an Authorization: Bearer header.

Can I limit which schemas the AI can see?

Yes. Set TRINO_ALLOWED_SCHEMAS (e.g. hive.analytics,hive.marts) to focus the assistant on specific schemas, which the docs note can yield a 10-20x performance improvement.

Is there a way to run it without installing a binary?

Yes, the docs provide a Docker configuration using the ghcr.io/tuannvm/mcp-trino:latest image with TRINO_* values passed as -e environment variables.

Alternatives to Trino MCP Server

Compare all alternatives →

Google's official MCP server with prebuilt BigQuery tools, querying datasets via Application Default Credentials.

Verified
stdio (local)
OAuth
Go
10 tools
Updated 15 days agoRepo

Read/write Postgres access plus index tuning, EXPLAIN plans, and database health analysis for AI agents.

Verified
stdio (local)
API key
Python
9 tools
Updated 3 months agoRepo

Official Supabase server: manage tables, run SQL, branches, configs and edge functions from your AI client.

Verified
HTTP (remote)
OAuth
TypeScript
12 tools
Updated 1 month agoRepo