Claude Integration with Xero: A Practical Setup Guide
There is no official, one-click "Claude for Xero" integration as of this writing. If you're looking for that, it doesn't exist yet — Anthropic doesn't ship a Xero connector, and Xero's app marketplace doesn't list a Claude app either. What you can do, and what most finance and product teams actually end up doing, is connect the two systems yourself using Xero's REST API and Claude's tool use (function calling). This guide covers exactly how that works and what it looks like in practice.
The short version: Claude reads and writes to Xero through API calls that you define as "tools." Claude never talks to Xero directly — your backend sits in the middle, translating Claude's requests into authenticated Xero API calls and feeding the responses back. This is the same pattern used for every other Claude-to-SaaS integration that isn't natively supported, and it's more flexible than waiting for an official connector.
Why there's no native integration (yet)
Xero's ecosystem is built around OAuth2-authenticated REST endpoints for invoices, contacts, bank transactions, reports, and payroll. Claude, on the other hand, is a language model with an API for text generation, tool use, and streaming — it has no built-in concept of accounting software. Bridging the two requires:
- A Xero OAuth2 app (client ID/secret, tenant ID, refresh tokens)
- A backend service that exposes Xero actions as callable functions
- A Claude API integration that can invoke those functions mid-conversation
This is a standard tool-use architecture, not a Xero-specific limitation.
Two ways to build the connection
No-code / low-code: Tools like Zapier or Make can trigger on Xero events (new invoice, overdue bill) and pass data to Claude via webhook, then write Claude's output back to a spreadsheet, Slack, or email. This works for simple summarization or notification flows but breaks down fast if you need multi-step reasoning, conversational follow-up, or Claude deciding which Xero endpoint to call.
Direct API integration with tool use: You define Xero operations (get invoice, create bill, fetch bank reconciliation report) as tools in the Claude API request. Claude decides when to call them based on the conversation, your backend executes the actual Xero API call, and the result goes back into the conversation. This is what you need for anything resembling an "AI accountant assistant."
Building it with tool use
Here's a simplified example of defining a Xero-connected tool for Claude:
{
"name": "get_xero_invoice",
"description": "Fetch an invoice from Xero by invoice number",
"input_schema": {
"type": "object",
"properties": {
"invoice_number": { "type": "string" }
},
"required": ["invoice_number"]
}
}
When Claude decides it needs invoice data, it returns a tool call instead of a text answer. Your backend catches that, calls the Xero API (GET /api.xro/2.0/Invoices?InvoiceNumbers=INV-001) with a valid OAuth2 token, and sends the JSON result back to Claude as a tool result. Claude then continues the conversation with real financial data in context — summarizing it, flagging discrepancies, or drafting a follow-up email.
If you're running this through SubToAPI, the request looks like a normal Messages call with tools attached:
curl https://api.subtoapi.app/v1/messages \
-H "Authorization: Bearer $SUBTOAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"tools": [
{
"name": "get_xero_invoice",
"description": "Fetch an invoice from Xero by invoice number",
"input_schema": {
"type": "object",
"properties": { "invoice_number": { "type": "string" } },
"required": ["invoice_number"]
}
}
],
"messages": [
{ "role": "user", "content": "Is invoice INV-1042 overdue?" }
]
}'
SubToAPI handles the Claude side of this (API keys, tool-call routing, streaming, usage metadata per app key) so you can focus on the Xero-facing half: OAuth token refresh, endpoint mapping, and error handling. See /docs/tools for the full tool-use spec and /docs/quickstart to get an app key running in a few minutes.
What people actually build with this
- Invoice and bill summarization — feed a batch of overdue invoices into Claude and get a plain-English summary for a founder who doesn't want to open Xero.
- Expense categorization assistance — Claude proposes account codes for uncategorized bank transactions, which a human reviews before posting.
- Financial report Q&A — connect Claude to Xero's Profit and Loss or Balance Sheet report endpoints so finance staff can ask "how did marketing spend change quarter over quarter?" in natural language.
- Reconciliation flagging — Claude compares bank transaction descriptions against invoice records and flags likely mismatches for a bookkeeper to confirm.
None of these replace a human reviewer — Xero data feeds tax filings and payroll, so anything Claude drafts (categorizations, matched transactions, report commentary) should go through approval before it's posted.
Auth and security notes
Xero's OAuth2 tokens are short-lived and tenant-scoped, so your backend needs a refresh flow independent of whatever you use for Claude. Keep the two credential sets separate: Xero client secrets stay in your server environment, and your Claude API key (a SubToAPI sub_live_... key, for example) is scoped to your application, not to a specific Xero organization. This separation matters if you're serving multiple Xero tenants from one app — you don't want a token leak in one system compromising the other.
If multiple people on your team are building or maintaining this integration, SubToAPI's team seats (from the Team plan at /pricing) let you share usage visibility and manage keys per environment without passing around a single shared credential.
Getting started
- Register a Xero OAuth2 app in the Xero Developer portal and note your client ID/secret.
- Sign up for a Claude API key — SubToAPI's free trial at /signup gets you a
sub_live_key without going through Anthropic's separate provisioning. - Define your Xero tools (invoice lookup, report fetch, transaction search) following /docs/tools.
- Build the backend loop: Claude requests a tool → your server calls Xero → result goes back to Claude.
- Add streaming (/docs/streaming) if you want responses to appear incrementally in a chat UI rather than as a single blocked-until-done response.
questions
Is there an official Claude app in the Xero marketplace? No. As of now, Xero's app store doesn't list a Claude integration, and Anthropic doesn't publish one either. Any connection between the two is custom-built using Xero's REST API and Claude's tool-use feature.
Can I connect Claude to Xero without writing code? Partially. Zapier and Make can wire simple triggers (like a new overdue invoice) to a Claude prompt and post the result somewhere. For anything involving multi-step decisions or Claude choosing which Xero data to fetch, you need a backend with tool use.
What's the fastest way to get a working Claude API key for this? Sign up at /signup for a free trial, generate a sub_live_ key from the dashboard, and follow /docs/quickstart. You'll have a working Messages call within a few minutes, ready to wire up tool definitions for Xero.