---
title: "Connect Claude to Xero with MCP: a step-by-step guide"
description: "Connect Claude to Xero through one MCP server. Store the Xero tokens once, give Claude a read-only key with a cap, then add writes behind an approval."
canonical: https://actionlake.com/guides/connect-claude-to-xero
updated: 2026-10-24
---

Guide · Xero

# How to connect Claude to Xero (MCP), step by step

**On this page**

Updated 24 October 2026 Published 22 October 2026 By the actionlake team

To connect Claude to Xero, add actionlake, an MCP gateway, to Claude as a remote MCP server (`https://connect.actionlake.com/mcp`), store your Xero OAuth tokens as a connection, and give Claude an API key that may only read Xero. Claude can then answer questions such as "which invoices are more than 30 days overdue?" in plain words. Each call runs inside the key's limits, and actionlake records it in a hash-chained ledger. The agent never sees a Xero token.

**Start free - 100,000 calls a month, no card.** [Create a sandbox](https://actionlake.com/console) or read the [quickstart](https://actionlake.com/docs/quickstart).

[Start free](https://actionlake.com/console?start=sandbox)

This guide takes about fifteen minutes. Most of that time is in Xero's developer portal. Claude can store the connection and run every query for you; you mint the keys yourself, because keys are never minted over an OAuth connection.

## What you need

| You need | Why | Where |
| --- | --- | --- |
| Claude (the Claude app or Claude Code) | The MCP client that talks to actionlake | claude.ai or your terminal |
| An actionlake tenant | Holds the Xero credential, the keys and the record | Free; the consent page creates one |
| Admin access to a Xero organisation | To approve the app's access once | Xero |
| A Xero developer app | Xero issues OAuth tokens to an app, not to a person | developer.xero.com |

actionlake is an [MCP gateway](https://actionlake.com/glossary/mcp-gateway): one [remote MCP server](https://actionlake.com/glossary/remote-mcp-server) in front of every system you connect. Xero is one of them. The [Xero connector](https://actionlake.com/connectors/xero) covers invoices, contacts, bills, payments, accounts and more, and each action is marked as a read, a write or a destructive change.

## Step 1: Add actionlake to Claude

**Claude Code.** Run one command:

```bash
claude mcp add --transport http actionlake https://connect.actionlake.com/mcp
```

Start `claude`. On the first tool call that needs a tenant, Claude Code opens the actionlake consent page in your browser. Paste an API key, or press **Create one** to make a free sandbox tenant on the spot (no signup, no card). Approve, and Claude has eight tools: `help`, `find_actions`, `get_action`, `do`, `ask`, `check`, `cost` and `account`.

**The Claude app.** Open Settings, then Connectors, then **Add custom connector**. Name it `actionlake`, paste `https://connect.actionlake.com/mcp`, add it, then press Connect. The same consent page opens; paste an existing actionlake key there. Creating a new sandbox from the Claude app is not yet tested by us, so if **Create one** fails there, create the sandbox in Claude Code or the [console](https://actionlake.com/console) and paste its key. On Team and Enterprise plans, your workspace owner may need to add the connector.

> We tested Claude Code end to end, and the Claude app with an existing key. The connector uses OAuth 2.1 with dynamic client registration, so there is no client id to copy.

## Step 2: Create a Xero app and get its tokens

Xero gives API access to an app that a Xero user has approved. Make one app for your business:

1. Sign in at developer.xero.com and create a new app of type **Web app**.
2. Set a redirect URI that your OAuth tool can receive.
3. Request `offline_access` (this returns a refresh token) and the accounting scopes your agent needs, such as read access to transactions and contacts.
4. Run the authorisation once. A Xero admin approves the app for the organisation. You receive an access token and a refresh token.
5. Keep the app's client id and client secret. actionlake uses them to renew the access token when it expires.

Creating the app and approving it are the steps a person must do. That is how OAuth works, and it happens once per organisation, not once per agent.

## Step 3: Store the Xero connection

Ask Claude: "Connect Xero for me." Claude first asks actionlake what Xero needs. The call is free:

```json
{ "op": "connections.requirements", "service": "xero" }
```

At the time of writing, the answer asks for four secrets and one setting. Claude then sends the connection:

```json
{
  "op": "connections.create",
  "service": "xero",
  "name": "default",
  "secrets": {
    "access_token": "…",
    "refresh_token": "…",
    "client_id": "…",
    "client_secret": "…"
  },
  "setup_data": { "tenant_scope_id": "your-xero-tenant-id" }
}
```

The secrets are sealed with AES-256-GCM under your tenant's own data key the moment they arrive. No endpoint returns them, and they never enter a prompt. `tenant_scope_id` is the Xero organisation to act on. Connected to several organisations? Give each connection its own `name`; Claude names the one to use on each call.

If you would rather not paste tokens into a chat, enter them in the console instead: [actionlake.com/console](https://actionlake.com/console), then Connections.

## Step 4: Give Claude a read-only key

If you pressed **Create one** in step 1, the key behind Claude is your tenant's root key, and it can do everything. Do not leave an agent on that key for daily work. Mint a narrower one. Keys are minted with an API key itself or in the console (Keys, then New key), never through an OAuth token, so this step is yours:

```bash
curl -X POST https://api.actionlake.com/v1/account/keys.create \
  -H "Authorization: Bearer $ACTIONLAKE_ROOT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "claude-xero-reader",
    "allowed_actions": ["xero.read:*"],
    "cap_calls": 2000,
    "confirm_policy": "human"
  }'
```

- `xero.read:*` lets the key run every Xero read and nothing else. A write is refused before it reaches Xero. See [AI agent permissions](https://actionlake.com/glossary/ai-agent-permissions).
- `cap_calls` is a hard limit in [upstream calls](https://actionlake.com/glossary/upstream-call). At the cap, the next call is refused before it is sent. See [agent spending cap](https://actionlake.com/glossary/agent-spending-cap).
- `confirm_policy: human` means a destructive action can never be confirmed by the agent itself.

Disconnect and reconnect the connector in Claude, and paste this key on the consent page. Claude now works under it.

## Step 5: Ask Claude about your Xero data

Ask in plain words:

- "Which invoices are overdue by more than 30 days, and how much is owed in total?"
- "List the bills due this week."
- "Find the contact for Acme and show their last three invoices."

Claude finds the right action with `find_actions`, reads its schema with `get_action`, and runs it with `do`. For the first question, the call looks like this:

```json
{
  "action": "xero.invoices.list",
  "input": { "status": "AUTHORISED", "where": "Type==\"ACCREC\"", "order": "DueDate ASC" },
  "limit": 100,
  "intent": "The user asked which customer invoices are more than 30 days overdue."
}
```

`intent` is required on every run. It is the agent's own one-sentence reason, and it is stored with the record of the call. See [agent intent](https://actionlake.com/glossary/agent-intent).

## Step 6 (optional): Let Claude write, behind an approval

Reading is where most teams start. When you want Claude to draft invoices or update contacts, widen the key and gate the writes. Send `keys.update` with your root key, as in step 4, or edit the key in the console:

```json
{
  "key_id": "…",
  "allowed_actions": ["xero.read:*", "xero.invoices.create", "xero.contacts.update"],
  "approval_rules": [
    { "match": "xero.write:*", "approver": "finance-lead@example.com" }
  ]
}
```

Now a `do` on `xero.invoices.create` does not run at once. It waits. The finance lead gets an email with a signed link, or decides in the console, and the call runs only after they approve. Under `confirm_policy: human`, a write that creates or changes a billing record, such as an invoice, also needs an explicit `confirm: true`. A destructive action, such as `xero.invoices.void`, needs a person's approval: the agent cannot confirm it on its own. See [human-in-the-loop approval](https://actionlake.com/glossary/human-in-the-loop-approval).

Before anything runs, Claude can call `check` with the same payload. It validates the input, the key's permissions and the connection, and says what the call will cost. It is free and sends nothing to Xero. See [dry run](https://actionlake.com/glossary/dry-run).

## What it costs

actionlake bills the upstream call: one HTTP request sent to Xero that returned a definitive answer.

| What happens | Billed? |
| --- | --- |
| A page of invoices fetched from Xero | 1 upstream call |
| The same read answered from the cache | Free |
| `help`, `find_actions`, `get_action`, `check`, `cost`, `account` | Free |
| A call Xero answers with 401, 403, 429, a 5xx or a timeout | Free |
| A call refused by your key or your cap | Free, nothing was sent |

The Free plan includes 100,000 upstream calls a month and stops there, so it cannot overrun. Paid plans start with Starter at US$49 a month for 250,000 calls. See [pricing](https://actionlake.com/pricing).

## Several Xero organisations

Accountants and bookkeepers often look after many organisations. Connect each Xero organisation as its own named connection, each with its own `tenant_scope_id`. The agent names the connection, and with it the organisation, on every call, and the record shows which organisation each call reached.

## Xero's own MCP server, or a gateway?

Xero publishes its own MCP server, `@xeroapi/xero-mcp-server` ([XeroAPI on GitHub](https://github.com/XeroAPI/xero-mcp-server), checked 22 October 2026). Your MCP client launches it on your own computer, with a Xero app's client id and secret, or a bearer token, in its settings. For one person using Xero in one client, that may be all you need.

## Xero plus your other systems

The reason to reach Xero through a gateway, rather than a Xero-only server, is everything else: one hosted URL for every agent, a key per agent with a cap and approval rules, a record of every call, and your other systems behind the same URL. The same tenant can hold your PSA, CRM or payroll. Claude can then ask one question across two systems with `ask`, and only the answer comes back. Guides: [joining Autotask tickets with Xero invoices](https://actionlake.com/guides/autotask-tickets-and-xero-invoices) and [MCP server vs MCP gateway](https://actionlake.com/guides/mcp-server-vs-mcp-gateway).

## Frequently asked questions

**Does Claude see my Xero password or tokens?**

No. The tokens are sealed in actionlake's credential vault and attached to the request only at the moment it is sent to Xero. Claude holds an actionlake key, never a Xero credential. No actionlake endpoint returns a stored secret.

**Can Claude create or void invoices?**

Only if its key allows it. A key with xero.read:* can only read. You can allow named write actions and put them behind an approval rule, so each one waits for a person you name. Voiding is a destructive action and needs an explicit confirmation as well.

**Can I connect more than one Xero organisation?**

Yes. Each organisation is its own connection with its own name. Every call names the connection it uses, and the record shows which organisation each call reached.

**Where is my data stored?**

actionlake runs in one region: DigitalOcean's Sydney region, in Australia. Credentials, cached responses and records are stored there at rest. No model runs on your data, and your traffic is not used for training. Details are on the trust page.

See [trust page](https://actionlake.com/trust)

**Start free - 100,000 calls a month, no card.** [Create a sandbox](https://actionlake.com/console), connect Xero, and ask your first question in minutes.

[Start free](https://actionlake.com/console?start=sandbox)

## Related guides

- [Guide · Cross-system Cross-system questions: joining Autotask tickets with Xero invoices using an AI agent](https://actionlake.com/guides/autotask-tickets-and-xero-invoices)
- [Guide · Architecture MCP server vs MCP gateway: what you need for production agents](https://actionlake.com/guides/mcp-server-vs-mcp-gateway)
- [Guide · Autotask Connect Claude, or another MCP client, to Autotask PSA](https://actionlake.com/guides/connect-claude-to-autotask)

[All guides](https://actionlake.com/guides)

## Try it on your own systems.

[Start free](https://actionlake.com/console?start=sandbox) [See pricing](https://actionlake.com/pricing)

100,000 free calls a month. No card. Hard caps on every key.

---

Source: https://actionlake.com/guides/connect-claude-to-xero
More: https://actionlake.com/llms.txt
