# mcp-xero

Connects Xero cloud accounting to your AI assistant. Lets you issue invoices, record payments, and inspect balance sheets directly in chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 274
- Author: codespar
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codespar/mcp-dev-latam/tree/HEAD/packages/erp/xero
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-xero

## What it does

The server exposes 24 tools to interact with Xero accounting. An assistant can look up contacts, draft invoices, void records, email authorized invoices to clients, and log bank transactions. It also pulls financial reports like the balance sheet and inspects the chart of accounts.

Authentication requires two environment variables: `XERO_ACCESS_TOKEN` and `XERO_TENANT_ID`. The server expects an already issued bearer token. Upstream services must handle OAuth token refreshes. Once a token expires, API calls fail with a 401 status.

It runs over stdio with `npx -y @codespar/mcp-xero`. List tools support server-side filtering via the standard Xero `where` query parameter.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `XERO_ACCESS_TOKEN`, `XERO_TENANT_ID` — 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-xero -e XERO_ACCESS_TOKEN=<XERO_ACCESS_TOKEN> -e XERO_TENANT_ID=<XERO_TENANT_ID> -- npx -y @codespar/mcp-xero
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add xero --env XERO_ACCESS_TOKEN=<XERO_ACCESS_TOKEN> --env XERO_TENANT_ID=<XERO_TENANT_ID> -- npx -y @codespar/mcp-xero
```
Replace <…> with your own values

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e XERO_ACCESS_TOKEN=<XERO_ACCESS_TOKEN> -e XERO_TENANT_ID=<XERO_TENANT_ID> xero npx -y @codespar/mcp-xero
```
Replace <…> with your own values

## When to use it
- generate and email invoices to customers
- pull balance sheet reports into chat
- record payments and bank transactions
- filter and manage client contact records

## Example prompts
- List all unpaid invoices in Xero with status AUTHORISED
- Create a new contact for ACME Corp and draft an invoice
- Fetch the balance sheet report for my organization

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44583
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5458
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2814
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2188
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

From the same set: [codespar/mcp-dev-latam](https://affpapa.org/en/nevibecode/by/codespar/mcp-dev-latam.md) — 124 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
