Back to Guides

How to Connect Xero to Claude AI

Connect the Xero accounting API to Claude via MCP. Analyze invoices, financial reports, and cash flow with AI using AnythingMCP.

Analyze Your Books with Claude

Xero doesn't have an MCP connector. AnythingMCP converts Xero's API into an MCP server so Claude can query your accounting data in natural language.

Step-by-Step Guide

Step 1: Deploy AnythingMCP

git clone https://github.com/HelpCode-ai/anythingmcp.git
cd anythingmcp && docker compose up -d

Step 2: Set Up Xero API Access

Create a custom connection app at https://developer.xero.com. Add read-only scopes for accounting.

Step 3: Create a REST Connector

Base URL: https://api.xero.com/api.xro/2.0. Configure OAuth 2.0 with Xero tenant ID header.

Step 4: Expose Key Endpoints

  • GET /Invoices — Invoices
  • GET /BankTransactions — Bank transactions
  • GET /Reports/ProfitAndLoss — P&L report
  • GET /Reports/BalanceSheet — Balance sheet

Step 5: Connect to Claude

{
  "mcpServers": {
    "xero": {
      "url": "http://localhost:4000/mcp"
    }
  }
}

You can also add your MCP server directly in Claude.ai under Settings → Connectors, without needing Claude Desktop.

Step 6: Ask Claude About Your Finances

  • "What's our net profit this quarter?"
  • "List all overdue invoices sorted by amount"
  • "Summarize our cash flow for the last 3 months"
  • "Which expense category grew the most?"

Next Steps