# Xero

Bridges Xero accounting into an AI agent over MCP: invoices, contacts, payments, quotes and financial reports. Handy when you want Xero data inside the chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 13
- Author: mindstone
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mindstone/mcp-servers/tree/HEAD/connectors/xero
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/xero

## What it does

The server sits between an MCP client and the Xero API. Your agent gets tools named `list-invoices`, `list-contacts`, `create-contact`, `list-accounts`, `list-profit-and-loss`, `list-bank-summary`, `list-budget-summary` and `list-executive-summary`, and uses them to read or create records in an organisation.

OAuth2 comes in two flavours. Custom Connections suits testing and development: you supply a client id and secret scoped to one organisation. A bearer token is the pick when several Xero accounts run at once and the client handles an auth flow such as PKCE itself. Set both and `XERO_CLIENT_BEARER_TOKEN` wins over `XERO_CLIENT_ID`.

Node.js v20 or higher, npm or pnpm, and a Xero developer account with API credentials are required. Tool names here carry no prefix and use dash-case, so in a host running several MCP servers they can clash with someone else's `list-*` — turn on namespacing if your host offers it. Payroll queries only work when the organisation region is NZ or UK.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `XERO_CLIENT_ID`, `XERO_CLIENT_SECRET`, `XERO_CLIENT_BEARER_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-server-xero -e XERO_CLIENT_ID=<XERO_CLIENT_ID> -e XERO_CLIENT_SECRET=<XERO_CLIENT_SECRET> -e XERO_CLIENT_BEARER_TOKEN=<XERO_CLIENT_BEARER_TOKEN> -- npx -y @mindstone/mcp-server-xero
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add xero --env XERO_CLIENT_ID=<XERO_CLIENT_ID> --env XERO_CLIENT_SECRET=<XERO_CLIENT_SECRET> --env XERO_CLIENT_BEARER_TOKEN=<XERO_CLIENT_BEARER_TOKEN> -- npx -y @mindstone/mcp-server-xero
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "xero": {
            "command": "npx",
            "args": [
                "-y",
                "@mindstone/mcp-server-xero"
            ],
            "env": {
                "XERO_CLIENT_ID": "<XERO_CLIENT_ID>",
                "XERO_CLIENT_SECRET": "<XERO_CLIENT_SECRET>",
                "XERO_CLIENT_BEARER_TOKEN": "<XERO_CLIENT_BEARER_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "xero": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@mindstone/mcp-server-xero"
            ],
            "env": {
                "XERO_CLIENT_ID": "<XERO_CLIENT_ID>",
                "XERO_CLIENT_SECRET": "<XERO_CLIENT_SECRET>",
                "XERO_CLIENT_BEARER_TOKEN": "<XERO_CLIENT_BEARER_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e XERO_CLIENT_ID=<XERO_CLIENT_ID> -e XERO_CLIENT_SECRET=<XERO_CLIENT_SECRET> -e XERO_CLIENT_BEARER_TOKEN=<XERO_CLIENT_BEARER_TOKEN> xero npx -y @mindstone/mcp-server-xero
```
Replace <…> with your own values

## When to use it
- pull a list of invoices into the chat
- create a contact in the ledger without typing it by hand
- read the profit and loss report
- compare budget against actuals
- check per-account bank balances and movements

## Example prompts
- List every unpaid Xero invoice for this quarter
- Create a Xero contact named Acme with email info@example.com
- Show the profit and loss report for the demo company

## Similar
- [mcp-xero](https://affpapa.org/en/nevibecode/mcp/mcp-xero.md) — MCP server · ★ 274
- [tax-prep](https://affpapa.org/en/nevibecode/skills/tax-prep.md) — skill · 1800 installs
- [fortnox](https://affpapa.org/en/nevibecode/mcp/fortnox.md) — MCP server · ★ 45
- [mcp-quickbooks](https://affpapa.org/en/nevibecode/mcp/mcp-quickbooks.md) — MCP server · ★ 274
- [e-arveldaja-mcp](https://affpapa.org/en/nevibecode/mcp/e-arveldaja-mcp.md) — MCP server · ★ 39
- [cash-flow-snapshot](https://affpapa.org/en/nevibecode/skills/cash-flow-snapshot.md) — skill · 1900 installs

From the same set: [mindstone/mcp-servers](https://affpapa.org/en/nevibecode/by/mindstone/mcp-servers.md) — 24 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
