iceberg-mcp-server-trino
Model 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.
README
Iceberg MCP Server (via Trino)
This is an Iceberg MCP Server using Trino as the compute engine, adapted from the Impala fork with Iceberg table health tooling and Trino SQL dialect support.
Model Context Protocol server for read-only access to Iceberg tables through Cloudera Trino (CDW Trino Virtual Warehouse): schema discovery, SQL queries, metadata-based health checks, time travel, and performance analysis.
Repository: https://github.com/dipankarmazumdar/iceberg-mcp-server-trino
Requirements
- Python 3.13+
- A Trino endpoint with Iceberg tables (tested with Cloudera Data Warehouse Trino Virtual Warehouse)
- LDAP or basic auth credentials for Trino
Quick start
git clone https://github.com/dipankarmazumdar/iceberg-mcp-server-trino.git
cd iceberg-mcp-server-trino
python3.13 -m venv .venv
source .venv/bin/activate
pip install -e .
cp .env.example .env # edit with your Trino coordinator + credentials
Connectivity test:
python -c "from iceberg_mcp_server_trino.tools import trino_tools; print(trino_tools.get_schema())"
Table health check:
python -c "from iceberg_mcp_server_trino.tools import trino_tools; print(trino_tools.get_table_health('your_iceberg_table'))"
Tools
execute_query(query: str): Run a read-only SQL query on Trino and return results as JSON.get_schema(): List tables in the configured catalog and schema.get_table_health(table: str): Summarize Iceberg table health from metadata tables (snapshots,history,files,partitions,manifests,metadata_log_entries). Passtableorcatalog.schema.table.
Iceberg semantics
list_metadata_tables(table): List available Iceberg metadata tables.describe_metadata_table(table, metadata_name): Schema of a metadata table.query_metadata_table(table, metadata_name, limit?, columns?): Bounded metadata query.list_snapshots(table, limit?): Snapshot timeline from metadata.describe_table_history(table): Snapshot history via$historymetadata table.get_snapshot_summary(table, snapshot_id): Detail for one snapshot.list_refs(table): Branches and tags.query_at_snapshot(table, snapshot_id, limit?, columns?): Time travel by snapshot ID (FOR VERSION AS OF).query_at_timestamp(table, timestamp, limit?, columns?): Time travel by timestamp (FOR TIMESTAMP AS OF).diff_snapshots(table, snapshot_id_a, snapshot_id_b): Compare two snapshots.
Performance & cost awareness
explain_query(query): Trino EXPLAIN plan for a read-only query.partition_pruning_check(query): Heuristic partition pruning assessment from EXPLAIN.table_scan_cost_hints(table): Scan cost signals from files/partitions metadata.hot_partitions(table, limit?): Top partitions by file/record count (skew detection).
Local development
python3.13 -m venv .venv
source .venv/bin/activate
pip install -e .
cp .env.example .env # then edit with your Trino settings
Cloudera CDW example .env
TRINO_HOST=coordinator-default-trino.example.cloudera.site
TRINO_PORT=443
TRINO_USER=your-username
TRINO_PASSWORD=your-password
TRINO_CATALOG=iceberg
TRINO_SCHEMA=airlines
TRINO_USE_SSL=true
TRINO_SSL_VERIFY=true
MCP_TRANSPORT=stdio
Quick connectivity test:
python -c "from iceberg_mcp_server_trino.tools import trino_tools; print(trino_tools.get_schema())"
Run with the MCP Inspector:
fastmcp dev inspector src/iceberg_mcp_server_trino/server.py:mcp --with-editable .
Configuration
Set these environment variables (via .env or MCP config env block):
| Variable | Description | Default |
|---|---|---|
TRINO_HOST |
Trino coordinator hostname | required |
TRINO_PORT |
Trino port | 443 |
TRINO_USER |
Username | required |
TRINO_PASSWORD |
Password (LDAP/basic auth) | required |
TRINO_CATALOG |
Iceberg catalog name | iceberg |
TRINO_SCHEMA |
Default schema | default |
TRINO_USE_SSL |
Use HTTPS | true |
TRINO_SSL_VERIFY |
SSL verification (true, false, or path to CA cert) |
true |
MCP_TRANSPORT |
stdio (default), http, or sse |
stdio |
Trino vs Impala SQL differences (handled internally)
| Feature | Impala | Trino (this server) |
|---|---|---|
| Metadata tables | db.table.snapshots |
"catalog"."schema"."table$snapshots" |
| Time travel (version) | FOR SYSTEM_VERSION AS OF |
FOR VERSION AS OF |
| Time travel (time) | FOR SYSTEM_TIME AS OF '...' |
FOR TIMESTAMP AS OF TIMESTAMP '...' |
| History | DESCRIBE HISTORY |
$history metadata table |
Usage with Cursor
Copy mcp.json.example to .cursor/mcp.json and update paths and credentials.
{
"mcpServers": {
"iceberg-mcp-server-trino": {
"command": "/path/to/iceberg-mcp-server-trino/.venv/bin/python",
"args": [
"/path/to/iceberg-mcp-server-trino/src/iceberg_mcp_server_trino/server.py"
]
}
}
}
Credentials can live in .env (loaded by the server) or in the env block. Enable the server under Cursor Settings → MCP, then restart the server after code changes.
Usage with Claude Desktop
Option 1: Install from GitHub (recommended)
{
"mcpServers": {
"iceberg-mcp-server-trino": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/dipankarmazumdar/iceberg-mcp-server-trino@main",
"run-server"
],
"env": {
"TRINO_HOST": "coordinator-default-trino.example.com",
"TRINO_PORT": "443",
"TRINO_USER": "username",
"TRINO_PASSWORD": "password",
"TRINO_CATALOG": "iceberg",
"TRINO_SCHEMA": "default"
}
}
}
}
Option 2: Local installation
{
"mcpServers": {
"iceberg-mcp-server-trino": {
"command": "uv",
"args": [
"--directory",
"/path/to/iceberg-mcp-server-trino",
"run",
"src/iceberg_mcp_server_trino/server.py"
],
"env": {
"TRINO_HOST": "coordinator-default-trino.example.com",
"TRINO_PORT": "443",
"TRINO_USER": "username",
"TRINO_PASSWORD": "password",
"TRINO_CATALOG": "iceberg",
"TRINO_SCHEMA": "default"
}
}
}
}
Security
All MCP tools are read-only. execute_query rejects non-read-only SQL prefixes. Use a Trino user with least-privilege access in production.
Based on cloudera/iceberg-mcp-server. See LICENSE and NOTICE.txt for attribution.
Copyright (c) 2025 Cloudera, Inc. All rights reserved.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。