原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

MCP Trino

作者:tuannvm版本 2.2.1i★ –i在你的电脑上运行
注册名称io.github.tuannvm/mcp-trino

安装

概览

作者提供的说明(英文原文)

MCP server for Trino distributed SQL query engine access

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 数据库与数据集
  • 你需要填写:TRINO_HOST, TRINO_USER, TRINO_PASSWORD

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: TRINO_HOST, TRINO_PORT, TRINO_USER, TRINO_PASSWORD

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

下载作者的 .mcpb 文件

链接指向作者自己的文件;我们不托管也不重新打包它。打开文件后,Claude Desktop 会进行安装。

在终端中运行这条命令

运行前请先填写空着的值。

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • TRINO_HOST 必填 env
    Trino server hostname
  • TRINO_PORT env
    Trino server port
  • TRINO_USER 必填 env
    Trino username
  • TRINO_PASSWORD 机密 env
    Trino password

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月9日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 tuannvm 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“数据库与数据集”中的其他服务器比较i

  • 星标数多于此分类中其他 1153 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 1153 个服务器的 0% 更新
  • 基础检查结果等于或优于此分类中其他 1153 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

MCP Trino 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:TRINO_HOST, TRINO_USER, TRINO_PASSWORD

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(2.2.1)于14个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 MCPB。

有什么可以替代它?

同一分类中有:Supabase, MongoDB MCP Server, Elasticsearch MCP Server

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Supabase

MCP server for interacting with the Supabase platform

作者:supabase广泛使用↓ 23.5万/周★ 29933天前更新

电脑或云端✓ supabase.com

MongoDB MCP Server

MongoDB Model Context Protocol Server

作者:mongodb-js广泛使用↓ 15.7万/周★ 11575天前更新

在你的电脑上运行

Elasticsearch MCP Server

MCP server for interacting with Elasticsearch

作者:cr7258正在增长↓ 2711/周★ 31514个月前更新

在你的电脑上运行

作者的 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/Info headers
  • User Impersonation (opt-in): Execute queries as OAuth user via X-Trino-User header

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
CodeMeaning
0Success
1Runtime error (connection failed, query error, etc.)
2Usage 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):

  1. CLI flags (--host, --port, etc.)
  2. --profile flag
  3. TRINO_PROFILE environment variable
  4. current field in config file
  5. default profile fallback
  6. 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

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx