Guide - Integrations

How do you build Xero accounting dashboards in Metabase?

Xero analytics turns finance operations into shared, queryable models. Xero holds invoices, bills, payments, bank transactions, accounts, contacts, and accounting reports for small and midsize businesses. Syncing those objects into a database lets Metabase combine accounting detail with sales, product, and operations data. Metabase connects to the database that holds the synced data; it does not connect natively to Xero.

TL;DR - Use the MCP + CLI route for a scoped, short-lived analysis. Use the official API or approved connector route for recurring dashboards, history, permissions, and reconciliation.

How do you connect Xero to Metabase?

1 - MCP + CLI route (AI-assisted)

Explore a scoped snapshot quickly

Xero's developer platform includes an AI Toolkit with an MCP server. Use read-only accounting scopes for exploration and keep recurring Metabase dashboards warehouse-backed. Pair the approved server with the Metabase CLI to load a focused CSV as a table and model.

Best for
  • Quick questions about Xero data
  • Validating fields and dashboard ideas before building a pipeline
  • Loading a minimal, permissioned snapshot into Metabase
Trade-offs
  • A CSV is a point-in-time snapshot, not governed reporting
  • Finance data needs least-privilege credentials and an explicit tool allowlist
  • Move recurring dashboards to the warehouse-backed route
2 - Pipeline route (warehouse-backed)

Durable dashboards with history

Use the Xero Accounting API with OAuth 2.0, webhooks, and incremental extraction where supported. Snapshot report endpoints separately from transaction-level objects so reconciled statements remain explainable.

Best for
  • Recurring finance and leadership dashboards
  • Historical aging, lifecycle, and period reporting
  • Joining finance data with sales, product, and operations data
Trade-offs
  • Requires a destination database and maintained sync
  • You own currency, status, accounting period, and reconciliation definitions
  • Every modeled total should reconcile to the source system

What can you analyze from Xero?

  • Profit and loss, balance sheet, and cash movement
  • Invoice collection, AR aging, and days sales outstanding
  • Bills due, vendor spend, and payment timing
  • Bank-reconciliation status and unreconciled transactions
  • Budget versus actuals by account or tracking category

Which Xero dashboards should you build in Metabase?

For: Finance leaders

Finance overview

A compact view of cash, exposure, and operating performance.

  • Cash balance and movement
  • Revenue and gross margin
  • Open receivables
  • Bills due
For: Finance operations

Operations

The work that needs attention before the next close.

  • Overdue invoices
  • Upcoming bills
  • Payments by channel
  • Customer and vendor concentration
For: Controllers

Controls and reconciliation

Find exceptions before they become close surprises.

  • Unreconciled bank transactions
  • Invoice-to-payment exceptions
  • Duplicate contacts
  • Tracking-category coverage
For: FP&A

Planning and trends

Compare actuals with the plan and explain the variance.

  • Budget vs. actuals
  • 13-week cash outlook
  • Expense trend
  • Collection forecast

How do you use Xero MCP with the Metabase CLI?

The Xero AI Toolkit MCP server is a officialMCP option for AI-assisted exploration. Xero's developer platform includes an AI Toolkit with an MCP server. Use read-only accounting scopes for exploration and keep recurring Metabase dashboards warehouse-backed. The Metabase CLI can then upload a sanitized CSV and create a ready-to-query table and model.

  • Start with a narrow read-only question and the minimum required objects.
  • Remove secrets, bank details, and personal fields before exporting.
  • Use mb upload csv for a first snapshot and mb upload replace for a controlled refresh.
  • Move to an API or connector sync when the dashboard becomes recurring.

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

Xero AI Toolkit MCP serverofficial

Data source
Xero API
Auth
OAuth 2.0 with read-only accounting and offline-access scopes
Access
Read-only, least privilege
Use for
Exploration and scoped exports

Metabase CLIofficial

Install
npm install -g @metabase/cli
Auth
mb auth login
Load data
mb upload csv --file data.csv
Requires
An uploads database in Metabase
MCP clientExample MCP configuration - verify before use
{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": ["-y", "@xeroapi/xero-mcp-server@latest"],
      "env": {
        "XERO_CLIENT_ID": "your-client-id",
        "XERO_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}
TerminalLoad a Xero 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 scoped Xero export - creates a table and a model
mb upload csv --file xero-export.csv --collection "Finance & Accounting"

# Refresh the same table later
mb upload replace <table-id> --file xero-export.csv
Verify before connecting: check the current Xero AI Toolkit MCP server documentation, review every MCP tool, and enable an uploads database under Admin > Settings > Uploads. Use the vendor's documented authentication flow and a least-privilege role for analytics.

Can you generate a Xero finance dashboard with AI?

Yes. Use the prompt below with an assistant that can access an approved data route and the Metabase CLI. It tells the assistant to inspect the real schema, reconcile totals, and skip cards that the available data cannot support.

Prompt for a Xero finance dashboard
Create a polished Metabase dashboard for Xero finance analytics.
Work end to end: find existing modeled data first; if none exists, load a minimal
read-only snapshot or describe the warehouse sync required.

Goal: Connect Xero to Metabase for invoices, bills, payments, bank transactions, cash flow, AR aging, budget, and management reporting.

Inspect before querying:
- Inspect actual tables, column names, currencies, status values, and timestamps.
- Do not assume the source schema matches this guide exactly.
- Reconcile source totals before publishing any finance KPI.

Important:
- Do not claim Metabase connects natively to Xero; it reads a
  supported database or CLI-uploaded tables.
- Keep native amount, native currency, and reporting-currency amount separate.
- Distinguish authorization, posting, payment, settlement, and reconciliation
  states where the source exposes them.
- Use stable business keys and apply updates/deletes during incremental syncs.
- Exclude account numbers, personal data, and secrets from broad dashboards.
- Only build cards whose required fields and history are actually present.

Dashboard sections:
1. Finance overview: Cash balance and movement; Revenue and gross margin; Open receivables; Bills due.
2. Operations: Overdue invoices; Upcoming bills; Payments by channel; Customer and vendor concentration.
3. Controls and reconciliation: Unreconciled bank transactions; Invoice-to-payment exceptions; Duplicate contacts; Tracking-category coverage.
4. Planning and trends: Budget vs. actuals; 13-week cash outlook; Expense trend; Collection forecast.

Suggested models: modeled_xero_invoices, modeled_xero_payments, modeled_xero_bank_transactions, modeled_xero_gl.

Output: Build the dashboard if you have permission; otherwise provide the exact
questions, SQL, model definitions, and layout. State refresh time, reporting
currency, accounting basis, and any reconciliation caveats.

How do you sync Xero into a database or warehouse?

Use the Xero Accounting API with OAuth 2.0, webhooks, and incremental extraction where supported. Snapshot report endpoints separately from transaction-level objects so reconciled statements remain explainable.

Xero API or data service

Start from Xero's official interface and authentication documentation. Extract only the finance objects required by the models below.

dlt Xero Accounting pipeline

Load contacts, invoices, payments, bank transactions, and journals through Xero OAuth into a warehouse destination.

Implementation checklist

  1. Create a dedicated read-only integration identity and document its scopes.
  2. Land raw records with source IDs, source timestamps, extraction time, and currency fields intact.
  3. Apply updates and deletes idempotently; keep lifecycle history when aging or process metrics depend on it.
  4. Reconcile modeled totals to Xero for a closed period before exposing the models broadly.
  5. Connect Metabase to the destination database and schedule model refreshes.

Source documentation

What data model should you use?

EntityGrainUse
accountsone row per chart-of-accounts codestatement classification
invoicesone row per customer invoice or vendor billAR, AP, due dates, and status
invoice_linesone row per invoice linerevenue and expense detail
paymentsone row per paymentcollections and settlement
bank_transactionsone row per bank transactioncash and reconciliation

Build reusable models such as modeled_xero_invoices, modeled_xero_payments, modeled_xero_bank_transactions, modeled_xero_gl.

Which finance metrics are useful?

Practical SQL patterns

Accounts receivable agingPostgreSQL
SELECT
  CASE
    WHEN CURRENT_DATE - due_date <= 0 THEN 'Current'
    WHEN CURRENT_DATE - due_date <= 30 THEN '1-30 days'
    WHEN CURRENT_DATE - due_date <= 60 THEN '31-60 days'
    WHEN CURRENT_DATE - due_date <= 90 THEN '61-90 days'
    ELSE '90+ days'
  END AS aging_bucket,
  SUM(amount_due) AS open_amount
FROM modeled_xero_invoices
WHERE invoice_type = 'ACCREC' AND amount_due > 0
GROUP BY 1
ORDER BY MIN(GREATEST(CURRENT_DATE - due_date, 0));
Collected cash by invoice cohortPostgreSQL

Keep invoice issue month separate from payment month to expose collection timing.

SELECT
  date_trunc('month', invoice_date) AS invoice_month,
  date_trunc('month', payment_date) AS payment_month,
  SUM(payment_amount) AS collected_amount
FROM modeled_xero_invoice_payments
WHERE payment_status = 'AUTHORISED'
GROUP BY 1, 2
ORDER BY 1, 2;

Common mistakes

Treating invoice status as payment history.→ Model payments and credit notes separately so partial collections remain visible.
Mixing ACCREC and ACCPAY invoices.→ Separate customer receivables from supplier payables in every model.
Rebuilding financial statements from incomplete extracts.→ Reconcile modeled totals with Xero reports for the same tenant, period, and basis.

Dashboards

Integrations

Analytics

FAQ

Does Xero have an official MCP server?
Xero's developer platform advertises an AI Toolkit that includes an MCP server and agent examples. Confirm the current package and scopes in Xero's docs before production use.
Can I report across several Xero organizations?
Yes. Retain tenant ID on every row, normalize charts of accounts, and use a reporting currency for consolidated views.
Does Metabase connect natively to Xero?
No. Metabase reads supported databases and uploaded tables. Sync Xero data into a database or load a scoped CSV snapshot first.