xero-mcp-server

by @XeroAPI

Xero MCP Server

Access Xero invoices, contacts, bank transactions, financial reports, and NZ/UK payroll timesheets from Claude Desktop over local stdio. Maintained by XeroAPI in Node.js (v18+) under MIT, @xeroapi/xero-mcp-server supports OAuth 2.0 Custom Connections and Bearer tokens.

Server facts

xero-mcp-server

GitHub stars

399

Last commit

Nov 10, 2026

Runtime

node

License

MIT

Project

Author
XeroAPI
License
MIT

Tech

Runtime
node
Transports
stdio
Remote access
No
Authentication
Xero OAuth 2.0 Custom Connection (XERO_CLIENT_ID/SECRET) or Bearer token

Activity

GitHub stars
399
Last commit
Data as of

Overview

Finance teams and developers looking for an official `xero mcp` connector can install `@xeroapi/xero-mcp-server@latest` from `XeroAPI/xero-mcp-server`, an MIT-licensed Node.js (v18+) server running over local `stdio` via `npx`. It supports dual OAuth 2.0 authentication paths: Custom Connections (`XERO_CLIENT_ID` and `XERO_CLIENT_SECRET`), recommended for Claude Desktop and single-organisation testing, or runtime `XERO_CLIENT_BEARER_TOKEN` (which takes precedence over client credentials when set) for multi-account clients managing their own PKCE OAuth flows. The server automatically tries bundled V1 scopes before falling back to granular V2 scopes introduced from Apr 29, 2026, with optional `XERO_SCOPES` overrides.

Instead of hand-building API scripts, connected agents invoke dedicated commands covering core accounting and regional payroll workflows. Read tools retrieve accounts, contacts, invoices, quotes, credit notes, items, bank transactions, manual journals, aged receivables and payables, profit-and-loss statements, balance sheets, and trial balances. Write commands create and update contacts, draft invoices, quotes, credit notes, bank transactions, payments, tracking categories, and NZ or UK payroll timesheets—including line edits, approvals, and reverts. Teams evaluating the server can start against a resettable Xero Demo Company before touching live books, and nvm users should specify the full `npx` binary path in `claude_desktop_config.json`.

Install & configure

Requirements

  • Node.js v18 or higher with npm or pnpm
  • A Xero developer account with either a Custom Connection (`XERO_CLIENT_ID` and `XERO_CLIENT_SECRET`) or an OAuth 2.0 Bearer token (`XERO_CLIENT_BEARER_TOKEN`)
  • Matching OAuth scopes configured (V1 bundled scopes before Apr 29, 2026 or V2 granular scopes from Apr 29, 2026; NZ or UK region for Payroll queries)
Documented launch / install command
npx -y @xeroapi/xero-mcp-server@latest

Add `@xeroapi/xero-mcp-server@latest` via `npx -y` to `claude_desktop_config.json` with `XERO_CLIENT_ID` and `XERO_CLIENT_SECRET` (plus optional `XERO_SCOPES`), or pass `XERO_CLIENT_BEARER_TOKEN` for PKCE multi-account flows. Node Version Manager users must point `command` to the absolute `npx` executable path.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Desktop configuration
{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "your_client_id_here",
        "XERO_CLIENT_SECRET": "your_client_secret_here",
        "XERO_SCOPES": "accounting.invoices accounting.contacts accounting.settings"
      }
    }
  }
}

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

Cursor configuration
{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "your_client_id_here",
        "XERO_CLIENT_SECRET": "your_client_secret_here",
        "XERO_SCOPES": "accounting.invoices accounting.contacts accounting.settings"
      }
    }
  }
}

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

VS Code configuration
{
  "servers": {
    "xero": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "your_client_id_here",
        "XERO_CLIENT_SECRET": "your_client_secret_here",
        "XERO_SCOPES": "accounting.invoices accounting.contacts accounting.settings"
      }
    }
  }
}

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

Windsurf configuration
{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "your_client_id_here",
        "XERO_CLIENT_SECRET": "your_client_secret_here",
        "XERO_SCOPES": "accounting.invoices accounting.contacts accounting.settings"
      }
    }
  }
}

Read the Windsurf setup guide

Config file · Project scope: .mcp.json at the repository root

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "mcpServers": {
    "xero": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "your_client_id_here",
        "XERO_CLIENT_SECRET": "your_client_secret_here",
        "XERO_SCOPES": "accounting.invoices accounting.contacts accounting.settings"
      }
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Tools

Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
list-accountsRetrieve the organisation's chart of accounts from Xero.
list-contactsFetch contacts registered in the connected Xero organisation.
list-invoicesRetrieve invoices stored in Xero for inspection or follow-up.
create-invoiceCreate a new invoice record inside Xero.
update-invoiceModify details on an existing draft invoice.
create-contactAdd a new customer or supplier contact to Xero.
list-bank-transactionsRetrieve bank account transactions from Xero.
create-bank-transactionRecord a new bank transaction in Xero.
list-profit-and-lossPull a profit and loss financial report for the organisation.
list-report-balance-sheetRetrieve a balance sheet financial report from Xero.
list-trial-balanceFetch a trial balance report across Xero ledger accounts.
list-aged-receivables-by-contactRetrieve aged receivables breakdown for a specific contact.
list-aged-payables-by-contactRetrieve aged payables breakdown for a specific contact.
create-paymentRecord a payment entry against Xero transactions.
create-quoteCreate a new customer quote in Xero.
list-payroll-employeesList Xero Payroll employees (requires NZ or UK organisation region).
create-payroll-timesheetCreate a new Xero Payroll timesheet for an employee.
approve-payroll-timesheetApprove an existing Xero Payroll timesheet.

Use cases

  • Generate profit-and-loss, balance sheet, trial balance, and aged receivables or payables summaries inside Claude Desktop without exporting CSVs.
  • Draft and revise customer invoices, quotes, credit notes, and contacts using natural language prompts verified against a Xero Demo Company first.
  • Inspect and categorize bank transactions, manual journals, tax rates, and tracking categories across your chart of accounts.
  • Manage NZ or UK Xero Payroll timesheets—listing employees and leave balances, adding timesheet lines, and approving or reverting timesheets.

Strengths

  • Maintained directly under the official `XeroAPI` GitHub organization and published as `@xeroapi/xero-mcp-server@latest` on npm.
  • Supports both Custom Connections for single-org desktop setups and `XERO_CLIENT_BEARER_TOKEN` for multi-account PKCE clients.
  • Automatically falls back from legacy V1 bundled scopes to post-Apr 29, 2026 granular V2 scopes, with custom `XERO_SCOPES` overrides.
  • Covers both read reporting (P&L, balance sheet, aged receivables/payables) and write mutations across accounting and payroll.

Limitations

  • Runs locally over `stdio` rather than as a hosted remote MCP endpoint, so users must create and manage their own Xero developer credentials.
  • Payroll commands are restricted to Xero organisations located in the NZ or UK regions.
  • Custom Connections require adding every scope in the applicable V1 or V2 list, and nvm users must configure the absolute path to `npx`.

xero-mcp-server setup notes

  • Check XERO_CLIENT_ID, XERO_CLIENT_SECRET, XERO_SCOPES in the xero-mcp-server configuration if startup or authentication fails.
  • xero-mcp-server's stdio example needs a client that launches local processes.

Frequently asked questions

Create a Xero Custom Connection to obtain `XERO_CLIENT_ID` and `XERO_CLIENT_SECRET`, then add an `mcpServers.xero` entry in `claude_desktop_config.json` running `npx -y @xeroapi/xero-mcp-server@latest` over `stdio`. You can optionally set `XERO_SCOPES` to space-separated scopes, and nvm users should provide the full executable path to `npx`.

Related MCP servers