# io.github.codespar/mcp-xero (npm · @codespar/mcp-xero)

MCP server for Xero — global cloud accounting: contacts, invoices, payments, items, reports

- Trust score: 69/100 (medium)
- Change this week: +24
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-04

## Components

- npm · `@codespar/mcp-xero`: 69/100 (this document), [markdown](https://verifymcp.io/servers/codespar-mcp-xero/codespar-mcp-xero.md), [page](https://verifymcp.io/servers/codespar-mcp-xero/codespar-mcp-xero)

## Channel facts

- Registry: `npm`
- Package: `@codespar/mcp-xero`
- Version: `0.2.2`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-04.

- **Supply Chain Security**: 86/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (94 of 98), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (94 of 98), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 42 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 72/100
  - AI-judged instruction clarity (good).
  - Context-footprint check failed: tool/resource definitions use about 2873 tokens (~119/item across 24 items; 24 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 30/100
  - Stability observed for 9 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add codespar-mcp-xero -- npx -y @codespar/mcp-xero
```

### Codex

```bash
codex mcp add codespar-mcp-xero -- npx -y @codespar/mcp-xero
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "codespar-mcp-xero": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@codespar/mcp-xero"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add codespar-mcp-xero --command npx --arg -y --arg @codespar/mcp-xero
```

### Hermes

```yaml
mcp_servers:
  codespar-mcp-xero:
    command: "npx"
    args: ["-y", "@codespar/mcp-xero"]
```

### Other

```json
{
  "mcpServers": {
    "codespar-mcp-xero": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-xero"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-04 (score 69, +1)

No change was recorded against any check on this day. Stability & Change Management went from 27 to 30. That category is still filling its 30-day observation window: 8 days of observed history at the previous scan, 9 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-08-02 (score 68, +43)

- [security regression] Provenance: unverified → fail
- [security improvement] Install scripts: unverified → pass
- [security improvement] Known CVEs: unverified → partial
- [security improvement] Malware scan: unverified → pass
- [security] Stability: Stability not yet verified: we do not have a sandbox capture of the MCP schema this version of the package serves yet.
- [functional regression] Capabilities: pass → unverified
- [functional improvement] License: unverified → pass
- [functional improvement] Stability: unverified → 0.23
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] Schema quality: unverified → good
- [functional] Licence: MIT

### 2026-08-01 (score 25, +5)

- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [functional improvement] MCP protocol: unverified → pass

### 2026-07-31 (score 20, −25)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-27 (score 45)

First indexed and scored.

## MCP tools (24)

### `create_contact` (~271 tokens)

Create a Xero contact (customer or supplier — Xero uses one unified Contact object with IsCustomer/IsSupplier flags inferred from transactions).

Input parameters:

- `AccountNumber` (string): Merchant-side account number for this contact.
- `Addresses` (array): Array of address objects with AddressType (POBOX/STREET), AddressLine1..4, City, Region, PostalCode, Country.
- `ContactNumber` (string): External system identifier (max 50 chars).
- `DefaultCurrency` (string): ISO-4217 currency code used as default on invoices for this contact.
- `EmailAddress` (string): Primary email address.
- `FirstName` (string): Contact first name (for individuals).
- `IsCustomer` (boolean): Hint that this contact is a customer.
- `IsSupplier` (boolean): Hint that this contact is a supplier.
- `LastName` (string): Contact last name (for individuals).
- `Name` (string, required): Full name of the contact. Required and must be unique within the tenant.
- `Phones` (array): Array of phone objects with PhoneType (DEFAULT/DDI/MOBILE/FAX), PhoneNumber, PhoneAreaCode, PhoneCountryCode.
- `TaxNumber` (string): Tax number (VAT, ABN, GST, EIN, etc.) — country-dependent.

### `get_contact` (~32 tokens)

Retrieve a single Xero contact by ContactID (UUID).

Input parameters:

- `ContactID` (string, required): Xero Contact UUID.

### `list_contacts` (~122 tokens)

List Xero contacts. Supports Xero's where clause for server-side filtering (e.g. 'Name=="ACME Ltd"', 'IsCustomer==true').

Input parameters:

- `includeArchived` (boolean): If true, include archived contacts in results.
- `order` (string): Ordering clause, e.g. 'Name ASC' or 'UpdatedDateUTC DESC'.
- `page` (number): Page number (100 contacts per page).
- `where` (string): Xero where clause, e.g. 'Name.Contains("ACME")' or 'IsCustomer==true'.

### `create_invoice` (~268 tokens)

Create an invoice in Xero. Type ACCREC = accounts-receivable (sales invoice to a customer), ACCPAY = accounts-payable (bill from a supplier). Default Status=DRAFT; set AUTHORISED to issue immediately.

Input parameters:

- `Contact` (object, required): Contact reference — provide ContactID of an existing contact.
- `CurrencyCode` (string): ISO-4217 currency code. Defaults to organization base currency.
- `Date` (string): Invoice date, YYYY-MM-DD.
- `DueDate` (string): Payment due date, YYYY-MM-DD.
- `InvoiceNumber` (string): Optional merchant invoice number. If omitted, Xero auto-numbers (ACCREC only).
- `LineAmountTypes` (string): Whether LineItem UnitAmount is tax-exclusive, tax-inclusive, or tax-free.
- `LineItems` (array, required): Array of line items. Each: Description, Quantity, UnitAmount, AccountCode (or ItemCode), TaxType, DiscountRate.
- `Reference` (string): ACCREC only — free-text reference visible on invoice.
- `Status` (string): DRAFT (default), SUBMITTED (awaiting approval), or AUTHORISED (live/issued).
- `Type` (string, required): ACCREC (sales/AR) or ACCPAY (bill/AP).

### `get_invoice` (~45 tokens)

Retrieve a single invoice by InvoiceID (UUID) or InvoiceNumber.

Input parameters:

- `InvoiceID` (string, required): Xero Invoice UUID or InvoiceNumber (e.g. INV-0042).

### `list_invoices` (~136 tokens)

List invoices with optional Xero where-clause filtering. Common filters: Status=="AUTHORISED", Type=="ACCREC", Contact.ContactID==guid("..."), Date>=DateTime(2026,1,1).

Input parameters:

- `order` (string): Ordering, e.g. 'Date DESC'.
- `page` (number): Page number (100 invoices per page).
- `statuses` (string): Comma-separated statuses filter, e.g. 'DRAFT,AUTHORISED'.
- `where` (string): Xero where clause, e.g. 'Status=="AUTHORISED" AND Type=="ACCREC"'.

### `email_invoice` (~62 tokens)

Email an AUTHORISED invoice to the contact's email address on file. Xero uses the default invoice email template. No body required.

Input parameters:

- `InvoiceID` (string, required): Xero Invoice UUID. Invoice must be AUTHORISED and contact must have an EmailAddress.

### `create_payment` (~136 tokens)

Record a payment against an invoice or credit note. Reduces the invoice's AmountDue and posts to the specified bank/payment account.

Input parameters:

- `Account` (object, required): Bank/payment account reference — provide AccountID or Code (e.g. '090' for a bank account).
- `Amount` (number, required): Payment amount in invoice currency.
- `CurrencyRate` (number): FX rate if invoice currency differs from org base currency.
- `Date` (string): Payment date, YYYY-MM-DD.
- `Invoice` (object, required): Invoice reference — provide InvoiceID.
- `Reference` (string): Free-text reference (bank ref, check number, etc).

### `create_item` (~222 tokens)

Create a Xero inventory/product item. Items can be sales-only, purchase-only, or tracked inventory (requires IsTrackedAsInventory + InventoryAssetAccountCode).

Input parameters:

- `Code` (string, required): User-defined item code (required, unique within tenant).
- `Description` (string): Sales description shown on invoices.
- `InventoryAssetAccountCode` (string): Inventory asset account code (required when IsTrackedAsInventory is true).
- `IsPurchased` (boolean): True if item is available for purchase (appears on bills).
- `IsSold` (boolean): True if item is available for sale (appears on invoices).
- `IsTrackedAsInventory` (boolean): True to track stock on hand — requires InventoryAssetAccountCode.
- `Name` (string): Item display name.
- `PurchaseDescription` (string): Purchase description shown on bills.
- `PurchaseDetails` (object): Purchase pricing: UnitPrice, AccountCode (expense account), TaxType.
- `SalesDetails` (object): Sales pricing: UnitPrice, AccountCode (revenue account), TaxType.

### `list_items` (~66 tokens)

List all items/products in the Xero tenant. Supports where clause, e.g. 'IsSold==true'.

Input parameters:

- `order` (string): Ordering, e.g. 'Code ASC'.
- `where` (string): Xero where clause, e.g. 'IsSold==true'.

### `list_accounts` (~76 tokens)

List the Xero chart of accounts. Use this to discover AccountCodes/AccountIDs needed for invoice line items and payments.

Input parameters:

- `order` (string): Ordering, e.g. 'Code ASC'.
- `where` (string): Xero where clause, e.g. 'Class=="REVENUE"' or 'Type=="BANK"'.

### `update_contact` (~180 tokens)

Update an existing Xero contact. POSTs to /Contacts/{ContactID}. Only include fields you want changed; Xero merges updates.

Input parameters:

- `AccountNumber` (string): Merchant-side account number.
- `Addresses` (array): Addresses array (replaces existing).
- `ContactID` (string, required): Xero Contact UUID to update.
- `ContactNumber` (string): External system identifier.
- `DefaultCurrency` (string): ISO-4217 default currency.
- `EmailAddress` (string): Primary email address.
- `FirstName` (string): Contact first name.
- `LastName` (string): Contact last name.
- `Name` (string): Updated name (must remain unique within tenant).
- `Phones` (array): Phones array (replaces existing).
- `TaxNumber` (string): Tax number (VAT/ABN/GST/EIN).

### `archive_contact` (~47 tokens)

Archive a Xero contact by setting ContactStatus=ARCHIVED. Archived contacts are hidden from default lists but history is preserved.

Input parameters:

- `ContactID` (string, required): Xero Contact UUID to archive.

### `update_invoice` (~145 tokens)

Update an existing invoice. POSTs to /Invoices/{InvoiceID}. DRAFT/SUBMITTED invoices are fully editable; AUTHORISED invoices have limited editable fields (Reference, DueDate, etc).

Input parameters:

- `Date` (string): Invoice date YYYY-MM-DD.
- `DueDate` (string): Payment due date YYYY-MM-DD.
- `InvoiceID` (string, required): Xero Invoice UUID to update.
- `InvoiceNumber` (string): Merchant invoice number.
- `LineAmountTypes` (string): Tax treatment for line amounts.
- `LineItems` (array): Replacement line items array.
- `Reference` (string): Free-text reference.
- `Status` (string): New invoice status.

### `void_invoice` (~52 tokens)

Void an invoice by setting Status=VOIDED. Only DRAFT, SUBMITTED, or AUTHORISED invoices with zero payments can be voided.

Input parameters:

- `InvoiceID` (string, required): Xero Invoice UUID to void.

### `get_payment` (~28 tokens)

Retrieve a single payment by PaymentID.

Input parameters:

- `PaymentID` (string, required): Xero Payment UUID.

### `list_payments` (~85 tokens)

List payments recorded in Xero. Supports where-clause filtering (e.g. 'Status=="AUTHORISED"', 'Date>=DateTime(2026,1,1)').

Input parameters:

- `order` (string): Ordering, e.g. 'Date DESC'.
- `page` (number): Page number (100 per page).
- `where` (string): Xero where clause.

### `create_bank_transaction` (~188 tokens)

Create a bank transaction (SPEND = money out, RECEIVE = money in) directly on a bank account — for transactions without a matching invoice/bill (fees, transfers, one-off expenses).

Input parameters:

- `BankAccount` (object, required): Bank account reference — provide AccountID or Code.
- `Contact` (object, required): Contact reference — provide ContactID.
- `CurrencyCode` (string): ISO-4217 currency code.
- `Date` (string): Transaction date YYYY-MM-DD.
- `IsReconciled` (boolean): Mark as reconciled on creation.
- `LineAmountTypes` (string): Line amount tax treatment.
- `LineItems` (array, required): Array of line items (Description, Quantity, UnitAmount, AccountCode, TaxType).
- `Reference` (string): Free-text reference.
- `Type` (string, required): Transaction type. SPEND/RECEIVE are the common values.

### `list_bank_transactions` (~92 tokens)

List bank transactions (spend/receive entries on bank accounts). Supports where-clause filtering by BankAccount.AccountID, Type, Date, etc.

Input parameters:

- `order` (string): Ordering, e.g. 'Date DESC'.
- `page` (number): Page number (100 per page).
- `where` (string): Xero where clause, e.g. 'BankAccount.AccountID==guid("...")'.

### `list_organisations` (~42 tokens)

Retrieve the Xero organisation(s) the access token has access to — returns name, base currency, country, fiscal year start, tax settings, and edition.

### `list_tax_rates` (~77 tokens)

List tax rates configured in the Xero tenant. Use the returned TaxType codes on invoice/bill line items. Supports where clause like 'Status=="ACTIVE"'.

Input parameters:

- `order` (string): Ordering, e.g. 'Name ASC'.
- `where` (string): Xero where clause, e.g. 'Status=="ACTIVE"'.

### `create_credit_note` (~196 tokens)

Create a credit note. Type ACCRECCREDIT = credit to a customer (offsets an AR invoice), ACCPAYCREDIT = credit from a supplier (offsets an AP bill).

Input parameters:

- `Contact` (object, required): Contact reference — provide ContactID.
- `CreditNoteNumber` (string): Merchant credit note number (auto-assigned for ACCRECCREDIT if omitted).
- `CurrencyCode` (string): ISO-4217 currency.
- `Date` (string): Credit note date YYYY-MM-DD.
- `LineAmountTypes` (string): Line amount tax treatment.
- `LineItems` (array, required): Array of line items (Description, Quantity, UnitAmount, AccountCode, TaxType).
- `Reference` (string): Free-text reference.
- `Status` (string): Credit note status. Defaults to DRAFT.
- `Type` (string, required): ACCRECCREDIT (customer credit) or ACCPAYCREDIT (supplier credit).

### `list_credit_notes` (~87 tokens)

List credit notes. Supports where-clause filtering by Type, Status, Contact.ContactID, Date.

Input parameters:

- `order` (string): Ordering, e.g. 'Date DESC'.
- `page` (number): Page number (100 per page).
- `where` (string): Xero where clause, e.g. 'Type=="ACCRECCREDIT" AND Status=="AUTHORISED"'.

### `get_balance_sheet` (~151 tokens)

Retrieve the Balance Sheet report for the tenant. Returns assets, liabilities, and equity grouped by account as of a given date.

Input parameters:

- `date` (string): Report date YYYY-MM-DD. Defaults to today.
- `paymentsOnly` (boolean): Cash-basis report if true (ignore accrual).
- `periods` (number): Number of comparison periods (1-11).
- `standardLayout` (boolean): If true, return the standard (non-customised) layout.
- `timeframe` (string): Period size when 'periods' > 0.
- `trackingOptionID1` (string): Tracking category option to filter the report.
- `trackingOptionID2` (string): Second tracking category option.

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/codespar-mcp-xero/codespar-mcp-xero#diagnostics

## Score history

- 2026-08-04: 69
- 2026-08-03: 68
- 2026-08-02: 68
- 2026-08-01: 25
- 2026-07-31: 20
- 2026-07-30: 45
- 2026-07-28: 45
- 2026-07-27: 45

## Links

- npm package: https://www.npmjs.com/package/@codespar/mcp-xero
- Socket report: https://socket.dev/npm/package/@codespar/mcp-xero
- Repository: https://github.com/codespar/mcp-dev-latam
- Changelog RSS feed: https://verifymcp.io/servers/codespar-mcp-xero/codespar-mcp-xero/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/codespar-mcp-xero/codespar-mcp-xero/changelog.json
- HTML version of this page: https://verifymcp.io/servers/codespar-mcp-xero/codespar-mcp-xero
