Iceberg MCP Server
Enables natural language querying of Apache Iceberg lakehouse by exposing typed tools for namespace discovery, table metadata inspection, snapshot history, time travel SQL generation, and partition pruning explanation.
README
Talk to Your Lakehouse: Iceberg MCP Demo
This repository contains a local demo for a talk on using the Model Context Protocol to make an Apache Iceberg lakehouse queryable through natural language.
The demo shows how an LLM can use typed tools to discover namespaces, inspect Iceberg table metadata, reason over snapshots, generate time travel SQL, and explain partition pruning without directly reading the full catalog metadata payload.
What this demo includes
This repo has three small Python processes:
-
catalog_server.pyA mock Apache Iceberg REST Catalog server running on port
5001. It serves realistic table metadata for demo namespaces such assales,analytics, andraw. -
mcp_server.pyA lightweight MCP-style tool server running on port
5002. It wraps the catalog API and exposes typed tools for the LLM, including namespace discovery, table listing, table description, snapshot history, time travel SQL generation, and partition explanation. -
client.pyAn interactive terminal client that connects to Groq, loads the tools from the MCP server, and lets the model call those tools while answering lakehouse questions.
Architecture
User question
|
v
client.py
|
| Groq tool calling
v
mcp_server.py
|
| Authenticated REST calls
v
catalog_server.py
|
v
Mock Iceberg table metadata
Why this exists
Most lakehouse workflows still expect engineers to manually inspect catalogs, table schemas, snapshots, partitions, and metadata files. This demo explores what changes when an LLM is not asked to guess, but is instead given small, typed tools over the lakehouse control plane.
The goal is not to replace the query engine. The goal is to reduce the friction around discovery, debugging, schema inspection, and query planning.
Demo capabilities
The agent can answer questions such as:
What namespaces and tables are in this lakehouse?
Tell me about the orders table: schema, partitioning, and recent activity.
What changed in the orders table in the last two weeks?
I need to query the orders data as it was last Monday. Give me the time travel SQL.
How should I write efficient Spark SQL against the orders table to avoid full scans?
Repository structure
.
├── catalog_server.py # Mock Iceberg REST Catalog server
├── mcp_server.py # MCP-style tool server over the catalog
├── client.py # Groq-powered terminal client
├── requirements.txt # Python dependencies
└── README.md
Prerequisites
Use Python 3.10 or later.
You also need a Groq API key for the interactive client.
Create a key from the Groq console, then export it before running the client:
export GROQ_API_KEY="your_groq_api_key_here"
Setup
Clone the repo:
git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name>
Create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Run the demo
Open three terminal windows.
Terminal 1: start the mock Iceberg REST Catalog.
python catalog_server.py
Expected service:
http://localhost:5001
Terminal 2: start the MCP tool server.
python mcp_server.py
Expected service:
http://localhost:5002
Terminal 3: start the interactive client.
export GROQ_API_KEY="your_groq_api_key_here"
python client.py
The client will show suggested demo questions. You can type one of the numbers or ask your own question.
Available MCP tools
The MCP server exposes these tools to the client:
| Tool | Purpose |
|---|---|
list_namespaces |
Lists available catalog namespaces |
list_tables |
Lists tables inside a namespace |
describe_table |
Returns trimmed schema, partition, property, and snapshot metadata for one table |
get_snapshots |
Returns recent Iceberg snapshot history |
time_travel_info |
Finds the closest snapshot for a target date and returns SQL |
explain_partition |
Explains partition transforms and query pruning strategy |
Design notes
The demo intentionally keeps the catalog local so the talk can focus on the control-plane pattern instead of cloud setup.
The MCP server trims table metadata before sending it to the LLM. This is important because real Iceberg metadata can be large, noisy, and full of file paths that are not useful for conversational reasoning.
The client uses model tool calling instead of prompting the model with raw metadata. This makes the agent behavior easier to inspect because every tool call and tool result is printed in the terminal.
Talk slides
This demo is part of the talk at Cloudera Talk to Your Lakehouse: Building an MCP Server for Apache Iceberg.
Slides are available here:
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。