Accounting MCP Server 🐳 Docker

Xero MCP

MCP server for Xero accounting. Manage contacts, invoices, payments, chart of accounts, and run financial reports.

Installation

Run the MCP server with npx:

npx @wyre-technology/xero-mcp

Or install the package:

npm install @wyre-technology/xero-mcp

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": [
        "@wyre-technology/xero-mcp"
      ],
      "env": {
        "XERO_ACCESS_TOKEN": "your-xero-access-token",
        "XERO_TENANT_ID": "your-xero-tenant-id"
      }
    }
  }
}

Authentication

Variable Required Description
XERO_ACCESS_TOKEN Yes OAuth 2.0 access token for Xero
XERO_TENANT_ID Yes Your Xero organisation/tenant ID

Getting Credentials

Vendor portal: https://developer.xero.com/

Prerequisites

  • Xero account (any tier with API access)
  • Xero Developer account at https://developer.xero.com/
  • Awareness that Xero uses OAuth 2.0; you create a Xero app to issue tokens

Steps

  1. Sign in to your Xero Developer portal at https://developer.xero.com/.
  2. Navigate to My Apps → New App.
  3. Select "Web app" (or "Custom connection" for server-to-server).
  4. Configure the app: name, company URL, OAuth 2.0 redirect URI per your deployment.
  5. Note the Client ID and Client Secret from the app's configuration page.
  6. Walk through the OAuth 2.0 authorization flow to obtain an access_token + refresh_token.
    • Xero access tokens expire after 30 minutes; refresh_token expires after 60 days of inactivity.
    • See https://developer.xero.com/documentation/guides/oauth2/auth-flow for the canonical flow.
  7. Set XERO_ACCESS_TOKEN and XERO_TENANT_ID (the Xero organisation/tenant ID — call the /connections endpoint after OAuth to retrieve it).

Required Scopes / Permissions

  • accounting.transactions (for invoicing, payments)
  • accounting.contacts (for contact lookups)
  • accounting.settings (for organisation/account list)
  • Adjust per the tools you intend to use

Credential Format

Access token is a JWT (long, base64). Tenant ID is a GUID.

Rotation

Access token refreshes every 30 min via refresh_token. Refresh_token rotates after 60 days of inactivity — keep gateway active or implement scheduled token refresh.

Architecture

Single TypeScript MCP server supporting both stdio and Streamable HTTP transports.

Available Tools (17)

Tools are organized into 5 domains:

Contacts

Manage customers and suppliers.

Tool Description
List contacts List contacts with filtering
Get contact Get contact details
Create contact Create a new contact
Search contacts Search contacts by name or email

Invoices

Create and manage sales invoices.

Tool Description
List invoices List invoices with filtering
Get invoice Get invoice details
Create invoice Create a new invoice
Update invoice status Approve, void, or submit an invoice

Payments

Record and view payments.

Tool Description
List payments List payments with filtering
Get payment Get payment details
Create payment Record a payment against an invoice

Accounts

Browse the chart of accounts.

Tool Description
List accounts List chart of accounts
Get account Get account details

Reports

Generate financial reports.

Tool Description
Profit & Loss Generate a P&L report
Balance Sheet Generate a balance sheet report
Aged Receivables Generate aged receivables report
Aged Payables Generate aged payables report