# xero-mcp

> MCP Server

This repository provides an MCP server enabling interaction with Xero Accounting Software through Claude Desktop. It uses OAuth2 for authentication and offers tools like creating bank transactions, requiring a Xero

## Overview

- **Category:** Developer Tools
- **Language:** TypeScript
- **Stars:** 21
- **Forks:** 3
- **Owner:** john-zhang-dev
- **GitHub:** https://github.com/john-zhang-dev/xero-mcp
- **Created:** 2025-03-18T04:26:21+00:00
- **Updated:** 2025-03-28T14:51:14+00:00
- **Source:** https://model-context-protocol.com/servers/xero-mcp-server-accounting-integration

## Setup

## Setup

1.  Make sure [node](https://nodejs.org) and [Claude Desktop](https://claude.ai/download) are installed.

2.  Create an OAuth 2.0 app in Xero to get a _CLIENT_ID_ and _CLIENT_SECRET_.

    -   Create a free Xero user account (if you don't have one)
    -   Login to Xero Developer center https://developer.xero.com/app/manage/
    -   Click New app
    -   Enter a name for your app
    -   Select Web app
    -   Provide a valid URL (can be anything valid eg. https://www.myapp.com)
    -   Enter redirect URI: `http://localhost:5000/callback`
    -   Tick to Accept the Terms & Conditions and click Create app
    -   On the left-hand side of the screen select Configuration
    -   Click Generate a secret

3.  Modify `claude_desktop_config.json` file

   ```json
   {
     "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"
         }
       }
     }
   }
   ```

4.  Restart Claude Desktop

5.  When the Client decides to access a Xero tool for the first time, a Xero login page will pop up to ask your consent; complete the auth flow and manually close the web page.


## Tools

## Available Tools

		1. `authenticate` (Authenticate with Xero using OAuth2)
		2. `create_bank_transactions` (Creates one or more spent or received money transaction)
		3. `create_contacts` (Creates one or multiple contacts in a Xero organisation)
		4. `get_balance_sheet` (Retrieves report for balancesheet)
		5. `list_accounts` (Retrieves the full chart of accounts)
		6. `list_bank_transactions` (Retrieves any spent or received money transactions)
		7. `list_contacts` (Retrieves all contacts in a Xero organisation)
		8. `list_invoices` (Retrieves sales invoices or purchase bills)
		9. `list_journals` (Retrieves journals)
		10. `list_organisations` (Retrieves Xero organisation details)
		11. `list_payments` (Retrieves payments for invoices and credit notes)
		12. `list_quotes` (Retrieves sales quotes)
