Trino MCP 服务器
该存储库提供了一个 MCP(模型控制协议)服务器,允许您使用 Python 通过 Trino 列出和查询表。
概述
MCP:MCP 是一种用于连接 AI 模型、数据和工具的协议。本示例 MCP 服务器提供以下功能:
作为 MCP 资源的 Trino 表列表
能够通过 MCP 读取表格内容
针对 Trino 执行任意 SQL 查询的工具
Trino:一个用于大数据分析的快速分布式 SQL 查询引擎。该服务器利用 Trino 的 Python 客户端 (trino.dbapi) 连接到 Trino 主机、目录和架构。
要求
Python 3.9+(或与 mcp、trino 和 asyncio 兼容的版本)
trino(Trino 的 Python 驱动程序)
mcp(模型控制协议 Python 库)
配置
服务器从环境变量中读取 Trino 连接详细信息:
多变的 | 描述 | 默认 |
| Trino 服务器主机名或 IP |
|
| Trino 服务器端口 |
|
| Trino 用户名 | 必需的 |
| Trino 密码(可选,取决于您的身份验证设置) | (空的) |
| 使用的默认目录(例如,
、
、
等) | 必需的 |
| 要使用的默认架构(例如
、
等) | 必需的 |
用法
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
MCP 服务器可以使用 Python 列出和查询 Trino 表,并通过模型控制协议提供对数据资源的访问。
Related Resources
Related MCP Servers
- -securityAlicense-qualityA Python-based MCP server that integrates the TapTools API, enabling AI models to fetch Cardano blockchain data, including tokens, NFTs, market stats, and wallet info, through standardized tools.Last updated -MIT License
- -securityAlicense-qualityA Model Context Protocol server that provides seamless integration with Trino and Iceberg, enabling data exploration, querying, and table maintenance through a standard interface.Last updated -19Apache 2.0
- -securityFlicense-qualityAn MCP server that allows working with MySQL databases by providing tools for executing read-only SQL queries, getting table schemas, and listing database tables.Last updated -3144
- -securityAlicense-qualityA high-performance Model Context Protocol (MCP) server for Trino implemented in Go.Last updated -64MIT License