Strapi × Metabase

How to build Strapi dashboards in Metabase

Strapi is an open-source headless CMS that developers self-host on PostgreSQL or MySQL, with a native MCP server since v5.47. Metabase is where you turn that site data into shared, trustworthy dashboards. This guide covers three complementary paths: a direct database connection to the PostgreSQL or MySQL instance Strapi runs on, a lightweight MCP + CLI route that pulls live data with the Strapi MCP server (native) and loads a CSV into Metabase with the Metabase CLI, and a durable pipeline route that syncs Strapi stats into a database so you can build dashboards anyone can read.

Heads up: Metabase connects to databases and warehouses — it does not call the Strapi API directly. For self-hosted installs that's a feature: the PostgreSQL or MySQL database is already a Metabase data source, no ETL required.

How do you connect Strapi to Metabase?

Self-hosters should start with the database route; the MCP + CLI and pipeline routes cover hosted setups and cross-source joins.

1 · Direct database route (zero ETL)

Point Metabase at PostgreSQL or MySQL

Self-hosted Strapi keeps every content type in its own table (plus drafts, locales, and relations) in Postgres or MySQL — point Metabase at the database and content operations analytics need no pipeline at all.

Best for
  • Self-hosted installs where you control the database
  • Full history from day one — no sync to schedule
  • Content, users, and commerce tables in one place
Trade-offs
  • Query a read replica, not the production primary
  • Internal schemas can change across major upgrades
  • Hosted plans without database access need another route
2 · MCP + CLI route (AI-assisted)

Live data in, quick analysis out

Pair the Strapi MCP server (native) 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.

Best for
  • Quick lookups such as "show me entries created and published by content type"
  • Loading a Strapi export into Metabase in seconds
  • Spot-checks and one-off analyses without a warehouse
Trade-offs
  • Great for exploration, not governed recurring reporting
  • Use read-only or least-privilege credentials — CMS MCP servers often include write tools
  • CSV uploads are snapshots — refresh or move to a durable route for history
3 · Pipeline route (warehouse-backed)

Durable dashboards with history

Sync Strapi stats and entities into a database or warehouse with a connector, script, or API, then point Metabase at it.

Best for
  • Strapi reporting that content and commerce teams depend on
  • Joining Strapi data with analytics, search, and revenue data
  • Long-run trends for entries created and published by content type and draft backlog and time-to-publish
Trade-offs
  • You own the refresh schedule and the rollup grain
  • Platform APIs cap what's exposed — and sometimes how much history
  • Hosted-plan rate limits shape how often you can sync

How do you connect Metabase directly to the Strapi database?

Self-hosted Strapi keeps every content type in its own table (plus drafts, locales, and relations) in Postgres or MySQL — point Metabase at the database and content operations analytics need no pipeline at all.

  • Add the PostgreSQL or MySQL instance under Admin → Databases in Metabase — use a read-only user, and prefer a read replica for busy production sites.
  • Build Metabase models on top of the raw tables (filter out revisions, autosaves, and internal statuses once), and point every question at the models.
  • Version-pin your expectations: CMS core upgrades can change internal schemas, so re-check models after major updates.

What can you analyze from Strapi data in Metabase?

  • Entries created and published by content type — built from content entries by type and the related draft and published states, locales, admin users and roles data your connection exposes.
  • Draft backlog and time-to-publish — built from content entries by type and the related draft and published states, locales, admin users and roles data your connection exposes.
  • Localization coverage by locale — built from content entries by type and the related draft and published states, locales, admin users and roles data your connection exposes.
  • Editor activity by admin user — built from content entries by type and the related draft and published states, locales, admin users and roles data your connection exposes.
  • Media library growth — built from content entries by type and the related draft and published states, locales, admin users and roles data your connection exposes.

Which Strapi dashboards should you build in Metabase?

For: Content ops

Content operations

What each content type is producing.

  • Entries created by content type by week (stacked bar)
  • Published vs. draft entries per type (bar)
  • Draft backlog and age (table)
  • Time from created to published (bar)
For: Localization teams

Locale coverage

Which content exists in which languages.

  • Entries per locale per content type (table)
  • Locale coverage vs. the default locale (bar)
  • Entries missing a translation (table)
  • Translation lag after the source publishes (bar)
For: Engineering leads

Editor activity

Who maintains the content, and how much.

  • Entries created per admin user (bar)
  • Updates per entry — churn hotspots (table)
  • Active editors per month (line)
  • Entries untouched in 6+ months (table)
For: Platform owners

Media library

What the asset store is holding.

  • Media assets added by week (bar)
  • Storage size by mime type (bar)
  • Largest assets (table)
  • Assets by folder (table)

How do you use the Strapi MCP server (native) with the Metabase CLI?

Pair the Strapi MCP server (native) 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 a summary of content entries by type for the last 90 days, by status and author.
  • Export the result as CSV, keeping stable IDs, statuses, and dates as columns.
  • 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 a durable route for real history.
  • The database holds full history already — the CSV route is only a bridge until Metabase can reach Postgres or MySQL directly.
  • mb upload csv needs an uploads database configured under Admin → Settings → Uploads.

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

Strapi MCP server (native)native

Transport
Built into your Strapi server at /mcp (Streamable HTTP)
Auth
Strapi Admin API token as a Bearer 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)
MCPExample MCP client config
{
  "mcpServers": {
    "strapi": {
      "url": "https://your-strapi-host.com/mcp",
      "headers": {
        "Authorization": "Bearer your-admin-api-token"
      }
    }
  }
}

Strapi ships MCP in the core since 5.47 — no plugin to install. Each request is scoped to the token's admin permissions, so a read-only token gives you a read-only server.

TerminalLoad a Strapi 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 content-entries-by-type export — creates a table AND a model
mb upload csv --file strapi-content-entries-by-type.csv --collection root

# Refresh that same table later from a new export
mb upload replace <table-id> --file strapi-content-entries-by-type.csv

Can you generate a Strapi dashboard with AI?

Yes. Use the prompt below with any assistant that can run the Strapi MCP server (native) and the Metabase CLI. It works end to end: if Strapi 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.

Prompt for creating a Strapi Content & Site Overview dashboard
Create a polished Metabase dashboard for Strapi content & site analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.

Goal: Help site and content owners understand content operations across content types — creation and publishing throughput, draft backlog, locale coverage, and editor activity from Strapi data.

Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for strapi tables and
  models). If Metabase is already connected to the Strapi database, use those tables directly — that's the best route.
- If nothing is there, pull a scoped, summarized export with the Strapi MCP server (native):
  content entries by type, plus draft and published states, locales, admin users and roles.
  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 content types,
statuses, dates, and whether daily history exists before creating trend cards.

Important:
- Build on whatever data is present; don't claim Metabase connects natively to
  the Strapi API — it reads a database or CLI-uploaded tables.
- Exclude revisions, autosaves, and test entries from headline content counts.
- Only compute rates (conversion, open rate, paid share) when both numerator
  and denominator exist in the data.
- 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: Strapi Content & Site Overview

Sections:
1. Executive summary: Entries published this month; Drafts open; Median days
   to publish; Active editors.
2. Throughput: Entries created vs. published by week, per content type.
3. Backlog: Open drafts by age and content type; time-to-publish distribution.
4. Localization: Entries per locale; coverage against the largest locale.
5. Editors: Entries per admin user; entries untouched in 6+ months.

Note: Strapi is headless and has no traffic, comments, or order tables — pull
those from the front end's analytics tool if the dashboard needs them.

Filters: Date range, Content type/Collection, Status, Author/Editor.

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 Strapi data into a database or warehouse?

Self-hosted installs may not need a sync at all — connect Metabase to the database. Sync when you're on a hosted plan, or when Strapi data should land next to analytics and revenue data in a shared warehouse.

Connector options

  • Managed ETL — use a connector when one covers the objects you need.
  • Custom pipeline — use the Strapi REST API for control over grain, fields, and refresh cadence.
  • MCP + CSV — use this for quick exploration and one-off slices.

The dlt verified source for Strapi syncs any content type over the REST API with an API key — handy for Strapi Cloud. Self-hosters usually skip it: the direct database connection exposes every content type as tables immediately.

Notes

  • Land raw entity tables first, then build clean Metabase models on top.
  • Normalize content type, status, author, created and published dates fields.
  • Keep platform stats (views, sessions) separate from measured analytics tools' numbers — definitions differ, and gaps are normal.

How should you model Strapi data in Metabase?

Core tables

TableGrainKey columns
<content_type_tables>one row per entry per content type (e.g. articles, products)id, document_id, created_at, updated_at, published_at, locale, created_by_id
admin_usersone row per admin userid, firstname, lastname, email, created_at, blocked
filesone row per media assetid, name, mime, size, created_at, folder_path

Modeling advice

  • Build a clean content_activity_daily model with consistent columns, so dashboards survive schema changes and plugin swaps.
  • Filter out revisions, autosaves, drafts-of-drafts, and internal test entries once, in the model — not in every question.
  • Normalize URLs (lowercase, no protocol, no trailing slash) so CMS content joins cleanly to analytics and Search Console data.
  • Store dates in UTC and convert at display time; CMS installs often run in site-local timezones.

Which Strapi metrics should you track in Metabase?

MetricDefinitionNotes
Publishing throughputEntries published per week, by content type or editor.Count entries, not draft/published row versions.
Time to publishCreated-to-published lag per entry, as a median.A NULL published_at means still in draft.
Organic clicks & impressionsSearch performance for the pages this content feeds.Headless: join on the front end's URL, not the entry ID.
Conversion rateConversions divided by sessions on content pages.Needs analytics from whatever front end renders Strapi.

What SQL powers Strapi dashboards in Metabase?

These run against Strapi's own PostgreSQL or MySQL schema, shown in PostgreSQL dialect — MySQL needs minor changes such as DATE_FORMAT in place of date_trunc.

Entries created and published by weekPostgreSQL

Each content type is its own table — swap `articles` for yours, or UNION several. Count distinct documents so Strapi v5 draft+published rows do not double-count.

SELECT
  date_trunc('week', created_at) AS week,
  COUNT(DISTINCT document_id) AS entries_created,
  COUNT(DISTINCT document_id) FILTER (
    WHERE published_at IS NOT NULL
  ) AS entries_published
FROM articles
GROUP BY 1
ORDER BY 1;
Draft backlog and time to publishPostgreSQL

In Strapi, a NULL published_at is the draft. Median beats average for the lag.

SELECT
  COUNT(DISTINCT document_id) FILTER (
    WHERE published_at IS NULL
  ) AS drafts_open,
  COUNT(DISTINCT document_id) FILTER (
    WHERE published_at IS NOT NULL
  ) AS published,
  ROUND(
    EXTRACT(EPOCH FROM PERCENTILE_CONT(0.5) WITHIN GROUP (
      ORDER BY published_at - created_at
    ) FILTER (WHERE published_at IS NOT NULL)) / 86400.0, 1
  ) AS median_days_to_publish
FROM articles;
Locale coverage by content typePostgreSQL

Published documents per locale, against the largest locale.

SELECT
  locale,
  COUNT(DISTINCT document_id) AS entries,
  COUNT(DISTINCT document_id) FILTER (
    WHERE published_at IS NOT NULL
  ) AS published,
  ROUND(100.0 * COUNT(DISTINCT document_id) / NULLIF(
    MAX(COUNT(DISTINCT document_id)) OVER (), 0
  ), 1) AS coverage_vs_largest_locale_pct
FROM articles
GROUP BY locale
ORDER BY entries DESC;

What are common mistakes when analyzing Strapi in Metabase?

Counting every database row as content.→ CMS tables store revisions, autosaves, and system entries alongside real content. Filter to published, real types in the model once — or every dashboard number is inflated.
Counting draft and published rows as separate entries.→ Strapi's draft-and-publish model stores both states, so a naive COUNT double-counts everything that has been published. Decide per card whether you mean documents or row versions, and filter on published_at.
Assuming content-type tables survive every migration.→ Table and column names follow your schema, so a content-type rename moves them. Build Metabase models per content type and point questions at the models, not the raw tables.
Building dashboards from live MCP lookups only.→ MCP is useful for exploration; durable dashboards need a database-backed model with history.

Related analytics

Related dashboards

Related integrations

FAQ

Does Metabase connect natively to Strapi?
Not to the Strapi application API — but for self-hosted installs it doesn't need to: Metabase connects directly to the PostgreSQL or MySQL database Strapi runs on, which is a first-class Metabase data source. Hosted setups without database access sync through the API instead, or upload CSVs with the Metabase CLI.
Should Metabase replace Strapi's built-in stats?
No — they answer different questions. Strapi's own dashboards are built for quick site-level checks. Metabase adds what they can't: history beyond retention windows, joins with search and revenue data, and governed metrics your whole team reads the same way.
Is it safe to point Metabase at the Strapi database?
Yes, with two rules: connect to a read replica (or at least a read-only user), and treat the schema as an implementation detail — build Metabase models on top of the raw tables so a core upgrade only breaks one model, not fifty questions. Never grant Metabase write access to a production CMS database.
How do I analyze traffic if the database has no analytics?
The CMS database records what you published, not who visited. Pair it with GA4, Plausible, or Search Console synced to the same warehouse, and join on URL — content metadata from the CMS plus sessions and clicks from analytics is the complete content-performance picture.