Connect Xero to Claude Code
Read Xero invoices, contacts, accounts, bank transactions, payments, and the two headline reports. Add Toolspoke to Claude Code once and it can use 10 Xero actions. Your Xero credential stays in Toolspoke, and you choose which actions Claude Code may call.
Set it up in Claude Code
Three steps, the first one once for every toolkit you will ever add.
Add Toolspoke to Claude Code
Run it in your project, then /mcp to sign in
claude mcp add --transport http toolspoke https://toolspoke.com/mcpThe sign-in opens in your browser, and Toolspoke asks you to approve it.
Install Xero and connect it
Add Xero to a project in your Toolspoke workspace.
Sign in with Xero. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- Xero organisation (tenant) ID
- Xero sends this header on every call to say which organisation to read. Filled in for you when you sign in with Xero, from the most recently connected organisation in GET https://api.xero.com/connections; change it here to read another organisation the same sign-in can reach, where each entry's tenantId is one organisation.
Choose what Claude Code may do
All 10 actions only read, and any of them can be switched off for a project.
What you can ask Claude Code for
A few of the Xero actions that only read, so they are safe to try first.
- Return the chart of accounts: every account with its code, name, type, tax type, class and status
- List invoices and bills
- Run the Profit and Loss report and return it as Xero's row-and-cell report structure
- Run the Balance Sheet report and return it as Xero's row-and-cell report structure
What Claude Code can do in Xero
10 actions read.
Reads
List organisations
Return the organisation this connection is pointed at: its name, legal name, country, base currency, financial year end, tax settings and edition. Xero's route is singular, /Organisation, and the payload comes back under a plural Organisations key, that is Xero's shape, not a mistake here. This is the connection test: it needs nothing, costs nothing, names no person, and it is the one call that proves the tenant id in the credential actually resolves to a set of books this sign-in can read.
List accounts
Return the chart of accounts: every account with its code, name, type, tax type, class and status. This is the organisation's accounting structure rather than anybody's data, so it is the map to read before interpreting an invoice line or a report row. Its response is kept in the audit log for that reason, an agent that has to reason about where a figure came from needs the account list in front of it. Narrow with `where`, e.g. Type=="BANK", or Status=="ACTIVE".
List invoices
List invoices and bills. Xero keeps both in this one resource and separates them by Type, ACCREC for what you have billed a customer and ACCPAY for what a supplier has billed you. Narrow before you fetch: `statuses` takes a comma-separated list such as AUTHORISED,PAID, `where` filters on any field, and `search_term` matches the invoice number and reference. Set summary_only for a much lighter response without line items, which is what you want when counting or listing. Xero pages this 100 at a time by default; ask for a page with `page`. Its response is kept out of the audit log because an invoice names a real customer or supplier and what they were charged.
Get invoice
Fetch one invoice by its InvoiceID, with its full line items, the contact it belongs to, its payments, credit notes and prepayments, and its running amounts due and paid. Ids come from list_invoices. Its response is kept out of the audit log, it names a counterparty and the amounts between you.
List contacts
List the customers and suppliers on the organisation, with their names, contact people, email addresses, addresses, tax numbers and outstanding balances. `search_term` matches name, first name, last name, contact number and email address, which is the fastest way from a person's name to a ContactID. Set summary_only for a lighter response. Its output is kept out of the audit log and `where` and `search_term` are masked before the call is logged, because both the answer and the question name real people.
Get contact
Fetch one customer or supplier by ContactID, with their full record: addresses, phone numbers, email, tax number, default account codes, payment terms and outstanding balances. Ids come from list_contacts. Xero accepts no query parameters at all on this route. Its response is kept out of the audit log, it is one named person or company and their details.
List bank transactions
List money in and out of the organisation's bank accounts, spend and receive transactions, with the contact, the bank account, the line items and the reconciliation state. This is the cash view, as opposed to the invoice view: an invoice is what was billed, a bank transaction is what actually moved. Narrow with `where`, e.g. Status=="AUTHORISED", or by bank account. Kept out of the audit log because each row names a counterparty and an amount.
List payments
List payments applied against invoices and credit notes, with the invoice each one settles, the account it went through, the amount and the date. Use it to answer "has this been paid, and when" without pulling whole invoices. Narrow with `where`, e.g. Status=="AUTHORISED", or Date>=DateTime(2026,08,01). Kept out of the audit log because a payment names the counterparty it settles with.
Get profit and loss
Run the Profit and Loss report and return it as Xero's row-and-cell report structure. Every parameter is optional: with none, Xero reports the current month. Pass from_date and to_date for an explicit range, both as YYYY-MM-DD, or use periods together with timeframe to compare several periods side by side, periods 1 to 11, timeframe MONTH, QUARTER or YEAR. The response is aggregate figures with no customer or supplier named in it, which is why, unlike the invoice and contact reads here, it is kept in the audit log: a number an agent reported should be checkable afterwards.
Get balance sheet
Run the Balance Sheet report and return it as Xero's row-and-cell report structure. Note the difference from the Profit and Loss: a balance sheet is a position at a single moment, so it takes `date` rather than a range, and Xero defaults to the end of the current month. Add periods and timeframe to show prior positions beside it. Note too that Xero's tracking parameters are named differently on this report, trackingOptionID1 and trackingOptionID2, with no category parameter, which is Xero's own asymmetry and not a typo here. Aggregate figures, no counterparties, so the response is kept in the audit log.
Xero in Claude Code: questions
Does Claude Code see my Xero credential?
No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.
Will 10 actions crowd Claude Code's context?
No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Xero action it needs when it needs it. Adding more toolkits does not add more tools to its list.
Can I add it once for every project?
Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.
What does it cost?
Tool calls are free on every plan, and a Xero call does not run in a sandbox, so it bills nothing.
Xero in your other apps
Try Xero in Claude Code
Free to start, and tool calls cost nothing on any plan.