# Xero MCP server

> Read and create Xero accounting data: contacts, invoices, payments, payroll records and financial reports.

- Listing: https://mcp.tc/i/xero
- Connect: this is a local (stdio) server; install it on your machine (see Install). The listing link is a page, not an MCP endpoint.
- Type: local (stdio)
- Auth: API key
- Category: [Finance & Payments](https://mcp.tc/c/finance-payments)
- Vendor: Xero
- Verified: yes, mcp.tc checked that this is the official server (https://mcp.tc/verify). It says who runs the server, not that it is safe.
- Repository: <https://github.com/XeroAPI/xero-mcp-server>
- Package: npm `@xeroapi/xero-mcp-server`

## About

Connects an assistant to the Xero accounting API. It can list accounts, contacts, invoices, credit notes, quotes, payments, bank transactions, manual journals and tax rates, and pull reports such as profit and loss, balance sheet, trial balance and aged receivables or payables. It can also create contacts, invoices, credit notes, quotes, payments, items, bank transactions and manual journals, and read payroll employees, leave and timesheets.

Runs locally over stdio with npx and Node.js 18 or higher. Authentication uses a Xero custom connection (XERO\_CLIENT\_ID and XERO\_CLIENT\_SECRET) or an existing OAuth bearer token (XERO\_CLIENT\_BEARER\_TOKEN). Payroll queries need an NZ or UK organisation.

## What it can do

- List contacts, accounts, items, tax rates and tracking categories
- List and create invoices, credit notes and quotes
- List and create payments and bank transactions
- Create manual journals
- Run profit and loss, balance sheet and trial balance reports
- Get aged receivables and payables by contact
- Read payroll employees, leave balances and timesheets

## Example prompts

- "List all unpaid invoices in Xero from the last 30 days"
- "Create an invoice for Acme Ltd for 10 hours of consulting"
- "Show the profit and loss report for last quarter"
- "Get aged receivables for the contact Bright Studio"

## Install

### Claude Code

1. Run this in a terminal, in your project folder:

```bash
claude mcp add --transport stdio xero --env "XERO_CLIENT_ID=<YOUR_XERO_CLIENT_ID>" --env "XERO_CLIENT_SECRET=<YOUR_XERO_CLIENT_SECRET>" -- npx -y @xeroapi/xero-mcp-server@latest
```

2. Start Claude Code and type `/mcp`. **xero** should show as connected.

Add `--scope user` to make it available in every project. Replace the placeholders with your own values.

### Claude Desktop

1. Open **Settings → Developer → Edit Config**. It opens `claude_desktop_config.json`. Add:

`claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "<YOUR_XERO_CLIENT_ID>",
        "XERO_CLIENT_SECRET": "<YOUR_XERO_CLIENT_SECRET>"
      }
    }
  }
}
```

2. Save the file and restart Claude Desktop. Replace the placeholders with your own values.

Needs Node.js on your computer. The file lives in `~/Library/Application Support/Claude/` on macOS and `%APPDATA%\Claude\` on Windows.

### Cursor

[Add to Cursor](<https://cursor.com/install-mcp?name=xero&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB4ZXJvYXBpL3hlcm8tbWNwLXNlcnZlckBsYXRlc3QiXSwiZW52Ijp7IlhFUk9fQ0xJRU5UX0lEIjoiPFlPVVJfWEVST19DTElFTlRfSUQ%2BIiwiWEVST19DTElFTlRfU0VDUkVUIjoiPFlPVVJfWEVST19DTElFTlRfU0VDUkVUPiJ9fQ%3D%3D>) (opens Cursor)

Or add it by hand to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (this project):

`mcp.json`:

```json
{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "<YOUR_XERO_CLIENT_ID>",
        "XERO_CLIENT_SECRET": "<YOUR_XERO_CLIENT_SECRET>"
      }
    }
  }
}
```

Needs Node.js on your computer. Replace the placeholders with your own values.

### VS Code

Add it to `.vscode/mcp.json`. VS Code asks for the secret the first time and stores it securely:

`.vscode/mcp.json`:

```json
{
  "servers": {
    "xero": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "<YOUR_XERO_CLIENT_ID>",
        "XERO_CLIENT_SECRET": "${input:xero-client-secret}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "xero-client-secret",
      "description": "XERO_CLIENT_SECRET",
      "password": true
    }
  ]
}
```

Needs Node.js on your computer.

### Devin Desktop

1. Add it to `~/.config/devin/mcp_config.json` (macOS and Linux) or `%APPDATA%\devin\mcp_config.json` (Windows):

`mcp_config.json`:

```json
{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "<YOUR_XERO_CLIENT_ID>",
        "XERO_CLIENT_SECRET": "<YOUR_XERO_CLIENT_SECRET>"
      }
    }
  }
}
```

2. Refresh the MCP server list in Cascade. Replace the placeholders with your own values.

Devin Desktop is the new name for Windsurf.

### Codex

```bash
codex mcp add xero --env "XERO_CLIENT_ID=<YOUR_XERO_CLIENT_ID>" --env "XERO_CLIENT_SECRET=<YOUR_XERO_CLIENT_SECRET>" -- npx -y @xeroapi/xero-mcp-server@latest
```

Or edit `~/.codex/config.toml` directly:

`config.toml`:

```toml
[mcp_servers.xero]
command = "npx"
args = ["-y", "@xeroapi/xero-mcp-server@latest"]
env = { XERO_CLIENT_ID = "<YOUR_XERO_CLIENT_ID>", XERO_CLIENT_SECRET = "<YOUR_XERO_CLIENT_SECRET>" }
```

Needs Node.js on your computer. Replace the placeholders with your own values.

### Gemini CLI

```bash
gemini mcp add -e "XERO_CLIENT_ID=<YOUR_XERO_CLIENT_ID>" -e "XERO_CLIENT_SECRET=<YOUR_XERO_CLIENT_SECRET>" xero npx -- -y @xeroapi/xero-mcp-server@latest
```

This adds it to the current project. Add `-s user` to use it everywhere.

### Any client

Most clients that start local servers accept this shape:

```json
{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "<YOUR_XERO_CLIENT_ID>",
        "XERO_CLIENT_SECRET": "<YOUR_XERO_CLIENT_SECRET>"
      }
    }
  }
}
```

Zed puts servers under `context_servers` in its settings, with the same `command`, `args` and `env` fields.

Needs Node.js on your computer. Replace the placeholders with your own values.

## Details

- Server version: 0.0.17
- Last checked: 2026-10-03
- Listed: 2026-10-03
- Updated: 2026-10-04

---
Source: https://mcp.tc/i/xero (mcp.tc is an independent directory, not affiliated with this server's publisher). Corrections: https://mcp.tc/report
