superfast-xero-mcp
v0.2.1
Published
MCP server for the Xero Accounting and Payroll (UK) APIs — schema discovery, generic API passthrough, and convenience tools for reports, invoices, employees, pay runs and payslips
Downloads
57
Maintainers
Readme
Superfast Xero MCP Server
A full-passthrough MCP server for the Xero Accounting API and Xero Payroll UK API. Every endpoint of both APIs is accessible — not a curated subset.
Forked from xero-accounting-mcp by Simon Smyth, with added Payroll (UK) support. Inspired by the ConnectWise RMM MCP pattern: load the official OpenAPI specs, expose schema discovery tools so the LLM can explore the APIs, and provide a generic xero_api_call tool that hits any endpoint.
What It Does
3 layers of access:
- Schema Discovery — The server loads Xero's official OpenAPI specs (Accounting: 138 paths; Payroll UK: 47 paths). The LLM can browse available endpoints, search by keyword, and inspect parameters/schemas before making calls.
- Generic Passthrough —
xero_api_calllets you hit any Xero Accounting or Payroll endpoint with any method, body, and query params. Full API, no restrictions. - Convenience Tools — Pre-built tools for common operations (P&L, Balance Sheet, Invoices, Employees, Pay Runs, etc.) so the LLM doesn't have to look up the path every time.
27 tools total:
| Category | Tools |
|---|---|
| Schema Discovery | xero_get_schema_overview, xero_get_endpoint_details, xero_search_endpoints |
| Generic Passthrough | xero_api_call (accounting + payroll) |
| Reports | P&L, Balance Sheet, Budget Summary, Executive Summary, Trial Balance, Bank Summary, Aged Payables, Aged Receivables |
| Data | Organisation, Accounts, Invoices, Contacts, Journals, Tracking Categories, Tax Rates, Budgets, Bank Transactions, Payments, Credit Notes |
| Payroll (UK) | xero_payroll_get_employees, xero_payroll_get_pay_runs, xero_payroll_get_payslips, xero_payroll_get_leave |
Requirements
- Node.js 18+
- A Xero app with client_credentials grant (Custom Connection in the Xero developer portal)
- Scopes:
accounting.reports.read,accounting.transactions.read,accounting.contacts.read,accounting.settings.read,accounting.budgets.read,accounting.journals.read - For payroll:
payroll.employees.read,payroll.payruns.read,payroll.payslip.read,payroll.timesheets.read,payroll.settings.read— optional; if your Xero app hasn't been granted these, the server automatically falls back to accounting-only - Your Xero tenant ID (found in the Xero developer portal under your connected tenant)
Note on payroll access: anyone with the Custom Connection credentials can read all payroll data (payslips, salaries, etc.). If you're sharing credentials across a team, consider a second Custom Connection without payroll scopes for general use.
Install
Option 1: npx (no clone needed)
npx superfast-xero-mcpOption 2: Clone and build locally
git clone https://github.com/jamescash1976/xero-mcp.git
cd xero-mcp
npm install
npm run buildConfigure
Set these environment variables:
XERO_CLIENT_ID=your_client_id
XERO_CLIENT_SECRET=your_client_secret
XERO_TENANT_ID=your_tenant_idYou'll find the Client ID and Secret in the Xero Developer Portal under your Custom Connection app. The Tenant ID is shown when you connect a tenant to your app.
🤖 Ask Claude to Set It Up For You
Copy this prompt and paste it into Claude Code, Claude Desktop, or any Claude session:
Set up the Xero MCP server for me. The npm package is `superfast-xero-mcp`.
1. Ask me whether I want this for Claude Code, Claude Desktop, or Claude Cowork.
2. Help me get my Xero credentials:
- Go to https://developer.xero.com/app/manage and create or open a Custom Connection app
- Copy the Client ID and Client Secret
- Connect a tenant and copy the Tenant ID
3. If Claude Desktop/Cowork: add the MCP server config to claude_desktop_config.json
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\Claude\claude_desktop_config.json
- Use npx so no global install is needed
4. If Claude Code: add it as an MCP server in .claude/settings.json or .mcp.json
5. Tell me to restart Claude after the config is savedNon-technical users can just say "set up the Xero MCP server" and Claude will walk them through it step by step — choosing where to install it, getting their Xero credentials, and writing the config.
Claude Desktop Setup
Add to your claude_desktop_config.json:
npx:
{
"mcpServers": {
"xero": {
"command": "npx",
"args": ["-y", "superfast-xero-mcp"],
"env": {
"XERO_CLIENT_ID": "your_client_id",
"XERO_CLIENT_SECRET": "your_client_secret",
"XERO_TENANT_ID": "your_tenant_id"
}
}
}
}Local build:
{
"mcpServers": {
"xero": {
"command": "node",
"args": ["/absolute/path/to/xero-mcp/dist/index.js"],
"env": {
"XERO_CLIENT_ID": "your_client_id",
"XERO_CLIENT_SECRET": "your_client_secret",
"XERO_TENANT_ID": "your_tenant_id"
}
}
}
}Claude Desktop config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
After editing, restart Claude Desktop completely.
Claude Code Setup
Add to your project's .mcp.json or global ~/.claude/settings.json:
{
"mcpServers": {
"xero": {
"command": "npx",
"args": ["-y", "superfast-xero-mcp"],
"env": {
"XERO_CLIENT_ID": "your_client_id",
"XERO_CLIENT_SECRET": "your_client_secret",
"XERO_TENANT_ID": "your_tenant_id"
}
}
}
}OpenClaw Setup
Add to your openclaw.yaml under mcpServers:
mcpServers:
xero:
command: npx
args: [-y, superfast-xero-mcp]
env:
XERO_CLIENT_ID: your_client_id
XERO_CLIENT_SECRET: your_client_secret
XERO_TENANT_ID: your_tenant_idUsage Examples
Once running, ask your LLM:
- "What Xero API endpoints are available for invoices?"
- "Get my P&L for this year so far"
- "Search Xero endpoints for bank reconciliation"
- "Call the Xero API to get invoice INV-01234"
- "List the payslips from the most recent pay run"
- "How much annual leave does each employee have remaining?"
The LLM will use schema discovery tools to find the right endpoint, then xero_api_call or a convenience tool to execute.
Payroll quirk: Xero returns pay runs oldest-first with no sort option — the tool descriptions tell the LLM to fetch the last page for recent pay runs.
Rate Limits
Xero enforces:
- 60 calls/min per tenant
- 5,000 calls/day (Core+ tier)
- 5 concurrent requests max
- On 429: respect
Retry-Afterheader
License
ISC — original work © Simon Smyth (xero-accounting-mcp); payroll additions © James Cash / Superfast IT.
