Skip to main content
Glama
ppiotis

Xero Practice Aggregator MCP

by ppiotis

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
XERO_SCOPESNoExplicit scope list; anything not *.read (plus OIDC/offline_access) is refused
XERO_AGG_DEMONoSet to 1 to serve the bundled fixtures (demo mode, no Xero account needed)off
MCP_AUTH_TOKENNoBearer token required on /mcp (HTTP mode). Always set this on a server
XERO_CLIENT_IDNoXero app client id (live mode)
XERO_SCOPE_SETNoSet to broad for Xero apps created before 2 March 2026granular
XERO_REDIRECT_URINoMust exactly match the app's redirect URIhttp://localhost:5173/oauth/callback
XERO_AGG_TOKEN_KEYNoRequired in live mode. 16+ chars; encrypts the token file
XERO_CLIENT_SECRETNoOnly for Xero "Web app" type. Omit for PKCE-only apps
XERO_AGG_EXPORT_DIRNoWhere month-end packs are written~/.xero-aggregator/exports
XERO_AGG_TOKEN_FILENoEncrypted token store~/.xero-aggregator/tokens.enc
XERO_AGG_SYNC_MINUTESNoPoll interval; 0 disables the timer60

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
connect_org_startA

Creates a Xero OAuth2 (authorization code + PKCE) sign-in link with READ-ONLY scopes. Give the link to the client (or open it yourself if you are their adviser user); they pick their org and approve. Then call connect_org_complete with the URL they were redirected to. Not needed in demo mode.

connect_org_completeA

Exchanges the authorization code from Xero's redirect for tokens, encrypts them at rest, and syncs the new org. Pass the full redirect URL (contains code and state).

list_orgsA

Lists every connected Xero org with sync status, currency and counts. Start here.

sync_nowA

Re-fetches invoices, bills, contacts, bank balances and reports for every connected org into the in-memory cache (nothing financial is written to disk). The poller also does this automatically every XERO_AGG_SYNC_MINUTES.

overdue_invoicesA

Every client invoice (receivable) more than 30, 60 or 90 days past its due date, across all connected orgs, with per-org and per-currency totals. Uses amount still due (part-payments excluded).

payroll_riskA

Ranks orgs by how close they are to missing their next payroll. coverage = (cash in bank - bills due on or before payroll date) / payroll amount. Below 1.0 means a shortfall. Payroll amount defaults to the average of wages/salaries P&L lines over the last 3 months, next payroll date to the next 25th; override with set_payroll_profile. Shows the formula with numbers for each org.

set_payroll_profileA

Overrides the estimated payroll amount and/or next payroll date for one org. Held in memory only (cleared on restart); nothing is sent to Xero.

month_end_packA

Writes an Excel workbook for ONE client with three sheets: Aged Receivables (per invoice, bucketed current/1-30/31-60/61-90/90+ with totals), Bank Reconciliation (closing balance, unreconciled count and amount per account) and P&L Snapshot (latest month and period total). Saved in XERO_AGG_EXPORT_DIR; returns the path and the totals written so you can quote them.

client_healthA

0-100 health score per client from transparent rules (each rule and its points is listed): 90+ day receivables share, payroll coverage, expense spike (z-score of latest month vs trailing months), growing director loan, DSO, unreconciled items, falling income. >=80 healthy, 60-79 watch, <60 at risk. Omit org for all clients.

practice_dashboardA

Practice-level totals: revenue (P&L income) across all clients for the last N months, grouped by currency (never mixes currencies), average DSO, and each client's health band.

clients_trending_troubleA

Clients whose health score is below the threshold (default 80), worst first, with the reasons.

disconnect_orgA

Revokes this app's Xero connection for one org and deletes its stored tokens and cached data. Call first with confirm=false to see what will happen, ask the user, then confirm=true.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 12 tools

Disambiguation4/5

Most tools target clearly distinct resources or analyses (overdue aging, payroll risk, health scoring, exports), and descriptions are unusually detailed. Minor overlap exists among the health/analytics cluster — client_health, clients_trending_trouble and practice_dashboard all surface client health — but their scopes (per-client score, filtered list, practice totals) are explained well enough to route correctly.

Naming Consistency3/5

All names are snake_case, which keeps them readable, but the pattern is mixed: some are verb_noun (list_orgs, sync_now, disconnect_org, set_payroll_profile) while others are bare noun phrases (overdue_invoices, payroll_risk, month_end_pack, client_health, practice_dashboard, clients_trending_trouble). No predictable verb convention ties the set together.

Tool Count5/5

12 tools sits squarely in the well-scoped range for a multi-org finance aggregator. Each tool maps to a distinct capability (auth, sync, org management, several reports, export) and none appear redundant filler.

Completeness4/5

The lifecycle is well covered: OAuth connect start/complete, list, sync, disconnect, plus a rich analytics/reporting surface and an Excel export. Gaps are minor — there's no per-client drill-down or raw invoice/contact retrieval, but agents can work around this via the existing reports.

Maintenance

ActivityMaintained
ResponsivenessNo issues