MCP Trino
概要
作者による説明(英語の原文)
MCP server for Trino distributed SQL query engine access
PopNx MCPの3つの柱
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
- 利用者の声iレビューはまだありませんレビューは今後のステップで、アカウント機能と一緒に始まります
- 私たちの基本チェックi1項目中1項目に合格公開情報からチェック。コードはまだスキャンしていません
- 利用状況iとても新しい★ –
できること
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
- 接続方法: パソコンで動く
- トランスポート: stdio
- カテゴリ: データベース・データセット
- 入力が必要なもの:TRINO_HOST, TRINO_USER, TRINO_PASSWORD
インストール
使っているAIアプリを選んで、設定をコピーしてください。
インストールの前に
- 基本チェック:1項目中1項目に合格
- あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
- 自分で入力するもの:
TRINO_HOST,TRINO_PORT,TRINO_USER,TRINO_PASSWORD
「秘密」と表示された値は、あなたのアカウントの鍵です。絶対に人に教えたり、チャットに貼り付けたりしないでください。
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
リンク先は作者自身のファイルです。私たちが置いたり再パッケージしたりしたものではありません。ファイルを開くと、Claude Desktopがインストールします。
ターミナルでこれを実行します
動かす前に、空欄の値を入力してください。
ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
自分で入力する値
- Trino server hostname
TRINO_PORTenvTrino server port- Trino username
- Trino password
この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
できること
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
基本チェックi
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月8日にチェック
- ✓ 合格
作者とリポジトリが一致
レジストリ名は、リポジトリを所有するGitHubアカウント tuannvm で確認済みです
- … 未チェック
今もメンテナンスされている
このリポジトリはまだGitHubから読み取っていません
- … 未チェック
ライセンスがある
このリポジトリはまだGitHubから読み取っていません
- – 対象外
エンドポイントが応答する
これはパソコンで動くため、インターネット上のエンドポイントはありません
- – 対象外
OAuthでサインイン
パソコンで動き、代わりにローカルの設定を使います
- … 未チェック
ツールの説明に隠れた指示がない
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
データベース・データセットのほかのサーバーとの比較i
- このカテゴリのほかの1144件のうち0%よりスターが多い
- このカテゴリのほかの1144件のうち0%より最近レジストリに公開
- 基本チェックの結果が、このカテゴリのほかの1144件のうち100%と同じかそれ以上
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
よくある質問
MCP Trinoは安全ですか?
当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
どんなキーやコードが必要ですか?
入力が必要なもの:TRINO_HOST, TRINO_USER, TRINO_PASSWORD
パソコンで動きますか、それともクラウドですか?
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
今もメンテナンスされていますか?
GitHubリポジトリの最終更新は–、最新バージョン(2.2.1)がレジストリに届いたのは14 か月前です。
どのアプリで使えますか?
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにMCPBも必要です。
代わりに使えるものは?
同じカテゴリには:Supabase, MongoDB MCP Server, Elasticsearch MCP Server
代わりの候補
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
作者のREADME
READMEを開く
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
Trino MCP Server in Go
A high-performance Model Context Protocol (MCP) server for Trino implemented in Go. This project enables AI assistants to seamlessly interact with Trino's distributed SQL query engine through standardized MCP tools.
Overview
This project implements a Model Context Protocol (MCP) server for Trino in Go. It enables AI assistants to access Trino's distributed SQL query engine through standardized MCP tools.
Trino (formerly PrestoSQL) is a powerful distributed SQL query engine designed for fast analytics on large datasets.
Architecture
graph TB
subgraph "AI Clients" CC[Claude Code] CD[Claude Desktop] CR[Cursor] WS[Windsurf] CW[ChatWise] end
subgraph "Authentication (Optional)" OP[OAuth Provider Okta/Google/Azure AD] JWT[JWT Tokens] end
subgraph "MCP Server (mcp-trino)" HTTP[HTTP Transport /mcp endpoint] STDIO[STDIO Transport] AUTH[OAuth Middleware] TOOLS[MCP Tools • execute_query • list_catalogs • list_schemas • list_tables • get_table_schema • explain_query] end
subgraph "Data Layer" TRINO[Trino Cluster Distributed SQL Engine] CATALOGS[Data Sources • PostgreSQL • MySQL • S3/Hive • BigQuery • MongoDB] end
%% Connections CC -.->|OAuth Flow| OP OP -.->|JWT Token| JWT
CC -->|HTTP + JWT| HTTP CD -->|STDIO| STDIO CR -->|HTTP + JWT| HTTP WS -->|STDIO| STDIO CW -->|HTTP + JWT| HTTP
HTTP --> AUTH AUTH -->|Validated| TOOLS STDIO --> TOOLS
TOOLS -->|SQL Queries| TRINO TRINO --> CATALOGS
%% Styling classDef client fill:#e1f5fe classDef auth fill:#f3e5f5 classDef server fill:#e8f5e8 classDef data fill:#fff3e0
class CC,CD,CR,WS,CW client class OP,JWT auth class HTTP,STDIO,AUTH,TOOLS server class TRINO,CATALOGS data
Key Components:
- AI Clients: Various MCP-compatible applications
- Authentication: Optional OAuth 2.0 with OIDC providers
- MCP Server: Go-based server with dual transport support
- CLI Mode: Interactive SQL shell for direct Trino access (psql-like)
- Data Layer: Trino cluster connecting to multiple data sources
Features
- ✅ Dual Mode: Works as both MCP server AND interactive CLI
- CLI Mode: psql-like interactive SQL shell for direct Trino access
- MCP Mode: Full MCP server for AI assistant integration
- ✅ MCP server implementation in Go
- ✅ Trino SQL query execution through MCP tools
- ✅ Catalog, schema, and table discovery
- ✅ Docker container support
- ✅ Supports both STDIO and HTTP transports
- ✅ OAuth 2.1 authentication via oauth-mcp-proxy library
- 4 Providers: HMAC, Okta, Google, Azure AD
- Native mode: Client handles OAuth directly (zero server-side secrets)
- Proxy mode: Server proxies OAuth flow for simple clients
- Production-ready: Token caching, PKCE, defense-in-depth security
- Reusable: OAuth library available for any Go MCP server
- ✅ StreamableHTTP support with JWT authentication (upgraded from SSE)
- ✅ Backward compatibility with SSE endpoints
- ✅ Compatible with Cursor, Claude Desktop, Windsurf, ChatWise, and any MCP-compatible clients.
- ✅ User Identity Tracking:
- Query Attribution (automatic): Tags queries with OAuth user via
X-Trino-Client-Tags/Infoheaders - User Impersonation (opt-in): Execute queries as OAuth user via
X-Trino-Userheader
Installation & Quick Start
Install:
# Homebrew
brew install tuannvm/mcp/mcp-trino
Or one-liner (macOS/Linux)
curl -fsSL https://raw.githubusercontent.com/tuannvm/mcp-trino/main/install.sh | bash
Run (Local Development):
export TRINO_HOST=localhost TRINO_USER=trino
mcp-trino
For production deployment with OAuth, see Deployment Guide and OAuth Architecture.
CLI Mode
mcp-trino can be used as an interactive CLI similar to psql or the Trino CLI:
# Interactive REPL mode
mcp-trino --interactive
Execute a query directly
mcp-trino query "SELECT * FROM my_table LIMIT 10"
List catalogs, schemas, tables
mcp-trino catalogs mcp-trino schemas my_catalog mcp-trino tables my_catalog my_schema
Describe a table
mcp-trino describe my_catalog.my_schema.my_table
Explain a query
mcp-trino explain "SELECT COUNT(*) FROM my_table"
Output formats
mcp-trino --format json query "SELECT 1" mcp-trino --format csv query "SELECT 1" mcp-trino --format table query "SELECT 1" # default
Built-in Help
Every command has structured, LLM-friendly help output:
# Main help with all commands, flags, examples, and environment variables
mcp-trino --help
Per-subcommand help
mcp-trino query --help mcp-trino describe --help
Help output follows Unix man-page conventions with sections: NAME, SYNOPSIS, DESCRIPTION, COMMANDS, FLAGS, EXAMPLES, ENVIRONMENT, and CONFIGURATION.
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Runtime error (connection failed, query error, etc.) |
| 2 | Usage error (unknown command, invalid flags, missing arguments) |
Named Profiles
mcp-trino supports named connection profiles for easy switching between Trino environments.
Configuration File — supports both YAML (~/.config/trino/config.yaml) and JSON (~/.config/trino/config.json):
# ~/.config/trino/config.yaml
current: prod
profiles: prod: host: trino.example.com port: 443 user: prod_user password: prod_password catalog: hive schema: analytics ssl: enabled: true insecure: false
dev: host: localhost port: 8080 user: trino catalog: memory schema: default
staging: host: staging-trino.example.com port: 443 user: staging_user
output: format: table
Or equivalently in JSON:
{
"current": "prod", "profiles": { "prod": { "host": "trino.example.com", "port": 443, "user": "prod_user", "catalog": "hive", "ssl": { "enabled": true } }, "dev": { "host": "localhost", "port": 8080, "user": "trino" } }, "output": { "format": "table" } }
When both files exist, config.json takes precedence. New configs default to JSON.
Profile Management Commands:
# List all profiles
mcp-trino config profile list
Set default profile
mcp-trino config profile use prod
Show profile details
mcp-trino config profile show staging
Use a specific profile (overrides config file)
mcp-trino --profile dev catalogs
Configuration Precedence (highest to lowest):
- CLI flags (
--host,--port, etc.) --profileflagTRINO_PROFILEenvironment variablecurrentfield in config filedefaultprofile fallback- Environment variables (
TRINO_HOST, etc.)
Environment Variables (lowest priority - overridden by profiles and flags):
export TRINO_HOST=trino.example.com
export TRINO_PORT=443 export TRINO_USER=myuser export TRINO_PASSWORD=mypass export TRINO_CATALOG=hive export TRINO_SCHEMA=analytics export TRINO_SSL=true
Secret Management (recommended):
Secrets are loaded purely from environment variables. Use a secrets CLI to inject them via Unix piping at launch time — the app never touches your vault:
# 1Password CLI — resolves op:// references in an env file
op run --env-file=.env -- mcp-trino
Or inline per-variable
TRINO_PASSWORD=$(op read 'op://Engineering/Trino/password') mcp-trino
See docs/secrets.md for 1Password, Vault, and Kubernetes patterns, and for security nuances (shell-history, process-list, and env-var leakage).
REPL Meta-Commands (in interactive mode):
\help- Show help\quit,\exit,\q- Exit REPL\history- Show command history\catalogs- List all catalogs\schemas [catalog]- List schemas\tables [catalog schema]- List tables\describe- Describe table\format- Change output format
Usage
Supported Clients: Claude Desktop, Claude Code, Cursor, Windsurf, ChatWise
Available Tools: execute_query, list_catalogs, list_schemas, list_tables, get_table_schema, explain_query
For client integration and tool documentation, see Integration Guide and Tools Reference.
Configuration
Key Variables: TRINO_HOST, TRINO_USER, TRINO_SCHEME, MCP_TRANSPORT, OAUTH_PROVIDER
Secret Management: Inject secrets through the process environment — mcp-trino reads them directly. See docs/secrets.md for 1Password, Vault, and Kubernetes recipes.
# 1Password (biometric-gated, zero disk writes)
op run --env-file=.env -- mcp-trino
Vault (via vault-agent or CLI)
TRINO_PASSWORD=$(vault kv get -field=password secret/mcp-trino) mcp-trino
Kubernetes: use standard Secret → envFrom in the Helm chart values
OAuth Configuration:
# Native mode (most secure - zero server-side secrets)
export OAUTH_ENABLED=true OAUTH_MODE=native OAUTH_PROVIDER=okta export OIDC_ISSUER=https://company.okta.com OIDC_AUDIENCE=https://mcp-server.com
Proxy mode (centralized credential management)
export OAUTH_MODE=proxy OIDC_CLIENT_ID=app-id OIDC_CLIENT_SECRET=secret export OAUTH_REDIRECT_URI=https://mcp-server.com/oauth/callback # Fixed mode (localhost-only) export OAUTH_REDIRECT_URI=https://app1.com/cb,https://app2.com/cb # Allowlist mode export JWT_SECRET=$(openssl rand -hex 32) # Required for multi-pod deployments
Performance Optimization:
# Focus AI on specific schemas only (10-20x performance improvement)
export TRINO_ALLOWED_SCHEMAS="hive.analytics,hive.marts,hive.reporting"
User Identity Tracking:
# Query Attribution is AUTOMATIC when OAuth is enabled
Queries are tagged with X-Trino-Client-Tags and X-Trino-Client-Info headers
For full impersonation (Trino enforces user permissions):
export TRINO_ENABLE_IMPERSONATION=true export TRINO_IMPERSONATION_FIELD=email # Options: username, email, subject
For complete configuration, see Deployment Guide, OAuth Guide, Allowlists Guide, and User Identity Guide.
O
冒頭だけを表示しています。続きはリポジトリで読めます