iceberg-mcp-server-trino
Enables management of Iceberg tables via Cloudera Data Warehouse Trino Virtual Warehouse, providing tools for schema discovery, metadata health checks, time travel, and performance analysis.
Allows executing read-only SQL queries and Iceberg table operations (schema discovery, health checks, time travel, performance analysis) through Trino, a distributed SQL query engine.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@iceberg-mcp-server-trino check the health of the flights table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: MCP Trino Server
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 + credentialsConnectivity 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 settingsCloudera 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=stdioQuick 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 coordinator hostname | required |
| Trino port |
|
| Username | required |
| Password (LDAP/basic auth) | required |
| Iceberg catalog name |
|
| Default schema |
|
| Use HTTPS |
|
| SSL verification ( |
|
|
|
|
Trino vs Impala SQL differences (handled internally)
Feature | Impala | Trino (this server) |
Metadata tables |
|
|
Time travel (version) |
|
|
Time travel (time) |
|
|
History |
|
|
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.
Available Tools
17 toolsdescribe_metadata_tableC
Describe the schema of an Iceberg metadata table (e.g. snapshots, files, refs).
Inputs: table (required), metadata_name (required). Returns: result
describe_table_historyC
List snapshot history from the Iceberg $history metadata table.
Inputs: table (required). Returns: result
diff_snapshotsC
Compare two Iceberg snapshots by ID and return metadata and summary diffs.
Inputs: table (required), snapshot_id_a (required), snapshot_id_b (required). Returns: result
execute_queryB
Execute a read-only SQL query on Trino and return results as JSON.
Inputs: query (required). Returns: result
explain_queryA
Return the Trino EXPLAIN plan for a read-only SELECT or WITH query.
Inputs: query (required). Returns: result
get_schemaA
Retrieve the list of table names in the configured Trino catalog and schema.
Inputs: no named parameters. Returns: result
get_snapshot_summaryC
Get metadata for a single Iceberg snapshot ID including parsed summary stats.
Inputs: table (required), snapshot_id (required). Returns: result
get_table_healthA
Assess Iceberg table health using metadata tables (snapshots, history, files, partitions, manifests, metadata_log_entries). Returns structured JSON summaries, recent activity, and health signals. Pass the table as name or catalog.schema.table (e.g. flights or iceberg.default.flights).
Inputs: table (required). Returns: result
hot_partitionsC
List the hottest Iceberg partitions by file count and record count to detect skew.
Inputs: table (required), limit. Returns: result
list_metadata_tablesA
List Iceberg metadata tables available for a table. Pass table or catalog.schema.table (e.g. flights or iceberg.default.flights).
Inputs: table (required). Returns: result
list_refsB
List Iceberg branches and tags from the refs metadata table.
Inputs: table (required). Returns: result
list_snapshotsC
List Iceberg snapshots for a table ordered by committed_at (most recent first).
Inputs: table (required), limit. Returns: result
partition_pruning_checkB
EXPLAIN a read-only query and heuristically assess whether partition pruning is likely.
Inputs: query (required). Returns: result
query_at_snapshotB
Time-travel read using FOR VERSION AS OF snapshot_id. Optional column list and limit.
Inputs: table (required), snapshot_id (required), limit, columns. Returns: result
query_at_timestampC
Time-travel read using FOR TIMESTAMP AS OF timestamp (e.g. '2024-07-18 10:12:20').
Inputs: table (required), timestamp (required), limit, columns. Returns: result
query_metadata_tableC
Query an Iceberg metadata table with a safe row limit. Optional comma-separated columns.
Inputs: table (required), metadata_name (required), limit, columns. Returns: result
table_scan_cost_hintsA
Estimate full-scan cost signals from Iceberg files/partitions metadata for a table.
Inputs: table (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 17 tools
Each tool has a clear, distinct purpose covering metadata tables, snapshots, time travel, queries, health, and partitions. No two tools appear to do the same thing.
Most tools follow a verb_noun pattern in snake_case, such as list_snapshots and get_table_health. Exceptions like hot_partitions and partition_pruning_check are minor deviations but still clear.
17 tools is well-scoped for a read-only Iceberg metadata server via Trino, covering exploration, analysis, and querying without being overwhelming.
The set covers most read-only operations (snapshots, metadata tables, health, time travel) but lacks a tool to retrieve the current table schema (columns and types), which is a notable gap.
Maintenance
Related MCP Connectors
Model Context Protocol server for Studex tools, notifications, and profile integrations
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Ovanek MCP: Model Context Protocol server for Ovanek platform tools; writes are dry-run by default.
Read your Iceberg tables hosted in Europe: find tables, run read-only SQL, view photos.
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-
- AlicenseBqualityCmaintenanceA Model Context Protocol server that provides seamless integration with Trino and Iceberg, enabling data exploration, querying, and table maintenance through a standard interface.2225Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server providing seamless integration with Trino and Iceberg for advanced data exploration, querying, and table maintenance.Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that exposes SQL Server metadata and read-only query execution as a structured HTTP API, with safety validation and allowlist policy enforcement.1-