
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 分