Trino

Trino

A high-performance Model Context Protocol (MCP) server for Trino implemented in Go.

83
Stars
32
Forks
20
Releases

Overview

This MCP server provides a Go-based MCP front-end for Trino, enabling AI assistants and other MCP clients to access Trino's distributed SQL engine through standardized MCP tools. It supports dual transports (HTTP at /mcp and STDIO) and includes OAuth 2.1 authentication via the oauth-mcp-proxy library, offering native mode (client handles OAuth directly) and proxy mode (server proxies OAuth flow). It integrates with four providers (HMAC, Okta, Google, Azure AD) and features token caching, PKCE, and defense-in-depth security. The server exposes MCP tools for common data operations, including execute_query, list_catalogs, list_schemas, list_tables, get_table_schema, and explain_query, enabling seamless query execution and metadata discovery against a Trino cluster. The Data Layer comprises a Trino cluster connected to multiple data sources (PostgreSQL, MySQL, S3/Hive, BigQuery, MongoDB). Docker container support is provided for easy deployment. The project emphasizes backward compatibility with SSE endpoints, performance optimization via schema whitelisting, and broad client compatibility with Cursor, Claude Desktop, Windsurf, ChatWise, and other MCP clients. Deployment guides cover native vs proxy OAuth modes, allowlists, and general configuration.

Details

Owner
tuannvm
Language
Go
License
MIT License
Updated
2025-12-07

Features

MCP server implementation in Go

Go-based MCP server delivering MCP endpoints and transports.

Trino SQL query execution through MCP tools

Executes SQL queries on Trino via MCP tools.

Catalog, schema, and table discovery

Discovery of catalogs, schemas, and tables via MCP tools.

Docker container support

Containerized deployment with Docker.

Dual transports: STDIO and HTTP

Supports both STDIO and HTTP transports for MCP clients.

OAuth 2.1 authentication via oauth-mcp-proxy

OAuth 2.1 authentication with oauth-mcp-proxy library, offering native and proxy modes and 4 providers (HMAC, Okta, Google, Azure AD). Includes token caching and PKCE.

StreamableHTTP with JWT and SSE backward compatibility

StreamableHTTP transport with JWT authentication; maintains backward compatibility with SSE endpoints.

MCP client compatibility

Compatible with Cursor, Claude Desktop, Windsurf, ChatWise, and other MCP clients.

Audience

AI assistantsAccess Trino via MCP tools for query execution and metadata discovery.
MCP clientsIntegrate with MCP-enabled apps (Claude, Cursor, Windsurf, ChatWise) to run SQL and explore catalogs.

Tags

TrinoMCPGoOAuthAuthenticationHTTPSTDIOQueryCatalogSchemaTableDockerProxiesSecurityMCP-tools