MCP Trino Server
MCP Trino サーバー
MCP Trino サーバーは、Trino および Iceberg とのシームレスな統合を提供し、標準インターフェースを通じて高度なデータ探索、クエリ、およびテーブル メンテナンス機能を可能にするモデル コンテキスト プロトコル (MCP)サーバーです。
ユースケース
Trinoでのインタラクティブなデータ探索と分析
自動アイスバーグテーブルのメンテナンスと最適化
Trinoデータベースと連携するAI搭載ツールの構築
適切な結果フォーマットでSQLクエリを実行および管理する
Related MCP server: Alibaba Cloud DMS MCP Server
前提条件
実行中の Trino サーバー (またはローカル開発用の Docker Compose)
Python 3.11以上
Docker(オプション、コンテナ化されたデプロイメント用)
インストール
Smithery経由でインストール
Smithery経由で Claude Desktop 用の MCP Trino Server を自動的にインストールするには:
npx -y @smithery/cli install @alaturqua/mcp-trino-python --client claudeTrinoをローカルで実行する
最も簡単な方法は、付属の Docker Compose 構成を使用して Trino をローカルで実行することです。
docker-compose up -dこれによりlocalhost:8080上でTrinoサーバーが起動します。これでMCPサーバーの設定に進むことができます。
VS Codeでの使用
簡単にインストールするには、VS Codeの設定に以下の設定を追加してください。Ctrl Ctrl + Shift + Pを押してPreferences: Open User Settings (JSON)と入力してください。
オプションとして、ワークスペース内の.vscode/mcp.jsonというファイルに追加することもできます。これにより、他のユーザーと設定を共有できるようになります。
.vscode/mcp.jsonファイルではmcpキーは必要ないことに注意してください。
{
"mcp": {
"servers": {
"trino": {
"command": "docker",
"args": ["run", "--rm", "ghcr.io/alaturqua/mcp-trino-python:latest"],
"env": {
"TRINO_HOST": "${input:trino_host}",
"TRINO_PORT": "${input:trino_port}",
"TRINO_USER": "${input:trino_user}",
"TRINO_PASSWORD": "${input:trino_password}",
"TRINO_HTTP_SCHEME": "${input:trino_http_scheme}",
"TRINO_CATALOG": "${input:trino_catalog}",
"TRINO_SCHEMA": "${input:trino_schema}"
}
}
}
}
}Claude Desktopでの使用
Claude デスクトップ設定に次の構成を追加します。
{
"mcpServers": {
"trino": {
"command": "python",
"args": ["./src/server.py"],
"env": {
"TRINO_HOST": "your-trino-host",
"TRINO_PORT": "8080",
"TRINO_USER": "trino"
}
}
}
}構成
環境変数
変数 | 説明 | デフォルト |
トリノホスト | Trinoサーバーのホスト名 | ローカルホスト |
トリノポート | Trino サーバーポート | 8080 |
TRINO_USER | Trinoのユーザー名 | トリノ |
トリノカタログ | デフォルトカタログ | なし |
トリノスキーマ | デフォルトのスキーマ | なし |
TRINO_HTTP_SCHEME | HTTPスキーム(http/https) | http |
TRINO_パスワード | トリノパスワード | なし |
ツール
クエリと探索ツール
カタログを表示
利用可能なすべてのカタログを一覧表示する
パラメータは必要ありません
スキーマを表示
カタログ内のすべてのスキーマを一覧表示する
パラメータ:
catalog: カタログ名(文字列、必須)
表示テーブル
スキーマ内のすべてのテーブルを一覧表示する
パラメータ:
catalog: カタログ名(文字列、必須)schema: スキーマ名(文字列、必須)
テーブルの説明
詳細なテーブル構造と列情報を表示する
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
クエリ実行
SQLクエリを実行し、フォーマットされた結果を返す
パラメータ:
query: 実行するSQLクエリ(文字列、必須)
カタログツリーを表示
カタログ、スキーマ、テーブルの階層ツリービューを表示します
視覚的なインジケータ付きのフォーマットされたツリー構造を返します
パラメータは必要ありません
表示_作成_テーブル
テーブルのCREATE TABLE文を表示する
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
表示_作成_ビュー
ビューの CREATE VIEW ステートメントを表示します
パラメータ:
view: ビュー名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
統計を表示
テーブルの統計情報を表示する
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
アイスバーグテーブルのメンテナンス
最適化する
小さなファイルを圧縮してアイスバーグテーブルを最適化する
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
最適化マニフェスト
アイスバーグテーブルのマニフェストファイルを最適化する
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
有効期限切れスナップショット
Iceberg テーブルから古いスナップショットを削除する
パラメータ:
table: テーブル名(文字列、必須)retention_threshold: 経過日数のしきい値 (例: "7d") (文字列、オプション)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
アイスバーグメタデータ検査
テーブルプロパティを表示する
アイスバーグテーブルのプロパティを表示
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
テーブルの履歴を表示
アイスバーグテーブルの履歴/変更ログを表示
スナップショットのタイミング、系統、祖先の情報が含まれています
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
メタデータログエントリの表示
Icebergテーブルのメタデータログエントリを表示する
メタデータファイルの場所とシーケンス情報が含まれています
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
スナップショットを表示
アイスバーグテーブルのスナップショットを表示
操作やマニフェストファイルなどのスナップショットの詳細が含まれます
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
マニフェストを表示する
現在のスナップショットまたはすべてのスナップショットの Iceberg テーブル マニフェストを表示します
マニフェストファイルの詳細とデータファイルの統計が含まれています
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)all_snapshots: すべてのスナップショットを含める(ブール値、オプション)
パーティションの表示
アイスバーグテーブルのパーティションを表示
パーティション統計とファイル数が含まれます
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
ファイルを表示
現在のスナップショットの Iceberg テーブル データ ファイルを表示します
詳細なファイルメタデータと列統計が含まれています
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
エントリを表示
現在のスナップショットまたはすべてのスナップショットの Iceberg テーブル マニフェスト エントリを表示します。
エントリステータスと詳細なファイルメトリックが含まれています
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)all_snapshots: すべてのスナップショットを含める(ブール値、オプション)
表示参照
Iceberg テーブル参照 (ブランチとタグ) を表示する
参照構成とスナップショットマッピングが含まれています
パラメータ:
table: テーブル名(文字列、必須)catalog: カタログ名(文字列、オプション)schema: スキーマ名(文字列、オプション)
クエリ履歴
クエリ履歴を表示
実行されたクエリの履歴を取得する
パラメータ:
limit: 返されるクエリの最大数(数値、オプション)
ライセンス
このプロジェクトはApache 2.0ライセンスに基づいてライセンスされています。全文についてはLICENSEファイルをご覧ください。
Available Tools
22 toolsdescribe_tableC
Describe a table
Inputs: catalog (required), schema_name (required), table (required). Returns: result
execute_queryC
Execute a SQL query and return results in a readable format
Inputs: query (required). Returns: result
expire_snapshotsB
Remove old snapshots from an Iceberg table
Inputs: catalog (required), schema_name (required), table (required), retention_threshold. Returns: result
optimizeB
Optimize an Iceberg table's data files
Inputs: catalog (required), schema_name (required), table (required). Returns: result
optimize_manifestsC
Optimize manifest files for an Iceberg table
Inputs: catalog (required), schema_name (required), table (required). Returns: result
show_catalogsB
List all available catalogs
Inputs: no named parameters. Returns: result
show_catalog_treeA
Show a hierarchical tree view of catalogs, schemas, and tables
Inputs: no named parameters. Returns: result
show_create_tableA
Show the CREATE TABLE statement for a specific table
Inputs: catalog (required), schema_name (required), table (required). Returns: result
show_create_viewB
Show the CREATE VIEW statement for a specific view
Inputs: catalog (required), schema_name (required), view (required). Returns: result
show_entriesC
Show Iceberg table manifest entries
Inputs: catalog (required), schema_name (required), table (required), all_snapshots. Returns: result
show_filesC
Show Iceberg table data files
Inputs: catalog (required), schema_name (required), table (required). Returns: result
show_manifestsC
Show Iceberg table manifests
Inputs: catalog (required), schema_name (required), table (required), all_snapshots. Returns: result
show_metadata_log_entriesC
Show metadata for the table
Inputs: catalog (required), schema_name (required), table (required). Returns: result
show_partitionsB
Show Iceberg table partitions
Inputs: catalog (required), schema_name (required), table (required). Returns: result
show_query_historyB
Get the history of executed queries
Inputs: limit. Returns: result
show_refsA
Show Iceberg table references (branches and tags)
Inputs: catalog (required), schema_name (required), table (required). Returns: result
show_schemasB
List all schemas in a catalog
Inputs: catalog (required). Returns: result
show_snapshotsC
Show Iceberg table snapshots
Inputs: catalog (required), schema_name (required), table (required). Returns: result
show_statsC
Show statistics for a table
Inputs: catalog (required), schema_name (required), table (required). Returns: result
show_table_historyC
Show Iceberg table history/changelog
Inputs: catalog (required), schema_name (required), table (required). Returns: result
show_table_propertiesC
Show Iceberg table properties
Inputs: catalog (required), schema_name (required), table (required). Returns: result
show_tablesB
List all tables in a schema
Inputs: catalog (required), schema_name (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools have distinct purposes, especially the 'show_' variants which target different Iceberg metadata. However, some concepts like show_table_history, show_metadata_log_entries, and show_snapshots overlap conceptually, causing minor potential confusion.
All tools follow a verb_noun pattern with underscores, which is consistent. The verbs vary (show, describe, execute, expire, optimize) but are clear and appropriate, though a fully uniform verb set would improve consistency.
22 tools is on the higher side but remains reasonable given the dual focus on general Trino queries and detailed Iceberg management. The scope justifies the count, though it could be split into two servers for clarity.
The tool set covers core query operations and comprehensive Iceberg maintenance (snapshots, files, optimization, history). Missing DDL commands like create/drop table or schema are notable gaps but align with the server's apparent administrative/analytical focus.
Maintenance
Related MCP Connectors
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- FlicenseBqualityDmaintenanceA Model Context Protocol server that provides a SQL interface for querying and managing Apache Iceberg tables through Claude desktop, allowing natural language interaction with Iceberg data lakes.18-
- AlicenseAqualityCmaintenanceA Model Context Protocol server that enables large language models to access database metadata and perform cross-engine data querying across diverse database ecosystems.1654Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server providing seamless integration with Trino and Iceberg for advanced data exploration, querying, and table maintenance.Apache 2.0
- AlicenseBqualityDmaintenanceModel Context Protocol server for read-only access to Iceberg tables through Cloudera Trino: schema discovery, SQL queries, metadata-based health checks, time travel, and performance analysis.173Apache 2.0