home / mcp / xero mcp server

Xero MCP Server

A Model Context Protocol server allows Clients to interact with Xero

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "john-zhang-dev-xero-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "xero-mcp@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "<XERO_CLIENT_ID>",
        "XERO_REDIRECT_URI": "http://localhost:5000/callback",
        "XERO_CLIENT_SECRET": "<XERO_CLIENT_SECRET>"
      }
    }
  }
}

This MCP Server enables clients to interact with Xero Accounting Software by handling OAuth2 authentication and providing a set of Xero-related actions through a consistent MCP interface. It streamlines common accounting tasks by exposing them as MCP tools that you can invoke from your client.

How to use

You connect to Xero through this MCP server by first authenticating with an OAuth2 flow. Once authenticated, you can perform operations such as creating contacts, listing invoices, or retrieving balance sheet data. Use your MCP client to call any of the available tools and supply any required inputs through the MCP client’s interface. If prompted for consent during the first use, complete the flow in the browser window and close the page when prompted to return to your client.

How to install

Prerequisites you need before installation:

- Node.js installed on your system

- Claude Desktop installed

How to install

{
  "mcpServers": {
    "xero-mcp": {
      "command": "npx",
      "args": ["-y", "xero-mcp@latest"],
      "env": {
        "XERO_CLIENT_ID": "YOUR_CLIENT_ID",
        "XERO_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "XERO_REDIRECT_URI": "http://localhost:5000/callback"
      }
    }
  }
}

Next, update Claude Desktop’s configuration to reference the MCP server you just prepared. Then restart Claude Desktop to pick up the new server configuration.

Next steps after installation

Open your MCP client and start using tools such as authenticate, list_contacts, list_invoices, get_balance_sheet, and more. When you use a tool for the first time, you will be prompted to authenticate with Xero. Complete the OAuth2 flow in the browser window and return to your client to continue.

Security and privacy notes

Privacy alert: after completing the Xero OAuth2 flow, your Xero data may pass through the language model you use. If you are testing, authorize access to your Xero Demo Company to minimize risk.

Tools

authenticate — Authenticate with Xero using OAuth2 create_bank_transactions — Creates one or more spent or received money transactions create_contacts — Creates one or multiple contacts in a Xero organisation get_balance_sheet — Retrieves the balance sheet report list_accounts — Retrieves the full chart of accounts list_bank_transactions — Retrieves spent or received money transactions list_contacts — Retrieves all contacts in a Xero organisation list_invoices — Retrieves sales invoices or purchase bills list_journals — Retrieves journals list_organisations — Retrieves Xero organisation details list_payments — Retrieves payments for invoices and credit notes list_quotes — Retrieves sales quotes " ,

Examples

- "Visualize my financial position over the last month"

- "Track my spendings over last week"

- "Add all transactions from the monthly statement into my revenue account (account code 201) as receive money"

Available tools

authenticate

Obtain OAuth2 access by authenticating with Xero and obtaining an access token for subsequent API calls.

create_bank_transactions

Create one or more spent or received money transactions in Xero.

create_contacts

Create one or multiple contacts in a Xero organisation.

get_balance_sheet

Retrieve the balance sheet report for the organisation.

list_accounts

Retrieve the full chart of accounts.

list_bank_transactions

List all spent or received money transactions.

list_contacts

List all contacts in the Xero organisation.

list_invoices

Retrieve sales invoices or purchase bills.

list_journals

Retrieve journals.

list_organisations

Retrieve Xero organisation details.

list_payments

Retrieve payments for invoices and credit notes.

list_quotes

Retrieve sales quotes.