Lakekeeper (Apache Iceberg REST catalog) API + MCP Server for Agentic AI!
pip install lakekeeper-mcp Copy PIP instructions
Documentation — Installation, deployment, and usage across the API, CLI, MCP, official documentation.
lakekeeper-mcp exposes a standardized interface to a Lakekeeper (Apache Iceberg REST catalog) deployment via the Model Context Protocol — namespace/table/ snapshot/schema-version catalog reads, warehouse admin, table ownership classification (engine vs. Lakekeeper-native, per DEC-CA-01/GOC-78), and maintenance-request delegation (this package never runs expire_snapshots/ compact itself — it names the delegate: Trino or Spark's own MCPs). A Wire-First lakekeeper_ingest_catalog tool pushes the full catalog into the epistemic-graph Knowledge Graph as typed OWL nodes.
Lakekeeper is the ONE live, reachable Iceberg-REST catalog on this platform — Trino and Spark have both proven real end-to-end reads through it (Iceberg REST → Lakekeeper OAuth2 → SeaweedFS S3); eg's own Iceberg-REST catalog is not yet reachable from other pods.
Talks directly to Lakekeeper's REST APIs over requests — no pyiceberg dependency (see Architecture for why).
Pick the extra that matches what the operator want to run:
uv pip install "lakekeeper-mcp[mcp]" Container images (:mcp) One multi-stage docker/Dockerfile builds the MCP-only image (--target mcp):
docker build --target mcp -t lakekeeper-mcp:mcp . Usage Run the MCP server directly:
python -m lakekeeper_mcp MCP Configuration Example (stdio) { "mcpServers": { "lakekeeper-mcp": { "command": "uv", "args": ["run", "lakekeeper-mcp"], "env": { "MCP_TOOL_MODE": "intent", "LAKEKEEPER_URL": "http://localhost:8181", "LAKEKEEPER_WAREHOUSE": "lakehouse", "LAKEKEEPERTOOL": "True", "LAKEKEEPER_SERVICE_CLIENT_ID": "lakekeeper-service", "LAKEKEEPER_SERVICE_CLIENT_SECRET": "", "LAKEKEEPER_OAUTH_SCOPE": "lakekeeper", "LAKEKEEPER_KEYCLOAK_URL": "http://localhost:8080", "LAKEKEEPER_KEYCLOAK_REALM": "homelab" } } } } Architecture api_client.py wraps api/api_client_lakekeeper.py's LakekeeperApi, a thin requests-based client over api/api_client_base.py's fail-closed HTTP layer (a non-JSON 2xx, or any >=400, always raises — never a silent empty result). auth.py mints and caches short-lived Keycloak client-credentials tokens with scope=lakekeeper explicit — the shared client convention's default (scope=catalog) is rejected by Lakekeeper.
Deliberate deviation from a pyiceberg-SDK-based client: pyiceberg 0.11.1 (latest) still pins rich =10.11.0 in its dependency-free base install, conflicting with this workspace's Rich>=15 lock (a known, tracked issue — BUG-223), and this package's brief requires zero new heavy dependencies. A catalog CONTROL PLANE wrapper (namespace/table/snapshot/ warehouse admin) never needs Arrow-native data reads — those happen through Trino/Spark's own MCPs — so a thin authenticated REST client (the same shape every other fleet package in this repo uses) is the lower-risk, template-conformant choice.
mcp/mcp_lakekeeper.py registers five tool groups (catalog, warehouse, ownership, maintenance, events) via one register_tool_surface(...) call in mcp_server.py, matching the fleet's one-registration-call convention. kg_ingest.py exposes ingest_entities/ingest_catalog plus record-mapping helpers around the required native_ingest (Wire-First) authority.
12 package + 24 inherited variable(s). Auto-generated from .env.example + the shared agent-connector-sdk set — do not edit.
See docs/ for architecture, configuration, and deployment notes, and AGENTS.md for domain-specific traps (the /catalog/v1 root, the scope=lakekeeper landmine, and the maintenance-delegation boundary).
17 action-routed tool(s) · 11 verbose 1:1 tool(s). Each is enabled unless its TOOL toggle is set false; MCP_TOOL_MODE selects the surface (intent default — the six verb-tools, granular set loaded on demand · condensed action-routed · verbose 1:1 · both). Auto-generated — do not edit.
Contributions are welcome! Please ensure code quality by running local checks before submitting pull requests:
Provision this package with the consolidated agent-connector-sdk-deployment workflow. It selects an installed-package, editable-source, or immutable-container path; records only runtime secret and TLS-profile references in AgentConfig; and runs doctor, registration, policy, observability, and rollback gates. Ask your agent to "deploy lakekeeper-mcp with agent-connector-sdk-deployment".
The repository embeds no deployment profile, credential value, certificate path, or environment-specific endpoint. Supply those at runtime through AgentConfig and the configured secret provider.
This package ships a compact canonical skill surface with specialist procedures kept as referenced workflows. The current MCP tools, skill metadata, connector_manifest.yml, ontology, mappings, shapes, fixtures, migrations, tool-schema fingerprints, and certification metadata form one versioned capability contract. Validate them together; do not rely on stale tool names or historical per-task skill wrappers.
Runtime endpoints, credentials, certificate trust, tenant identity, retention, and observability policy are deployment inputs and are never packaged values. See Configuration, trust, and privacy before enabling a network transport, connector ingestion, Arbora delegation, or trace export.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




