Xero Expenses

Provides tools to manage Xero invoices, bills, expenses, and expense claims via an MCP client with PKCE authentication.
  • javascript

0

GitHub Stars

javascript

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "muness-xero-expenses-mcp": {
      "command": "npx",
      "args": [
        "xero-expenses-mcp"
      ],
      "env": {
        "XERO_CLIENT_ID": "YOUR_CLIENT_ID",
        "XERO_REDIRECT_URI": "http://localhost:3000/callback",
        "XERO_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
      }
    }
  }
}

You can run and use the Xero Expenses MCP Server to create and manage invoices, bills, expenses, and expense claims, all through a local or remote MCP client. It handles PKCE authentication, stores tokens securely, and lets you attach files to financial records as needed.

How to use

To get started, run the MCP server from your terminal and authorize with Xero when prompted. The server will guide you through the PKCE-based OAuth flow in a browser, after which tokens are stored locally for subsequent sessions. Use your MCP client to call the available tools for creating invoices, bills, expenses, and expense claims, as well as attaching files to records.

How to install

Prerequisites: you need Node.js and npm installed on your system.

Install the MCP server using npx or install globally with npm.

Option 1: Run directly with npx each time you start a session.

Option 2: Install globally for easier access from any project location.

Configuration and usage notes

Authenticate with Xero using your Xero app credentials. The first run will trigger a browser-based OAuth flow. After successful authentication, tokens are persisted on your machine for automatic reuse in future sessions.

Configuration example and security notes

{
  "mcpServers": {
    "xero_expenses": {
      "command": "npx",
      "args": ["xero-expenses-mcp"],
      "env": {
        "XERO_CLIENT_ID": "YOUR_CLIENT_ID",
        "XERO_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "XERO_REDIRECT_URI": "http://localhost:3000/callback"
      }
    }
  }
}

Token storage and re-authentication

Tokens are stored in the user’s home directory under ~/.xero-mcp/token.json. To re-authenticate, delete this file and run the server again to restart the OAuth flow.

Examples of available tools

You can list accounts, bank accounts, contacts, and users, and perform CRUD-like actions for invoices, bills, expenses, and expense claims. See the tool list for the exact endpoints you can call through your MCP client.

Troubleshooting

If you encounter a connection error, verify your XERO_CLIENT_ID is set correctly and that the redirect URI matches what you configured in the Xero app. Check that you completed the initial OAuth flow in your browser when prompted. If tokens fail, delete ~/.xero-mcp/token.json and re-run the server to re-authenticate.

Available tools

xero_list_accounts

List expense accounts and categories in Xero

xero_list_bank_accounts

List bank accounts available in the Xero organization

xero_list_contacts

Search and fetch vendors or contacts in Xero

xero_list_users

List organization users, useful for expense claims workflows

xero_create_invoice

Create a sales invoice to send to customers

xero_attach_file_to_invoice

Attach a file to a specific invoice

xero_create_bill

Create a bill to pay later (Accounts Payable)

xero_attach_file

Attach a file to a bill

xero_create_expense

Create a Spend Money bank transaction for expenses

xero_attach_file_to_expense

Attach a file to an expense

xero_create_expense_claim

Create a receipt and expense claim (deprecated Feb 2026)

xero_attach_file_to_receipt

Attach a file to a receipt

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational