Integration · Software delivery

How do you build GitHub analytics dashboards in Metabase?

GitHub holds your pull requests, reviews, commits, Actions runs, and deploys. Metabase turns that into shared engineering dashboards. Metabase reads SQL databases — there's no native GitHub connector — so durable DORA and velocity dashboards start with a sync. For the engineering picture across tools, see the software delivery analytics overview; for a self-managed alternative, see GitLab.

Heads up: a merged PR is not a deployment. Map real deploys (Actions/Deployments API, releases, or your CD tool) before you report deployment frequency or lead time for changes — otherwise your DORA numbers are fiction.

How do you connect GitHub to Metabase?

Most teams combine these: use the MCP route to explore and answer one-off questions, then build durable, warehouse-backed dashboards for anything you track over time. Setup for both MCP servers is below.

1 · MCP route (AI-assisted)

Live, conversational lookups

Pair a GitHub MCP server with the Metabase MCP server.

Best for
  • Ad-hoc questions ("which PRs are stuck in review?")
  • Exploration before modeling
Trade-offs
  • Exploratory only — not governed reporting; no history
  • API rate limits and repo permission scopes apply
  • OAuth needs a GitHub Copilot license; a Personal Access Token works without one.
2 · Pipeline route (warehouse-backed)

Durable DORA & velocity dashboards

Sync GitHub into a database (Airbyte, Fivetran, dlt, or the REST/GraphQL API), then point Metabase at it.

Best for
  • Durable DORA dashboards, historical trends
  • Joining PRs with deploys, incidents, and issues
Trade-offs
  • You maintain the sync and model
  • Bot identities and merge-vs-deploy mapping need care

How do you use the GitHub and Metabase MCP servers together?

Pair the GitHub MCP server with the Metabase MCP server for live, conversational analysis. The GitHub MCP pulls current PR, review, and Actions data; the Metabase MCP queries the models and dashboards you've already built.

Example workflows

  • List PRs awaiting review on the default branch, then summarize by team.
  • Pull a repo's failing workflow runs from GitHub and cross-check against a Metabase CI model with the Metabase MCP.
  • Draft a SQL question in Metabase from a natural-language ask, using GitHub MCP output to confirm field meanings.
  • Triage: "show open PRs older than 7 days with no review" straight from GitHub — no dashboard required.

Be honest about the limits

  • MCP is great for live lookups — not for scheduled or audited reporting.
  • It does not create history; trend and DORA analysis still needs synced data in a database.
  • Respect GitHub API rate limits and repo access scopes.
  • OAuth on the hosted server requires a GitHub Copilot license; a Personal Access Token works without one.
  • The Metabase MCP server is built in; an admin enables it under Admin → AI → MCP.

How do you set up the GitHub and Metabase MCP servers?

GitHub MCP official

Endpoint
https://api.githubcopilot.com/mcp/
Transport
Streamable HTTP
Auth
OAuth 2.1 + PKCE (needs a Copilot license) or a PAT in the Authorization header
Local option
Docker image ghcr.io/github/github-mcp-server
Note
A read-only variant is served at /mcp/readonly; the old @modelcontextprotocol/server-github npm package is deprecated.

Metabase MCP built-in

Enable
Admin → AI → MCP
Endpoint
https://<your-metabase>/api/metabase-mcp
Auth
OAuth handled by Metabase
ClaudeClaude Code CLI
# GitHub (remote, OAuth in browser — OAuth requires a Copilot license)
claude mcp add --transport http github https://api.githubcopilot.com/mcp/

# Or authenticate with a Personal Access Token instead of OAuth
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
  --header "Authorization: Bearer ghp_your_token"

# Metabase built-in MCP (replace with your instance URL)
claude mcp add --transport http metabase https://your-metabase.example.com/api/metabase-mcp

Claude Desktop: add each as a remote/custom connector (Settings → Connectors) using the same URLs; Claude handles the OAuth pop-up.

CodexOpenAI Codex CLI
codex mcp add github --url https://api.githubcopilot.com/mcp/
codex mcp add metabase --url https://your-metabase.example.com/api/metabase-mcp

First remote MCP in Codex? Enable the rmcp client in ~/.codex/config.toml:

~/.codex/config.toml
[features]
experimental_use_rmcp_client = true

[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp/"

[mcp_servers.metabase]
url = "https://your-metabase.example.com/api/metabase-mcp"
Cursor~/.cursor/mcp.json or .cursor/mcp.json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.githubcopilot.com/mcp/"]
    },
    "metabase": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://your-metabase.example.com/api/metabase-mcp"]
    }
  }
}

Clients with native remote support can use a "url" field instead of the mcp-remote bridge. On first connection each server opens a browser window to authorize.

Verify before shipping: endpoints and flags change — confirm the Metabase MCP URL in Admin → AI → MCP (Metabase docs) and the current GitHub MCP details in the GitHub MCP server repo.

What can you analyze from GitHub data in Metabase?

  • PR throughput — PRs opened vs. merged per week, by repo and team
  • PR cycle time & lead time — created → first review → merge → deploy
  • Code-review health — time to first review, review latency, PRs merged without review, reviewer load
  • CI/CD reliability — Actions workflow pass rate, run duration, repeatedly failing jobs
  • Deployment frequency (DORA) — production deploys per day/week
  • Change failure rate & MTTR (DORA) — failed deploys and time to restore
  • Contributor activity — commits, active contributors, review participation
  • Stale & WIP — aging open PRs, oldest drafts

Which GitHub dashboards should you build in Metabase?

  • Engineering velocity — PR throughput and cycle time → see software delivery.
  • Code-review health — time-to-first-review, review latency, unreviewed merges, reviewer load.
  • CI/CD reliability — Actions pass rate and median run duration, worst-offending workflows.
  • DORA metrics — deployment frequency, lead time for changes, change failure rate, MTTR.

How should you model GitHub data in Metabase?

Map GitHub's objects to a clean model (don't report off raw connector tables):

TableGrainKey columns
pull_requestsone row per PRid, number, repository_id, author_id, state, base_ref, head_ref, created_at, merged_at, closed_at, additions, deletions
pr_reviewsone row per reviewpull_request_id, reviewer_id, state, submitted_at
commitsone row per commitsha, repository_id, author_id, authored_at, committed_at
repositoriesone row per repoid, name, default_branch, team, is_archived
workflow_runsone row per CI runid, repository_id, workflow_name, head_branch, conclusion, created_at, updated_at
deploymentsone row per deployid, repository_id, environment, sha, status, created_at
usersone row per accountid, login, is_bot
  • Flag bot accounts (is_bot, or match dependabot/renovate) and exclude them from contributor metrics.
  • Restrict merge/flow analysis to each repo's default_branch — don't count every branch.
  • Derive cycle time from created_at → merged_at and review latency from the first pr_reviews.submitted_at.
  • Join deployments to commits/PRs by sha to compute lead time for changes.

Can you generate a GitHub dashboard with AI?

Yes. Use this prompt with the Metabase MCP server plus an assistant that can read your warehouse schema:

Prompt for a GitHub Engineering Health & DORA dashboard
Create a Metabase dashboard called "GitHub Engineering Health & DORA" from the
synced GitHub tables in this database. Inspect the schema first; do not assume
table names. Map raw tables to: pull_requests, pr_reviews, commits,
repositories, workflow_runs, deployments, users. Filter out bot accounts
(e.g. dependabot, renovate) and restrict merge analysis to the default branch.

Sections: (1) Velocity — PRs opened vs merged per week, by repo and team;
(2) Flow — median PR cycle time (created to merged) by week, p90, open-PR age;
(3) Review health — median time to first review, share of PRs merged without
review, reviewer load; (4) DORA — deployment frequency, lead time for changes,
change failure rate, and MTTR; (5) CI — Actions workflow pass rate and median
run duration.

Only compute change failure rate and MTTR if deployment outcomes or linked
incidents exist; otherwise add a caveat. Build durable questions from database
tables, treat MCP as exploratory, and do not claim a native GitHub connector.
Add filters for repository, team, author, branch, and date range.

What SQL powers GitHub dashboards in Metabase?

Median PR cycle time by week (default branch)PostgreSQL
SELECT
  date_trunc('week', pr.merged_at) AS week,
  COUNT(*)                                                              AS merged_prs,
  percentile_cont(0.5) WITHIN GROUP (
    ORDER BY EXTRACT(EPOCH FROM (pr.merged_at - pr.created_at)) / 3600
  )                                                                     AS median_cycle_hours
FROM pull_requests pr
WHERE pr.merged_at IS NOT NULL
  AND pr.base_ref = 'main'
GROUP BY 1
ORDER BY 1;
Deployment frequency (DORA)PostgreSQL
SELECT
  date_trunc('week', d.created_at) AS week,
  COUNT(*)                         AS deployments,
  COUNT(DISTINCT d.repository_id)  AS repos_deployed
FROM deployments d
WHERE d.environment = 'production'
GROUP BY 1
ORDER BY 1;
CI pass rate by weekPostgreSQL
SELECT
  date_trunc('week', wr.created_at) AS week,
  COUNT(*)                                                  AS runs,
  AVG((wr.conclusion = 'success')::int)                     AS pass_rate
FROM workflow_runs wr
WHERE wr.head_branch = 'main'
GROUP BY 1
ORDER BY 1;

What are common mistakes when analyzing GitHub in Metabase?

Counting merged PRs as deployments.→ Map real deploys/releases; a merge is not a release.
Ignoring review timestamps for review latency.→ Use pr_reviews.submitted_at, not merged_at.
Counting bots as contributors.→ Filter out dependabot, renovate, and CI accounts.
Averaging cycle time.→ Use median and p90.
Mixing every branch into flow metrics.→ Restrict to the default branch.

Integrations

Dashboards

Metrics

FAQ

Does Metabase have a native GitHub connector?
No. Sync GitHub into a database (Airbyte, Fivetran, dlt, or the REST/GraphQL API), then connect Metabase to that database.
Can I track DORA metrics from GitHub in Metabase?
Yes. Deployment frequency and lead time for changes come straight from deploys and merged PRs. Change failure rate and MTTR also need deploy outcomes or linked incident data.
Can I combine GitHub with Jira or Linear in one dashboard?
Yes — join PRs and deploys to issues to see delivery end to end. See the software delivery analytics overview.