
MCP for Apache Iceberg: How AI Agents Actually Operate a Data Lake
Purpose-built MCP tools turn AI agents from chat assistants into operational participants that discover, diagnose, and govern Iceberg tables with structured signals.
Agentic AI
Connect over MCP — no custom SDK. Every query hits read-only, cost, and PII guards, then routes to the cheapest engine that fits.
Open and runs on your stack
The problem
Uncompacted tables, no cost ceiling, and batch clusters for interactive SQL — that is what most agents hit today.
Agents expect sub-second SQL. Small files and bloated manifests force full scans — a simple lookup becomes 10× slower.
Unsupervised agents can run DDL, scan petabytes, or leak PII. Every query is a cost and compliance risk.
An interactive agent lookup on a batch cluster wastes minutes. Without routing, agents cannot pick the cheapest path.
Agent workloads change constantly. Tables stay static. The lake never sorts for the columns agents actually filter on.
How it works
One endpoint for any MCP agent. Every query is guarded and routed. Access patterns drive compaction, snapshots, orphan cleanup, and manifest rewrites.
01 · MCP
Claude, LangChain, or a custom agent. Schema-aware tools, async SQL with SSE, and Postgres, MySQL, or Arrow Flight wire compatibility. Point the agent at one endpoint.
MCP · Postgres · MySQL · Flight
lakeops MCP server
Schema tools · async SQL · SSE
02 · Guardrails
Stack guards per agent, team, or globally. Read-only blocks DDL. Cost caps reject expensive scans. PII masking scrubs sensitive columns. Human approval pauses high-stakes SQL.
ReadOnly
Blocks DDL and DML
CostEstimate
Rejects scans over 10 GB
PIIMask
Hashes email, ssn, phone
HumanApproval
Pauses writes for review
03 · Routing
Interactive lookups go to DuckDB or Trino. Heavy scans go elsewhere. Cached decisions are 0ms. Unhealthy tables get steered off expensive engines.
Map workloads to engine pools, publish stable URLs, and tune priority without touching clients.
Edit engines, query types, and published URLs
Handles BI, DT queries on Transactional databases
Batch data transformation and scheduled loads
Routine reporting and dashboard queries
04 · Closed loop
Agent SQL feeds back into every optimization — sort-order decisions, snapshot retention, orphan cleanup cadence, and manifest rewrites. Hot tables get prioritized across the full pipeline, and routing weights update as table health improves.
Monitoring started at seq #4,812. Everything written from that point on is in scope.
Only metadata is processed — never retained or stored.
Telemetry reveals table health and actions needed.
Autopilot, manual approval, or policy-driven.
Resources

Purpose-built MCP tools turn AI agents from chat assistants into operational participants that discover, diagnose, and govern Iceberg tables with structured signals.

The five components your infrastructure needs for agentic workloads — MCP connectivity, guardrails, multi-engine routing, self-optimizing storage, and observability.

Netflix spent years building an intelligent lakehouse — Polaris, Autotune, janitors, and Metacat. LakeOps lets every team build the same — and go beyond — in minutes.
Get started
Get a personalized walkthrough with your data and architecture.
Short call, no commitment.
Typically 30 min · Free