CloudZero × Metabase

How to build CloudZero cost dashboards in Metabase

CloudZero is a cloud cost intelligence platform focused on unit economics — mapping raw spend to customers, products, and features through its dimensions model. Metabase is where you turn that billing data into shared, trustworthy cost dashboards. This guide covers two complementary paths: a lightweight MCP + CLI route that pulls live cost data with the CloudZero MCP Server and loads a CSV into Metabase with the Metabase CLI, and a durable pipeline route that lands CloudZero cost data in a database so you can build dashboards anyone can read.

Heads up: Metabase connects to databases and warehouses — it does not ship a native CloudZero connector. The good news: billing data is tabular and warehouse-friendly. Land line items or daily rollups in a database, model amortized vs. unblended cost once, and every dashboard downstream inherits the same definitions.

How do you connect CloudZero to Metabase?

Most teams combine both routes: quick answers through MCP and CLI uploads first, then recurring cost reporting on a warehouse-backed model.

1 · MCP + CLI route (AI-assisted)

Live cost answers in, quick analysis out

Pair the CloudZero MCP Server with the Metabase CLI. Use MCP for live cost lookups, write a scoped result to CSV, then load it into Metabase as a ready-to-query table and model.

Best for
  • Quick questions such as "show me cost per customer and per feature"
  • Loading CloudZero cost exports into Metabase in seconds
  • Spot-checks and one-off cost investigations without pipeline work
Trade-offs
  • Great for exploration, not governed month-end cost reporting
  • Use read-only credentials or scoped API keys wherever supported
  • CSV uploads are snapshots — refresh or move to the pipeline for history
2 · Pipeline route (warehouse-backed)

Durable cost dashboards with history

Land CloudZero cost data in a database or warehouse — via billing export, connector, or scheduled API pulls — then point Metabase at it.

Best for
  • CloudZero cost dashboards finance and engineering both trust
  • Joining cost with revenue, customers, and usage for unit economics
  • Long-run trends for cost per customer and per feature and spend by cloudzero dimension
Trade-offs
  • You own the refresh schedule and the rollup grain
  • Model amortized vs. unblended cost once, in the warehouse layer
  • Tag and label hygiene decides how far allocation can go

What can you analyze from CloudZero data in Metabase?

  • Cost per customer and per feature — built from dimension cost slices and the related dimensions (customers, products, features), unit cost metrics, anomaly events data your sync exposes.
  • Spend by CloudZero dimension — built from dimension cost slices and the related dimensions (customers, products, features), unit cost metrics, anomaly events data your sync exposes.
  • Cost anomalies and spikes — built from dimension cost slices and the related dimensions (customers, products, features), unit cost metrics, anomaly events data your sync exposes.
  • Unit cost trends against usage — built from dimension cost slices and the related dimensions (customers, products, features), unit cost metrics, anomaly events data your sync exposes.
  • Budget tracking against forecast — built from dimension cost slices and the related dimensions (customers, products, features), unit cost metrics, anomaly events data your sync exposes.

Which CloudZero cost dashboards should you build in Metabase?

For: Finance, product

Unit economics

Cost per customer and per feature.

  • Cost per customer, top 20 (table)
  • Cost per customer trend (line)
  • Margin by customer where revenue is joined (table)
  • Cost per feature or product line (bar)
For: FinOps, platform

Dimension spend

Spend through the platform's dimensions.

  • Spend by dimension value by month (stacked bar)
  • Fastest-growing dimension values (table)
  • Dimension coverage of total spend (number + trend)
  • Spend outside any dimension (number)
For: On-call, FinOps

Anomalies

Spikes caught early, with context.

  • Anomalies detected per week (bar)
  • Deviation vs. expected cost (table)
  • Time to acknowledge anomalies (line)
  • Repeat-offender scopes (table)
For: Leadership

Budget and forecast

Spend against what was planned.

  • Budget burn rate (number + trend)
  • Forecast vs. actual by month (combo)
  • Cost growth rate vs. customer growth (combo)
  • Unit cost efficiency trend (line)

How do you use the CloudZero MCP Server with the Metabase CLI?

Pair the CloudZero MCP Server with the Metabase CLI for fast, hands-on cost analysis. MCP is useful for scoped lookups and summarized exports; the Metabase CLI's upload command loads CSV data into Metabase and creates a ready-to-query table and model.

Example workflow

  • Ask the MCP server for dimension cost slices for the trailing 30 days, one row per dimension value per day.
  • Export the result as CSV, keeping stable IDs, accounts, services, tags, and dates.
  • Run mb upload csv to load it into Metabase as a table and model, then build questions and dashboards on top.

Be honest about the limits

  • MCP lookups are excellent for exploration, not scheduled reporting.
  • A CSV upload is a snapshot; refresh it with mb upload replace or move to the pipeline for real history.
  • Unit-cost trends need dimension extracts accumulated over time — a single extract is a point-in-time snapshot.
  • mb upload csv needs an uploads database configured under Admin → Settings → Uploads.

How do you set up CloudZero MCP and the Metabase CLI?

CloudZero MCP Serverofficial

Transport
Hosted remote MCP via Streamable HTTP
Auth
OAuth through CloudZero (or an X-Api-Key header)
Best for
Live scoped cost lookup and export

Metabase CLIofficial

Install
npm install -g @metabase/cli
Auth
mb auth login
Load data
mb upload csv --file data.csv
Requires
An uploads database (Admin → Settings → Uploads)
MCPExample MCP client config
{
  "mcpServers": {
    "cloudzero": {
      "url": "https://czca-server.discovery.cloudzero.com/mcp"
    }
  }
}

Use CloudZero's hosted endpoint — older community CloudZero MCP repos on GitHub are unofficial. For headless agents, pass an X-Api-Key header instead of OAuth. CloudZero also ships a Claude Code plugin built on this server.

TerminalLoad a CloudZero CSV with the Metabase CLI
# Install the Metabase CLI
npm install -g @metabase/cli

# Log in (opens your browser; requires Metabase v62+)
mb auth login --url https://your-metabase.example.com

# Load a dimension-cost-slices export — creates a table AND a model
mb upload csv --file cloudzero-dimension-cost-slices.csv --collection root

# Refresh that same table later from a new export
mb upload replace <table-id> --file cloudzero-dimension-cost-slices.csv

Can you generate a CloudZero dashboard with AI?

Yes. Use the prompt below with any assistant that can run the CloudZero MCP Server and the Metabase CLI. It works end to end: if CloudZero cost tables already exist in Metabase it analyzes those; otherwise it pulls scoped, summarized data, loads it with mb upload csv, then builds the dashboard and caveats any metric that needs missing history.

Prompt for creating a CloudZero Unit Economics Overview dashboard
Create a polished Metabase dashboard for CloudZero unit economics analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.

Goal: Help engineering, platform, and finance leaders understand cost per customer, dimension spend, anomalies, and budget burn from CloudZero data.

Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for cloudzero tables and
  models). If durable CloudZero cost data is already present — a billing export,
  warehouse sync, or earlier upload — use it and skip to Step 2.
- If nothing is there, pull a scoped, summarized export with the CloudZero MCP Server:
  dimension cost slices, plus dimensions (customers, products, features), unit cost metrics, anomaly events.
  Prefer daily rollups by service, account, team, or namespace over raw line
  items. Write each result to a CSV, then load it with the Metabase CLI — run
  "mb upload csv --file <export>.csv" so each upload creates a table and a
  ready-to-query model. Use "mb upload replace <table-id> --file <export>.csv"
  to refresh an existing table instead of creating duplicates.

Step 2 — Inspect before querying:
Do not assume exact table or column names. Inspect available fields, accounts,
services, tags or labels, and date ranges before creating trend cards.

Important:
- Build on whatever data is present; don't claim Metabase connects natively to
  CloudZero — it reads a database or CLI-uploaded tables.
- State whether costs are amortized, unblended, or net of credits — and never
  mix conventions in one card.
- A single CSV is a point-in-time snapshot: only build trend cards if there is
  a usable date column or multiple periods have been uploaded.
- Exclude or clearly separate credits, refunds, and taxes from usage cost.
- Only compute unit economics (cost per customer) when a customer-level
  dimension or tag actually exists in the data.

Dashboard title: CloudZero Unit Economics Overview

Sections:
1. Executive summary: Spend this month; Cost per customer (median);
   Dimension coverage; Anomalies open; Budget burn.
2. Unit economics: Cost per customer; margin where revenue is joined;
   cost per feature.
3. Dimensions: Spend by dimension value; fastest growers; uncovered spend.
4. Anomalies: Detections per week; deviations; repeat offenders.
5. Budget: Burn rate; forecast vs. actual; growth vs. customer growth.

Filters: Date range, Provider or Account, Service, Team, Environment, Tag.

Output: Build the dashboard if you have permission; otherwise provide the exact
questions, SQL, model definitions, and layout. Include caveats for any metric
that cannot be calculated from the available data.

How do you sync CloudZero data into a database or warehouse?

For dashboards that need history and reliability, land CloudZero cost data in a database first, then connect Metabase to that database.

Connector options

  • Billing export or managed ETL — use the vendor's native export or a connector when one covers the objects you need.
  • Custom pipeline — use the CloudZero API for control over rollup grain, fields, and refresh cadence.
  • MCP + CSV — use this for quick exploration and one-off slices.

No managed connector or bulk data export exists — AnyCost is ingestion into CloudZero, not out of it. Use MCP and scoped CloudZero API extracts for the platform's dimension and unit-cost views, and keep your raw billing exports (CUR 2.0, BigQuery export) as the durable warehouse layer underneath.

Notes

  • Decide the rollup grain first (daily per service, account, and team) — it drives warehouse cost and every trend card.
  • Land raw billing tables first, then build clean Metabase models on top.
  • Normalize dimension, customer, usage-date, cost, and the revenue join key fields.

How should you model CloudZero data in Metabase?

Core tables

TableGrainKey columns
cloudzero_cost_extractsone row per dimension value per day (scoped extract)usage_date, dimension_name, dimension_value, cost_usd
unit_costsone row per customer per monthmonth, customer_id, cost_usd, revenue_usd, margin_pct
cost_anomaly_eventsone row per detected anomalydetected_at, scope, expected_cost_usd, actual_cost_usd, deviation_pct, status

Modeling advice

  • Build a clean unit_costs model with common columns across clouds and tools, so multi-source dashboards don't fork definitions.
  • Keep amortized, unblended, and net-of-credits cost as separate, labeled columns — never let one card silently mix them.
  • Treat tags and labels as slowly changing: they apply from when they were added, and historical spend stays untagged.
  • Separate usage cost from credits, refunds, taxes, and support fees in the model layer, not in each card.

Which CloudZero cost metrics should you track in Metabase?

MetricDefinitionNotes
Cost per customerAllocated cost per customer per period.Join revenue for margin, not just cost.
Budget burn rateShare of budget consumed vs. period elapsed.Alert at thresholds, don't just chart it.
Cost growth rateMonth-over-month spend change by dimension.Compare against customer or usage growth.
Total cloud spendAll-in spend per period across providers.Reconcile platform numbers to raw bills quarterly.

What SQL powers CloudZero cost dashboards in Metabase?

These assume a cleaned analytical model in a warehouse (PostgreSQL dialect). Adjust table and column names to match your pipeline.

Cost, revenue, and margin per customerPostgreSQL

Unit economics once cost and revenue share a customer key.

SELECT
  u.month,
  u.customer_id,
  u.cost_usd,
  u.revenue_usd,
  ROUND(
    100.0 * (u.revenue_usd - u.cost_usd) / NULLIF(u.revenue_usd, 0), 1
  ) AS gross_margin_pct
FROM unit_costs u
WHERE u.month >= date_trunc('month', CURRENT_DATE) - INTERVAL '6 months'
ORDER BY u.month DESC, u.cost_usd DESC;
Spend by dimension value by monthPostgreSQL

Feature-level cost from scoped extracts.

SELECT
  date_trunc('month', usage_date) AS month,
  dimension_value,
  ROUND(SUM(cost_usd), 2) AS cost
FROM cloudzero_cost_extracts
WHERE dimension_name = 'product_feature'
GROUP BY 1, 2
ORDER BY 1, cost DESC;
Cost anomaly log with deviationsPostgreSQL

Spikes vs. expected cost, trailing 90 days.

SELECT
  detected_at,
  scope,
  expected_cost_usd,
  actual_cost_usd,
  ROUND(
    100.0 * (actual_cost_usd - expected_cost_usd)
    / NULLIF(expected_cost_usd, 0), 1
  ) AS deviation_pct,
  status
FROM cost_anomaly_events
WHERE detected_at >= CURRENT_DATE - INTERVAL '90 days'
ORDER BY detected_at DESC;

What are common mistakes when analyzing CloudZero in Metabase?

Mixing amortized, unblended, and net-of-credits cost in one dashboard.→ Pick the convention per card and label it. Trends computed on one basis and totals on another will never reconcile — and finance will notice.
Computing cost per customer without a denominator strategy.→ Shared and platform costs must be distributed by an explicit rule — evenly, by usage, or by revenue — and that rule changes the answer. Document it on the dashboard.
Rebuilding raw billing analytics through platform extracts.→ Scoped API extracts are for dimension and unit-cost views. For resource-level spend analysis, query the raw billing exports in your warehouse instead.
Building dashboards from live MCP lookups only.→ MCP is useful for exploration; durable cost dashboards need a database-backed model with history.

Related analytics

Related dashboards

Related integrations

FAQ

Does Metabase connect natively to CloudZero?
No. Metabase reads databases and warehouses. Land CloudZero cost data in a database first — via billing export, connector, or API pipeline — or upload a CSV with the Metabase CLI, then build Metabase models and dashboards on top.
Should Metabase replace CloudZero?
No — they answer different questions. CloudZero is built for cost operations: rate optimization, recommendations, and native views. Metabase is where you build governed, shareable cost reporting for the whole company, and join spend with revenue, customers, and product usage for real unit economics.
Can I bulk-export my CloudZero data to a warehouse?
Not today — there's no managed connector or bulk export, and AnyCost is ingestion into CloudZero, not out of it. Script scoped API extracts for the dimension and unit-cost views you report on, and keep raw billing exports (CUR 2.0, BigQuery export) as the durable warehouse layer underneath.
Where does the revenue side of unit economics come from?
Your own systems — billing or CRM data synced to the warehouse. CloudZero allocates the cost side to customers and features; joining it to revenue per customer in Metabase is what turns cost per customer into margin per customer.