Xero MCP Server
Official MCP server from Xero that connects AI agents to Xero's accounting platform for invoices, contacts, payments, bank transactions, payroll, and reports.
The Xero MCP Server is the official Model Context Protocol implementation maintained by Xero (XeroAPI). It bridges MCP clients such as Claude Desktop to the Xero accounting API, letting AI agents securely read and write financial data inside a Xero organisation. The server is distributed as the @xeroapi/xero-mcp-server npm package and uses Xero's OAuth2 Custom Connections (or a runtime bearer token) for authentication.
It exposes 60+ tools spanning accounting, payments, and payroll. Read operations include listing accounts, contacts, invoices, items, payments, bank transactions, payroll employees, and standard reports (profit and loss, balance sheet, trial balance, aged receivables/payables). Write operations support creating and updating contacts, invoices, payments, quotes, credit notes, manual journals, items, and bank transactions. Payroll capabilities (NZ and UK regions) cover timesheets, leave records, and leave balances.
As the official server from Xero itself, it is the canonical integration for connecting LLMs to Xero data. It supports two auth modes: a single-org Custom Connection (recommended for personal/Claude Desktop use) and a bearer-token flow for multi-account scenarios where the host performs PKCE/authorization-code OAuth.
Tools
| Tool | Description |
|---|---|
list-accounts |
List chart of accounts from the connected Xero organisation. |
list-contacts |
List contacts (customers and suppliers). |
list-invoices |
List invoices for the organisation. |
list-items |
List inventory items. |
list-payments |
List payments applied to invoices/bills. |
list-bank-transactions |
List bank transactions. |
list-payroll-employees |
List payroll employees (NZ/UK only). |
list-reports |
Retrieve standard reports including Profit and Loss, Balance Sheet, Trial Balance, Aged Receivables, and Aged Payables. |
create-contact |
Create a new contact. |
create-invoice |
Create a new invoice (ACCREC or ACCPAY). |
create-payment |
Record a payment against an invoice. |
create-bank-transaction |
Create a spend or receive bank transaction. |
create-item |
Create an inventory/tracked item. |
create-quote |
Create a sales quote. |
create-manual-journal |
Create a manual journal entry. |
create-credit-note |
Create a credit note. |
update-contact |
Update an existing contact. |
update-invoice |
Update an existing invoice. |
update-item |
Update an inventory item. |
update-manual-journal |
Update a manual journal entry. |
update-quote |
Update a quote. |
update-credit-note |
Update a credit note. |
list-timesheets |
List payroll timesheets. |
create-payroll-timesheet |
Create a payroll timesheet. |
update-payroll-timesheet-line |
Update a timesheet line. |
approve-payroll-timesheet |
Approve a payroll timesheet. |
revert-payroll-timesheet |
Revert an approved timesheet to draft. |
delete-payroll-timesheet |
Delete a timesheet. |
list-leave-balances |
Retrieve employee leave balances. |
list-leave-records |
Retrieve employee leave records. |
Prerequisites
- Node.js v18+ and npm (or pnpm)
- A Xero account (a free trial with a Demo Company works fine for testing)
- A Xero developer app with a Custom Connection configured, giving you
XERO_CLIENT_IDandXERO_CLIENT_SECRET
Install via npx (recommended)
Add the following to your Claude Desktop config (claude_desktop_config.json) or equivalent MCP client config:
{
"mcpServers": {
"xero": {
"command": "npx",
"args": ["-y", "@xeroapi/xero-mcp-server@latest"],
"env": {
"XERO_CLIENT_ID": "your_client_id_here",
"XERO_CLIENT_SECRET": "your_client_secret_here",
"XERO_SCOPES": "accounting.invoices accounting.contacts accounting.settings"
}
}
}
}
NVM users should replace "npx" with the full path to the npx executable.
Environment variables
XERO_CLIENT_ID: Custom Connection client IDXERO_CLIENT_SECRET: Custom Connection client secretXERO_CLIENT_BEARER_TOKEN: Optional. If set, takes precedence over client ID/secret and supports multi-account flowsXERO_SCOPES: Optional, space-separated. Server defaults to V1 scopes for connections created before Apr 29, 2026 and V2 (granular) scopes for newer ones
Local development build
git clone https://github.com/XeroAPI/xero-mcp-server.git
cd xero-mcp-server
npm install
npm run build
Then point your MCP client at the built file:
{
"mcpServers": {
"xero": {
"command": "node",
"args": ["/absolute/path/to/xero-mcp-server/dist/index.js"],
"env": {
"XERO_CLIENT_ID": "your_client_id_here",
"XERO_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}
On Windows, escape backslashes in paths (C:\\projects\\xero-mcp-server\\dist\\index.js). Payroll-related tools require an NZ or UK Xero organisation.
- Draft and send sales invoices in Xero directly from chat by describing the customer and line items
- Pull a profit and loss, balance sheet, or aged receivables report for a given date range and have the agent summarise it
- Reconcile activity by listing recent bank transactions and matching them to invoices or payments
- Create or update contacts (customers/suppliers) and keep details synced from CRM or email threads
- Manage UK/NZ payroll timesheets: create, update lines, and approve via natural language
- "Create a draft invoice in Xero for Acme Ltd: 10 hours of consulting at $150/hr, due in 30 days."
- "Show me the profit and loss report for last quarter and highlight the three biggest expense categories."
- "List all unpaid invoices over 60 days old and draft polite follow-up emails to each contact."
- "Add a new supplier contact for Globex Corp with email ap@globex.com and create a bill for $2,400."
- "Approve all pending timesheets for the current pay period and tell me the total hours by employee."
- Official server maintained by Xero (XeroAPI org), so coverage and auth flows track the platform
- Broad surface area: 60+ tools across accounting, banking, items, quotes, journals, and payroll
- Supports both single-org Custom Connections and multi-account bearer-token flows
- Published as an npm package, so setup is a single
npxcommand with no build step
- Custom Connections require a paid Xero plan for production organisations (Demo Company works for testing)
- Payroll tools are restricted to NZ and UK Xero regions
- Scope management is non-trivial: V1 vs V2 scopes depend on when the connection was created, and may need manual override via
XERO_SCOPES
- john-zhang-dev/xero-mcp: community-maintained Xero MCP server
- CData Xero MCP Server: read-only access via CData JDBC drivers
- QuickBooks or FreshBooks MCP integrations for users on other accounting platforms