drafty
Databricks logo

Build a Databricks lakehouse dashboard with Claude

Connect the Databricks managed MCP server to Claude, ask for a lakehouse metrics dashboard from your live workspace, and publish it to a link your team comments on directly — no BI tool, no screenshots pasted into Slack.

What you'll build
A self-contained lakehouse dashboard — rows processed, table freshness, job pipeline health, SQL warehouse spend, and the latest pipeline runs — generated by Claude from your real Databricks workspace, then published to a drafty.im/canvas/… link. Your team clicks the exact chart or number they want changed and leaves a note. Claude reads the comments and ships a revised version to the same URL.

This is an end-to-end example: connect a data source over MCP, generate a dashboard from live numbers, and close the review loop on one link. Total time, start to shared link, is under fifteen minutes. The same shape works for any of the other examples — only the connection step changes.

Here's the finished dashboard, published to a canvas — click any tile or number to leave a comment, exactly as your team would:

Live canvas — comment on any elementOpen ↗

The three moving parts

  1. The Databricks managed MCP server gives Claude read access to your workspace — Genie spaces, Unity Catalog tables and functions, the SQL warehouse — through a controlled set of tools, governed by Unity Catalog permissions. You approve what it can touch.
  2. Claude pulls the numbers and writes a single self-contained HTML dashboard. You iterate on it in the artifact panel until it's right.
  3. Drafty turns that HTML into a stable link your team reviews. Comments pin to the exact element; Claude ships the fix to the same URL.

The generation step is fast now. The part this example is really about is the third one — getting the dashboard in front of people without losing their feedback to a screenshot circled in Preview.

Step 1 — Connect the Databricks managed MCP server

Databricks ships managed MCP servers inside every workspace. The two most useful for a metrics dashboard are the Genie server (natural-language questions over your lakehouse tables) at https://<workspace-hostname>/api/2.0/mcp/genie and the SQL server at https://<workspace-hostname>/api/2.0/mcp/sql. You connect once over OAuth, and Unity Catalog permissions are always enforced — Claude only ever sees data you're allowed to see.

In Claude Code:

claude
claude mcp add --transport http databricks https://<workspace-hostname>/api/2.0/mcp/genie

Then run /mcp inside Claude Code and follow the OAuth prompt to authorize the workspace. When you authorize, grant read scopes only (genie, sql) — this dashboard never needs to write to Databricks.

In Claude Desktop: open Settings → Connectors → Add custom connector, paste the same https://<workspace-hostname>/api/2.0/mcp/genie URL and your OAuth application's client ID, and authorize. (Use the custom-connector path, not the marketplace Databricks entry — Databricks requires a registered OAuth client.)

Safety first
Authorize with read scopes only, and let Unity Catalog do the gating — a reporting dashboard reads tables and runs queries, it never writes. If you're running an unattended agent, use a service principal scoped to read access on the catalogs you need. Never paste a personal access token into a config file or commit it. The dashboard only reads; it has no reason to hold write permissions.

Step 2 — Pull the numbers

Ask Claude in plain language. It uses the managed MCP server's tools to query your lakehouse through Genie and the SQL warehouse:

claude
Using the Databricks MCP server, pull everything we need for a lakehouse health dashboard: total rows processed in the last 24 hours across our core pipeline tables, the freshness (last-updated time) of each gold table, job/pipeline run outcomes over the last 7 days (succeeded vs failed), SQL warehouse spend this month vs last month, and the 10 most recent pipeline runs with status and duration. Summarize the figures before you build anything.

Claude calls Databricks, returns the figures, and you sanity-check them against the Databricks workspace before going further. This is the moment to catch a wrong assumption — the wrong catalog, a stale materialized view, a job you forgot was paused — while it's cheap.

Step 3 — Build the dashboard

Once the numbers look right, ask for the artifact:

claude
Build a single self-contained HTML dashboard from those figures. Rows processed in 24h as the hero number with day-over-day change, then tiles for pipeline success rate, table freshness, and SQL warehouse spend. A recent-runs table at the bottom with status and duration. Clean, no external dependencies — inline the CSS and any chart code.

Claude renders it live in the artifact panel. Iterate in place — you're not regenerating from scratch:

Step 4 — Publish to Drafty for review

A Claude artifact link is a preview, not a stable URL — iterate the artifact and the link you already sent now shows the old version. Ask Claude to publish it to a Drafty canvas instead, so the link you share always stays current:

claude
Publish this dashboard to Drafty as a canvas and give me the shareable link.

Claude pushes the dashboard and hands back a drafty.im/canvas/… link that renders on any device. Send it — your team opens it in a browser, no login and no Claude account needed.

Step 5 — The review loop

This is the part that's not obvious until you've done it once.

A reviewer clicks the specific tile, chart, or number they want changed and leaves a pinned comment — "this freshness figure looks off, is it reading the staging table instead of gold?" The comment is anchored to that element, not floating in a Slack thread. Claude reads the comments through the CLI, reruns the relevant Databricks query if needed, and pushes a revised dashboard to the same URL. The reviewer refreshes and sees the change; the thread stays attached to the element.

The mechanic matters because of what it removes. A Slack message about a chart produces "the number on the left looks wrong." A pinned comment on the actual tile produces "this — point it at the gold catalog, not staging." One of those produces a correct revision; the other produces a guess.

Keeping it fresh

An MCP-generated dashboard is a snapshot — it holds the numbers Claude pulled when it built it; it doesn't re-query Databricks when someone opens the link. For a weekly review or a board-ready snapshot, that's fine.

To make it a live canvas that always shows today's figures, copy this prompt — Claude sets up the refresh for you and schedules it to run on its own:

claude
Turn this Databricks dashboard into a live canvas: every morning, re-pull the latest numbers from Databricks via the MCP server, rebuild the dashboard, and push a new version to the same canvas URL so the link always shows today's figures. Schedule it to run daily on its own.

The link stays stable while the content updates underneath it — see keeping a canvas updated automatically.

What to watch for

Databricks dashboard with Claude — FAQ

Do I need to paste a Databricks token anywhere?
No. The Databricks managed MCP server authenticates over OAuth, so you authorize the workspace through a consent screen instead of pasting a token. For an unattended agent, use a service principal scoped to read access — never a personal access token in a config file, and never committed to a repo.
Is the dashboard live or a snapshot?
A snapshot. It contains the numbers Claude pulled when it built the file; it does not re-query Databricks when someone opens the link. To refresh it, ask Claude to repull and re-push to the same URL — or put that on a daily schedule so the stable link always shows current numbers.
Can my team comment without a Databricks or Claude account?
Yes. The dashboard is published to a Drafty canvas link that renders in any browser. Reviewers click the exact element they want changed and leave a pinned comment with no login required. Only the person connecting Databricks needs workspace access.
Is it safe to give Claude access to my Databricks workspace?
Connect with read scopes over OAuth, and Unity Catalog enforces every permission — Claude can only see catalogs, tables, and Genie spaces you're already allowed to access. A reporting dashboard never needs write access. Every tool call is mediated by the managed MCP server, and in Claude you approve actions.
How is this different from a Databricks SQL dashboard or AI/BI?
Databricks SQL dashboards and AI/BI query live data against governed models — the right choice for standing reporting at scale. This approach is for a fast, shareable snapshot you can spin up in minutes and iterate by talking to Claude, then collect feedback on inline. Different jobs: one is a standing system, the other is a quick reviewable deliverable.