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.
How do you connect Xero to Metabase?
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.
- Quick questions about Xero data
- Validating fields and dashboard ideas before building a pipeline
- Loading a minimal, permissioned snapshot into Metabase
- 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
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.
- Recurring finance and leadership dashboards
- Historical aging, lifecycle, and period reporting
- Joining finance data with sales, product, and operations data
- 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?
Finance overview
A compact view of cash, exposure, and operating performance.
- Cash balance and movement
- Revenue and gross margin
- Open receivables
- Bills due
Operations
The work that needs attention before the next close.
- Overdue invoices
- Upcoming bills
- Payments by channel
- Customer and vendor concentration
Controls and reconciliation
Find exceptions before they become close surprises.
- Unreconciled bank transactions
- Invoice-to-payment exceptions
- Duplicate contacts
- Tracking-category coverage
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 csvfor a first snapshot andmb upload replacefor 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
{
"mcpServers": {
"xero": {
"command": "npx",
"args": ["-y", "@xeroapi/xero-mcp-server@latest"],
"env": {
"XERO_CLIENT_ID": "your-client-id",
"XERO_CLIENT_SECRET": "your-client-secret"
}
}
}
}# 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.csvCan 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.
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
- Create a dedicated read-only integration identity and document its scopes.
- Land raw records with source IDs, source timestamps, extraction time, and currency fields intact.
- Apply updates and deletes idempotently; keep lifecycle history when aging or process metrics depend on it.
- Reconcile modeled totals to Xero for a closed period before exposing the models broadly.
- Connect Metabase to the destination database and schedule model refreshes.
Source documentation
What data model should you use?
| Entity | Grain | Use |
|---|---|---|
accounts | one row per chart-of-accounts code | statement classification |
invoices | one row per customer invoice or vendor bill | AR, AP, due dates, and status |
invoice_lines | one row per invoice line | revenue and expense detail |
payments | one row per payment | collections and settlement |
bank_transactions | one row per bank transaction | cash 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?
- Cash balance and runway
- Accounts receivable aging
- Days sales outstanding
- Gross margin
- Budget variance
- Invoice collection rate
Practical SQL patterns
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));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;