
Mcp Trino
io.github.txn2由 GitHub 帳號 txn2 發布v0.2.1更新於 Oct 24, 2026
MCP server for Trino data warehouses. Query, analyze plans, and explore schemas.
概覽
一個本機 MCP 伺服器,讓 AI 助理連線 Trino 資料倉儲,執行 SQL、檢視執行計畫並瀏覽結構描述。
- 可以做什麼
- 透過獨立的查詢與執行工具執行唯讀 SQL 查詢,或執行包含寫入在內的任意 SQL,並可設定列數與逾時上限。檢視邏輯、分散式、I/O 與驗證執行計畫。瀏覽 catalog、schema 與資料表,並檢視資料表欄位定義,可選擇附上樣本資料與語意脈絡。列出已設定的 Trino 伺服器連線,並在每次呼叫中指定目標連線。可選擇從 DataHub 或靜態檔案補充業務描述、負責人、資料品質與敏感欄位資訊。
- 適用情境
- 適合需要探索或查詢以 Trino 為基礎的資料倉儲、在正式、預備與開發叢集之間切換,或在撰寫 SQL 前了解資料表結構與業務意義的情境。
- 執行需求
- 以本機程序方式在使用者電腦上執行(可透過 Homebrew、發行版二進位檔、Docker、Go install 或 Claude Desktop 安裝包)。需要能連線 Trino 伺服器的網路,並透過 TRINO_USER 提供使用者名稱;主機、連接埠、catalog、schema、SSL 與逾時分別由 TRINO_HOST、TRINO_PORT、TRINO_CATALOG、TRINO_SCHEMA、TRINO_SSL 與 TRINO_TIMEOUT 設定。其他叢集透過 TRINO_ADDITIONAL_SERVERS 設定。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp Trino,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[GitHub license] [Go Reference] [Go Report Card] [codecov] [OpenSSF Scorecard] [SLSA 3]
mcp-trino.txn2.com | Installation | Library Docs
A Model Context Protocol (MCP) server for Trino, enabling AI assistants to query and explore data warehouses with optional semantic context from metadata catalogs.
AI assistants excel at querying data but lack organizational context: which tables are trustworthy, what metrics mean, and which columns contain sensitive data. mcp-trino bridges this gap by connecting Trino to AI assistants through the MCP protocol, with an optional semantic layer that surfaces business metadata alongside query results.
MCP Data Platform Ecosystem
mcp-trino is part of a broader suite of open-source MCP servers designed to work together as a composable data platform. Each component can run standalone or be combined to give AI assistants unified access to storage, query engines, and metadata catalogs.
Core Capabilities
Composable Architecture
- Import as a Go library to build custom MCP servers
- Add authentication, tenant isolation, audit logging without forking
- Middleware and interceptor patterns for enterprise requirements
Semantic Context
- Surface business descriptions, ownership, and data quality from metadata catalogs
- Mark sensitive columns for AI assistants
- Connect to DataHub, static files, or build custom metadata providers
Multi-Cluster Connectivity
- Query multiple Trino servers from a single MCP installation
- Unified interface across production, staging, and development environments
Secure Defaults
- Read-only mode prevents accidental data modification
- Query limits and timeouts prevent runaway operations
- SLSA Level 3 provenance for supply chain security
Features
- Execute SQL Queries: Run queries with configurable row limits and timeouts
- Analyze Execution Plans: Inspect logical, distributed, and I/O query plans
- Discover Schema: Browse catalogs, schemas, and tables across clusters
- Describe Tables: View column definitions with optional data samples
- Enrich with Context: Surface business metadata, ownership, and data quality
- Compose Custom Servers: Import as a Go library with middleware and interceptors
Installation
Homebrew (macOS)
Claude Desktop
Claude Desktop is the GUI application for chatting with Claude. Install the mcp-trino extension to enable Trino queries in your conversations.
Option 1: One-Click Install (Recommended)
Download the .mcpb bundle for your Mac from the releases page and double-click to install:
Tip: Not sure which chip you have? Click → "About This Mac". Look for "Chip" (Apple Silicon) or "Processor" (Intel).
Option 2: Manual Configuration
Add to your claude_desktop_config.json (find via Claude Desktop → Settings → Developer):
Claude Code CLI
Claude Code is the terminal-based coding assistant. Add mcp-trino as an MCP server:
Or download and install manually:
Docker
Go Install
Download Binary
Download pre-built binaries from the releases page. All releases are signed with Cosign and include SLSA provenance.
As a Library
Quick Start
Multiple Trino Servers
You can configure multiple Trino instances with different names:
Standalone Server
Tools
Semantic Layer
AI agents operate more reliably when they understand organizational context: not just table structures, but which datasets are production-ready, what business terms mean, and which columns require careful handling.
mcp-trino's semantic layer integrates with metadata catalogs to surface this context alongside query results:
Providers
See the Semantic Layer Documentation for configuration, caching, and custom provider development.
Configuration
Multi-Server Configuration
Connect to multiple Trino servers from a single installation. Configure your primary server with the standard environment variables, then add additional servers via JSON:
Additional servers inherit credentials and settings from the primary server unless overridden:
Use the connection parameter in any tool to target a specific server:
Use trino_list_connections to discover available connections.
File-Based Configuration
For production deployments using Kubernetes ConfigMaps, Vault, or other secret management systems, mcp-trino supports file-based configuration:
Load configuration in your custom server:
Using as a Library
mcp-trino is designed to be composable. You can import its tools into your own MCP server:
Extensions
The standalone server includes optional extensions that can be enabled via environment variables:
Using Extensions in Custom Servers
Custom Middleware and Interceptors
You can create custom middleware, interceptors, and transformers:
Security Considerations
- Credentials: Store passwords in environment variables or secret managers
- Query Limits: Default 1000 rows, max 10000 to prevent data exfiltration
- Timeouts: Default 120s timeout prevents runaway queries
- Read-Only: ReadOnly interceptor enabled by default blocks modification statements
- Access Control: Configure Trino roles and catalog access for defense in depth
Development
Contributing
We welcome contributions for bug fixes, tests, and documentation. See CONTRIBUTING.md for guidelines.
License
Open source by Craig Johnston, sponsored by Deasil Works, Inc.
來源:README.md,提交 e4d1680
工具
0版本歷史
1- v0.2.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分