Plain × Metabase

How to build Plain support dashboards in Metabase

Plain is an API-first B2B support platform — a GraphQL API, a typed SDK, and an MCP server are first-class, not afterthoughts. Metabase is where you turn that activity into shared, trustworthy dashboards. This guide covers two complementary paths: a lightweight MCP + CLI routethat pulls live data with the Plain MCP server and loads a CSV into Metabase with the Metabase CLI for quick analysis, and a durable pipeline route that syncs Plain into a database so you can build dashboards anyone can read.

Heads up: Metabase connects to databases and warehouses — it does not ship a native Plain connector. For dashboards that need history and reliability, you'll sync Plain into a database first (covered below).

How do you connect Plain to Metabase?

Most teams combine both routes: use the Plain MCP server and Metabase CLI route to pull live data and stand up a quick analysis, and the pipeline route for the dashboards people depend on.

1 · MCP + CLI route (AI-assisted)

Live data in, quick analysis out

Pair Plain's official MCP server (to read live thread, customer, and tenant data) with the Metabase CLI, whose upload command loads a CSV into Metabase as a ready-to-query table and model.

Best for
  • Thread lookups like "what's the open queue for this tenant?"
  • Loading a Plain CSV export into Metabase in seconds
  • Spot-checks and one-off analyses without a warehouse
Trade-offs
  • Great for exploration, not governed reporting
  • Plain's MCP inherits your permissions — write actions ask for confirmation
  • CSV uploads are snapshots — refresh or move to the pipeline for history
2 · Pipeline route (warehouse-backed)

Durable dashboards with history

Sync Plain into a database or warehouse with dlt or its GraphQL API, then point Metabase at it.

Best for
  • SLA, response-time, and tenant-health dashboards
  • Joining support with product usage and revenue
  • Trends over quarters and per-tenant comparisons
Trade-offs
  • Sync is GraphQL/API-based — Plain is API-first by design
  • You own the data model and refresh schedule
  • Capture timeline events for accurate response and resolution time

What can you analyze from Plain data in Metabase?

  • Thread volume — created vs. resolved by day and channel
  • Time to first response — overall and by tenant
  • SLA status — threads within and outside target
  • Tenant health — open threads and load by company
  • Backlog and aging — open work and how long it's been waiting
  • Drivers — volume by label and custom thread field
  • Channel mix — email, chat, and API-created threads

Which Plain dashboards should you build in Metabase?

For: Support leads

Support overview

The daily pulse of volume and responsiveness.

  • Threads created vs. resolved per day (dual line)
  • Median time to first response (number + trend)
  • Open backlog by status (bar)
  • Volume by channel (email, chat, API) (bar)
For: Customer success

Tenant health

Plain models companies as tenants — analyze per account.

  • Open threads by tenant (table)
  • Tenants with rising volume (line)
  • Response time by tenant (bar)
  • Top tenants by support load (table)
For: Support ops

SLA & response time

Are we hitting our targets?

  • SLA status breakdown (bar)
  • First response time p50/p90 by week (line)
  • Aging open threads by days-open bucket (table)
  • Reopened threads by week (line)
For: Product & eng liaison

Drivers & labels

Turn support signal into product priorities.

  • Volume by label (bar)
  • Threads by custom thread field (bar)
  • Feature requests by tenant (table)
  • Top contact drivers this quarter (bar)

How do you use the Plain MCP server with the Metabase CLI?

Pair the Plain MCP server with the Metabase CLI for fast, hands-on analysis. Plain hosts an official MCP server that reads current threads, customers, and tenants; the Metabase CLI's upload command loads a CSV into Metabase and creates a ready-to-query table and model.

Example workflow

  • Ask the Plain MCP for the open queue for a specific tenant, or trace an issue from a thread to a linked PR or Linear issue.
  • Export the threads or timeline entries you want to keep as a CSV.
  • 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

  • The Plain MCP is great for live lookups — not for scheduled or audited reporting.
  • Write actions (reply, assign, change priority) ask for confirmation in your client, and the MCP inherits your Plain permissions.
  • A CSV upload is a point-in-time snapshot; refresh it with mb upload replace or move to the pipeline for real history.
  • mb upload csv needs an uploads database configured under Admin → Settings → Uploads.

How do you set up the Plain MCP server and the Metabase CLI?

Plain MCPofficial

Endpoint
https://mcp.plain.com/mcp
Transport
Streamable HTTP
Auth
OAuth 2.0 + PKCE; inherits your Plain permissions
Note
30 tools across threads, customers, tenants, labels, help center.

Metabase CLIofficial

Install
npm install -g @metabase/cli
Auth
mb auth login (browser OAuth on v62+, or an API key)
Load data
mb upload csv --file data.csv
Requires
An uploads database (Admin → Settings → Uploads)
Cursor~/.cursor/mcp.json or .cursor/mcp.json
{
  "mcpServers": {
    "plain": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.plain.com/mcp"]
    }
  }
}
TerminalLoad a Plain 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 Plain CSV export — creates a table AND a model
mb upload csv --file plain-threads.csv --collection root

# Refresh that same table later from a new export
mb upload replace <table-id> --file plain-threads.csv

No API keys to manage — Plain's MCP uses OAuth, so the assistant inherits your Plain user's permissions. On first connection the server opens a browser window to authorize. The Metabase CLI stores its credentials securely aftermb auth login.

Verify before shipping: confirm an uploads database is enabled under Admin → Settings → Uploads (Metabase docs) and the current Plain MCP setup in the Plain MCP docs.

Can you generate a Plain dashboard with AI?

Yes. Use the prompt below with any assistant that can run the Plain MCP server and the Metabase CLI. It works end to end: if Plain tables already exist in Metabase it analyzes those; otherwise it pulls the data over the Plain MCP, loads it with mb upload csv, then builds the dashboard — rolling metrics up to the tenant and skipping cards it has no data for.

Prompt for creating a Plain Support Overview dashboard
Create a polished Metabase dashboard for Plain support analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.

Goal: Help support and customer success leaders understand volume, responsiveness,
SLA, tenant health, and contact drivers from Plain data.

Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for Plain tables and
  models). If durable Plain data is already present — synced from a warehouse or
  uploaded earlier — use it and skip to Step 2.
- If nothing is there, pull it with the Plain MCP server: threads, timeline
  entries, customers, and tenants. 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 names. Map the available raw tables into these
analytical concepts where possible: Threads, Timeline entries (messages/events),
Customers, Tenants (companies), Labels, Thread fields, and SLA status if present.
Inspect the actual tables and column names first.

Important:
- Build on whatever data is present; don't claim Metabase connects natively to
  Plain — it reads a database or CLI-uploaded tables.
- Use medians (p50) and p90 for response times, never averages.
- Plain models companies as tenants — roll metrics up to the tenant where useful.
- Define "first response" as the first outbound message from a human or machine
  user, excluding internal notes.
- If timeline history is missing, do not calculate time-in-status. Use a caveat
  instead.
- Only build a card if its underlying column/metric exists 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: Plain Support Overview

Sections:
1. Executive summary (KPI cards): Threads created last 7 days; Resolved last 7
   days; Open backlog; Median time to first response; SLA status; Volume by
   channel.
2. Volume & backlog: Created vs resolved by day; Open by status; Backlog aging;
   Volume by channel.
3. Tenant health: Open threads by tenant; Tenants with rising volume; Response
   time by tenant; Top tenants by load.
4. SLA & response time: SLA status breakdown; First response p50/p90 by week;
   Reopened by week (only if history exists).
5. Drivers: Volume by label; Threads by custom field; Feature requests by tenant.

Filters: Tenant, Channel, Label, Assignee, Status, Date range.

Reuse the models Metabase auto-created from uploaded CSVs, or (for a warehouse)
create reusable models: modeled_plain_threads, modeled_plain_timeline_entries,
modeled_plain_customers, and modeled_plain_tenants.

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. Keep it practical, dense,
and executive-readable. Avoid vanity metrics.

How do you build the Plain → Metabase pipeline?

Every pipeline is the same four stages: extract from Plain's API, load into a database, model the raw tables into clean ones, and visualize in Metabase. You can assemble this with a managed connector or a free script you host yourself.

No paid tool required. A fully free stack: a small dlt or hand-written script (extract) → a free Postgres database like Neon or Supabase (load) → a scheduler such as GitHub Actions cron (host) → Metabase (visualize). For hosting and scheduling details, see our data pipeline guide.

Connector options

  • dlt (free, code) — wrap the GraphQL API in a Python pipeline for incremental loads and schema control. The lightest path to a maintainable, no-vendor sync.
  • Plain GraphQL API (free, raw) — the source of truth; query threads, timeline entries, customers, and tenants and upsert on a schedule. Plain advertises no restrictive rate limits.
  • Typed SDK (free) — Plain ships an open-source TypeScript SDK you can use to build a custom sync job.
  • Webhooks (free) — subscribe to thread events to keep your warehouse fresh in near real time.

Notes

  • Land raw tables first, then build clean models on top.
  • Sync timeline entries (not just threads) so you can compute response and resolution times.
  • Bring tenants and thread fields into your model for per-account analysis.

How should you model Plain data in Metabase?

Core tables

TableGrainKey columns
threadsone row per threadid, status, priority, tenant_id, customer_id, assignee_id, created_at, resolved_at
timeline_entriesone row per entrythread_id, entry_type, direction, actor_type (user/machine/customer), created_at
customersone row per customerid, email, tenant_id
tenantsone row per companyid, name, external_id

Modeling advice

  • Roll threads up to the tenant for B2B account-health dashboards.
  • Normalize status (todo/snoozed/done) and channel so charts stay stable.
  • Use actor_type on timeline entries to separate human, machine (AI), and customer messages for honest response metrics.
  • Treat labels as a bridge table so a thread can carry many labels.
  • Define "done" once and reuse it everywhere.

Which Plain metrics should you track in Metabase?

MetricDefinitionNotes
Time to first responseCreated → first outbound message.Report median and p90; separate human from machine.
Thread volumeCreated vs. resolved in a period.Segment by channel and tenant.
SLA statusThreads within vs. outside target.Plain exposes SLA status on threads.
Open threads by tenantBacklog rolled up to the company.Core B2B health signal.
Backlog agingHow long open threads have waited.Bucket by days open.
Volume by labelThreads by label/topic.Feeds product prioritization.

What SQL powers Plain dashboards in Metabase?

These assume the modeled tables above (PostgreSQL dialect). Adjust identifiers to match your warehouse.

Threads created vs. resolved per dayPostgreSQL

The basic volume trend over the last 30 days.

SELECT
  date_trunc('day', t.created_at) AS day,
  COUNT(*)                                          AS created,
  COUNT(*) FILTER (WHERE t.status = 'done')         AS resolved
FROM threads t
WHERE t.created_at >= CURRENT_DATE - INTERVAL '30 days'
GROUP BY 1
ORDER BY 1;
Open threads by tenantPostgreSQL

Where the support load concentrates across B2B tenants.

SELECT
  tn.name            AS tenant,
  COUNT(*)           AS open_threads
FROM threads t
JOIN tenants tn ON tn.id = t.tenant_id
WHERE t.status <> 'done'
GROUP BY tn.name
ORDER BY open_threads DESC
LIMIT 25;
Time to first response by weekPostgreSQL

Median from the first outbound timeline message per thread.

WITH first_outbound AS (
  SELECT
    e.thread_id,
    MIN(e.created_at) AS first_reply_at
  FROM timeline_entries e
  WHERE e.entry_type = 'message'
    AND e.direction = 'outbound'
  GROUP BY e.thread_id
)
SELECT
  date_trunc('week', t.created_at) AS week,
  percentile_cont(0.5) WITHIN GROUP (
    ORDER BY EXTRACT(EPOCH FROM (f.first_reply_at - t.created_at)) / 60.0
  ) AS median_first_reply_min
FROM threads t
JOIN first_outbound f ON f.thread_id = t.id
GROUP BY 1
ORDER BY 1;
Volume by labelPostgreSQL

Top contact drivers over the last 90 days.

SELECT
  l.label_type       AS label,
  COUNT(*)           AS threads
FROM threads t
JOIN thread_labels tl ON tl.thread_id = t.id
JOIN labels l ON l.id = tl.label_id
WHERE t.created_at >= CURRENT_DATE - INTERVAL '90 days'
GROUP BY l.label_type
ORDER BY threads DESC
LIMIT 20;

What are common mistakes when analyzing Plain in Metabase?

Treating a live MCP lookup or a one-off CSV as governed reporting.→ Use the Plain MCP and CSV uploads for live lookups and exploration; build warehouse-backed Metabase dashboards for anything people depend on.
Reporting only at the thread grain.→ Plain models companies as tenants — roll metrics up to the tenant for B2B health.
Counting machine (AI) replies as human first response.→ Use actor_type to separate machine users from human teammates.
Using averages for response time.→ Report medians and p90 — these durations are heavily right-skewed.
Skipping timeline entries.→ Threads alone can't give you response time; sync the timeline.

Related analytics

Related integrations

FAQ

Does Metabase connect natively to Plain?
No. Metabase reads SQL databases and warehouses. Sync Plain into a database first (its GraphQL API, the typed SDK, or dlt), then connect Metabase to that database.
Is the Plain MCP server official?
Yes. Plain hosts an official MCP server at https://mcp.plain.com/mcp over Streamable HTTP with OAuth 2.0 + PKCE, exposing 30 tools across threads, customers, tenants, labels, and the help center. It inherits your Plain user's permissions.
How do I quickly analyze Plain data without a warehouse?
Pull the threads and timeline entries you need with the Plain MCP server, export them to CSV, and run `mb upload csv --file data.csv` with the Metabase CLI. It creates a table and a model you can build questions on right away. You'll need an uploads database enabled under Admin → Settings → Uploads. Refresh later with `mb upload replace`, or move to the pipeline route when you need history.
How do I handle AI (machine user) replies in metrics?
Plain lets machine users own and reply to threads. Use the actor_type on timeline entries to separate machine from human responses so first-response and resolution metrics stay honest.