View as Markdown

Xero Integration

Manage Xero organisations, accounts, contacts, invoices, and bank transactions

The Xero integration provides access to manage Xero organisations, accounts, contacts, invoices, and bank transactions through the Integrate MCP server.

Installation

The Xero integration is included with the SDK:

import { xeroIntegration } from "integrate-sdk/server";

Setup

1. Create a Xero OAuth App

  1. Go to Login Developer Portal
  2. Create a new OAuth application
  3. Configure your redirect URI
  4. Note your Client ID and Client Secret

2. Configure the Integration on Your Server

Add the Xero integration to your server configuration. The integration automatically reads XERO_CLIENT_ID and XERO_CLIENT_SECRET from your environment variables:

import { createMCPServer, xeroIntegration } from "integrate-sdk/server";
 
export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    xeroIntegration({
      scopes: ["openid", "profile", "email", "offline_access", "accounting.settings", "accounting.transactions", "accounting.contacts", "accounting.attachments"], // Optional
    }),
  ],
});

You can override the environment variables by passing explicit values:

xeroIntegration({
  clientId: process.env.CUSTOM_XERO_ID,
  clientSecret: process.env.CUSTOM_XERO_SECRET,
      scopes: ["openid", "profile", "email", "offline_access", "accounting.settings", "accounting.transactions", "accounting.contacts", "accounting.attachments"], // Optional
});

3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

import { client } from "integrate-sdk";
 
await client.authorize("xero");
const result = await client.xero.listConnections({});
 
console.log(result);

If you're using a custom client, add the integration to the integrations array:

import { createMCPClient, xeroIntegration } from "integrate-sdk";
 
const customClient = createMCPClient({
  integrations: [xeroIntegration()],
});

Configuration Options

export interface XeroIntegrationConfig {
  clientId?: string;

Default Scopes

These defaults are applied unless you override scopes in the integration config:

  • openid
  • profile
  • email
  • offline_access
  • accounting.settings
  • accounting.transactions
  • accounting.contacts
  • accounting.attachments

Tools

xero_list_connections

List connections

No parameters.

xero_get_organisation

Get organisation

export type XeroGetOrganisationParams = Record<string, unknown>;

xero_list_accounts

List accounts

export type XeroListAccountsParams = Record<string, unknown>;

xero_list_contacts

List contacts

export type XeroListContactsParams = Record<string, unknown>;

xero_get_contact

Get contact

export type XeroGetContactParams = Record<string, unknown>;

xero_create_contact

Create contact

export type XeroCreateContactParams = Record<string, unknown>;

xero_list_invoices

List invoices

export type XeroListInvoicesParams = Record<string, unknown>;

xero_get_invoice

Get invoice

export type XeroGetInvoiceParams = Record<string, unknown>;

xero_create_invoice

Create invoice

export type XeroCreateInvoiceParams = Record<string, unknown>;

xero_list_bank_transactions

List bank transactions

export type XeroListBankTransactionsParams = Record<string, unknown>;

Notes

  • Category: Accounting
  • Authentication mode: OAuth