How to build CircleCI dashboards in Metabase
CircleCI is a cloud CI/CD platform that runs build, test, and deploy workflows with built-in insights into pipeline performance. Metabase is where you turn that delivery activity into shared, trustworthy dashboards. This guide covers two complementary paths: a lightweight MCP + CLI route that pulls live data with the CircleCI MCP (in the CircleCI CLI) and loads a CSV into Metabase with the Metabase CLI, and a durable pipeline route that syncs CircleCI history into a database so you can build dashboards anyone can read.
How do you connect CircleCI to Metabase?
Most teams combine both routes: use MCP and CLI uploads for a fast first pass, then move recurring delivery reporting to a warehouse-backed model.
Live data in, quick analysis out
Pair the CircleCI MCP (in the CircleCI CLI) with the Metabase CLI. Use MCP for live lookups, write a scoped result to CSV, then load it into Metabase as a ready-to-query table and model.
- Quick lookups such as "show me workflow success rate by project"
- Loading a CircleCI export into Metabase in seconds
- Spot-checks and one-off analyses without a warehouse
- Great for exploration, not governed delivery reporting
- Use read-only or scoped credentials wherever the MCP server supports them
- CSV uploads are snapshots — refresh or move to the pipeline for history
Durable dashboards with history
Sync CircleCI entities and history into a database or warehouse with a connector, custom pipeline, or the API, then point Metabase at it.
- CircleCI delivery dashboards leaders depend on
- Joining CircleCI data with issues, deploys, incidents, or support data
- Long-run trends for workflow success rate by project and duration p50 and p95 by workflow
- You own the refresh schedule and the table grain
- Sync entities and rollups — not raw logs or event firehoses
- Metric definitions must be consistent across teams and repos
What can you analyze from CircleCI data in Metabase?
Once workflow runs and the related pipelines, jobs, test metadata data are in a database, the highest-value views are:
- Workflow success rate by project — which projects' pipelines are reliable, and which fail routinely.
- Duration p50 and p95 by workflow — whether the feedback loop is getting slower, and for which workflows.
- Flaky test leaderboard — the tests that waste the most reruns, from CircleCI's test metadata.
- Credit usage by project — where CI spend concentrates, so cost conversations start from data.
- Failed job hotspots — the specific jobs behind most workflow failures.
Which CircleCI dashboards should you build in Metabase?
Build health
Whether the pipeline is a reliable path to production.
- Build success rate by week (line)
- Failed builds by job or pipeline (bar)
- Builds per day (line)
- Currently failing jobs (table)
Pipeline performance
Whether the path to production is getting slower.
- Median build duration by week (line)
- p95 duration by pipeline (bar)
- Queue time vs. run time (stacked bar)
- Slowest pipelines (table)
Test quality
Which tests waste the most engineering time.
- Flaky tests ranked by failure rate (table)
- Test failures per week (line)
- Retry volume by suite (bar)
- New flaky tests this week (table)
Delivery throughput
The shipping picture behind the DORA metrics.
- Production deploys per week (bar)
- Change failure rate (number + trend)
- Lead time from commit to deploy (line)
- Deploys by project (table)
How do you use the CircleCI MCP (in the CircleCI CLI) with the Metabase CLI?
Pair the CircleCI MCP (in the CircleCI CLI) with the Metabase CLI for fast, hands-on 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 the last 90 days of workflow runs with status, duration, and queue time.
- Export the result as CSV, keeping stable IDs, projects, states, and timestamps.
- Run
mb upload csvto 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 replaceor move to the pipeline for real history. - Run-grain history with queued, started, and finished timestamps is required for duration and success-rate trends.
mb upload csvneeds an uploads database configured under Admin → Settings → Uploads.
How do you set up CircleCI MCP and the Metabase CLI?
CircleCI MCP (in the CircleCI CLI)official
- Transport
- Local server over stdio, bundled in the CircleCI CLI
- Auth
- CircleCI personal API token (CIRCLECI_TOKEN)
- Best for
- Live scoped 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)
{
"mcpServers": {
"circleci": {
"command": "circleci",
"args": ["mcp", "start"]
}
}
}CircleCI folded its MCP server into the CircleCI CLI in 2026 and deprecated the standalone mcp-server-circleci package — point your client at the CLI (circleci mcp start, or circleci mcp stream for local HTTP), not at the old npm package. Self-hosted CircleCI Server works via CIRCLECI_BASE_URL.
# 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 workflow-runs export — creates a table AND a model
mb upload csv --file circleci-workflow-runs.csv --collection root
# Refresh that same table later from a new export
mb upload replace <table-id> --file circleci-workflow-runs.csvCan you generate a CircleCI dashboard with AI?
Yes. Use the prompt below with any assistant that can run the CircleCI MCP (in the CircleCI CLI) and the Metabase CLI. It works end to end: if CircleCI tables already exist in Metabase it analyzes those; otherwise it pulls scoped, summarized data over MCP, loads it with mb upload csv, then builds the dashboard and caveats any metric that needs missing history.
Create a polished Metabase dashboard for CircleCI ci/cd analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.
Goal: Help engineering leaders understand build health, pipeline performance, test quality, and delivery throughput from CircleCI data.
Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for circleci tables and
models). If durable CircleCI data is already present — synced from a warehouse
or uploaded earlier — use it and skip to Step 2.
- If nothing is there, pull a scoped, summarized export with the CircleCI MCP (in the CircleCI CLI):
workflow runs, plus pipelines, jobs, test metadata.
Prefer entity tables and rollups over raw logs. 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, projects,
branches, states, and timestamps, and whether history exists before creating
duration or trend cards.
Important:
- Build on whatever data is present; don't claim Metabase connects natively to
CircleCI — it reads a database or CLI-uploaded tables.
- Never try to load raw build logs or event streams into Metabase; use runs,
entities, state changes, and rollups.
- Only compute durations (cycle time, build duration, time to review) when the
required timestamps exist.
- Exclude bot activity, draft work, and non-production environments from
headline numbers, and keep the segmenting column explicit.
- 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.
Dashboard title: CircleCI CI/CD Overview
Sections:
1. Executive summary: Builds last 30 days; Success rate; Median duration;
Flaky tests flagged; Production deploys.
2. Build health: Success rate by week; failed builds by job; builds per day.
3. Performance: Median and p95 duration by week and pipeline; queue time.
4. Test quality: Flaky tests by failure rate; test failures per week; retries.
5. Throughput: Deploys per week; change failure rate; lead time where synced.
Filters: Date range, Project or Repository, Branch or Environment, Team, Status.
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 CircleCI data into a database or warehouse?
For dashboards that need history and reliability, land CircleCI entities and change history in a database first, then connect Metabase to that database.
Connector options
- Managed ETL — use a connector when one covers the objects you need.
- Custom pipeline — use the CircleCI API v2 (Insights endpoints) for control over fields, grain, and refresh cadence.
- MCP + CSV — use this for quick exploration and one-off slices.
Airbyte's marketplace CircleCI source syncs pipelines, workflows, and jobs. For metric-grade data, the Insights API already serves aggregated success rates, durations, and credit usage per workflow — a small scheduled script can land those rollups directly.
Notes
- Land raw entity tables first, then build clean Metabase models on top.
- Sync state-change or audit history from day one — duration metrics can't be reconstructed later without it.
- Normalize project or job, branch, status, queued/started/finished-timestamp, and duration fields.
How should you model CircleCI data in Metabase?
Core tables
| Table | Grain | Key columns |
|---|---|---|
circleci_workflow_runs | one row per workflow run | id, project, workflow_name, status, branch, created_at, duration_seconds, credits_used |
circleci_jobs | one row per job per workflow run | id, workflow_run_id, job_name, status, duration_seconds |
circleci_test_results | one row per test case per job | job_id, suite, test_name, result, duration_seconds |
Modeling advice
- Build a clean
pipeline_runsmodel with common columns across tools, so multi-source dashboards don't fork definitions. - Separate entity tables (projects, repos, flags, members) from run-grain and event-grain tables.
- Exclude bots, drafts, and non-production environments from headline metrics; keep the flag as an explicit column.
- Use stable IDs for project, repo, and person joins; display names change.
Which CircleCI metrics should you track in Metabase?
| Metric | Definition | Notes |
|---|---|---|
| Build success rate | Successful runs divided by all completed runs, per pipeline. | Segment by branch; main-branch health is the headline. |
| Pipeline duration | Median and p95 wall-clock time from start to finish. | Track queue time separately from run time. |
| Flaky test rate | Tests that both pass and fail on the same code. | Rank by failure rate and time wasted, not raw count. |
| Deployment frequency | Production deployments per period — a DORA throughput metric. | Count deploys, not builds or merges. |
What SQL powers CircleCI dashboards in Metabase?
These assume a cleaned analytical model in a warehouse (PostgreSQL dialect). Adjust table and column names to match your pipeline.
Main-branch pipeline health over time.
SELECT
date_trunc('week', started_at) AS week,
COUNT(*) AS builds,
ROUND(
100.0 * COUNT(*) FILTER (WHERE result = 'success')
/ NULLIF(COUNT(*), 0), 1
) AS success_rate_pct
FROM pipeline_runs
WHERE branch = 'main'
GROUP BY 1
ORDER BY 1;Whether the path to production is getting slower.
SELECT
pipeline_name,
percentile_cont(0.5) WITHIN GROUP (
ORDER BY duration_seconds
) / 60.0 AS median_minutes,
percentile_cont(0.95) WITHIN GROUP (
ORDER BY duration_seconds
) / 60.0 AS p95_minutes
FROM pipeline_runs
WHERE started_at >= CURRENT_DATE - INTERVAL '30 days'
AND result = 'success'
GROUP BY pipeline_name
ORDER BY median_minutes DESC;Tests that both pass and fail on the same code, trailing 14 days.
SELECT
test_name,
COUNT(*) AS runs,
COUNT(*) FILTER (WHERE result = 'failed') AS failures,
ROUND(
100.0 * COUNT(*) FILTER (WHERE result = 'failed')
/ NULLIF(COUNT(*), 0), 1
) AS failure_rate_pct
FROM test_results
WHERE run_at >= CURRENT_DATE - INTERVAL '14 days'
GROUP BY test_name
HAVING COUNT(*) FILTER (WHERE result = 'failed') > 0
AND COUNT(*) FILTER (WHERE result = 'passed') > 0
ORDER BY failure_rate_pct DESC
LIMIT 20;