---
title: "Connect Xero to Claude: Manage Quotes, Orders, and Expense Claims"
slug: connect-xero-to-claude-manage-quotes-orders-and-expense-claims
date: 2026-06-23
author: Uday Gajavalli
categories: ["AI & Agents"]
excerpt: "Learn how to build a managed Xero MCP server to connect Claude to your accounting data, enabling AI agents to manage quotes, orders, and expense claims."
tldr: "Connect Xero to Claude via a managed MCP server. Overcome Xero API complexities like nested line items and strict rate limits to automate quotes, POs, and expense claims using AI agents."
canonical: https://truto.one/blog/connect-xero-to-claude-manage-quotes-orders-and-expense-claims/
---

# Connect Xero to Claude: Manage Quotes, Orders, and Expense Claims


If you need to give your AI agents the ability to read and write accounting data - specifically drafting quotes, issuing purchase orders, or auditing expense claims - you need a [Model Context Protocol (MCP) server](https://truto.one/how-to-connect-ai-agents-to-xero-and-quickbooks-mcp-server-architecture-guide/). This server acts as the translation layer between Claude's function calls and Xero's REST API. You can either build and maintain this infrastructure yourself, [dealing with OAuth flows and complex accounting schemas](https://truto.one/how-do-i-integrate-with-the-xero-api-a-guide-for-b2b-saas/), or use a [managed integration platform](https://truto.one/the-best-unified-accounting-api-for-b2b-saas-and-ai-agents-2026/) like Truto to dynamically generate a secure, authenticated MCP server URL. 

If your team uses ChatGPT instead of Claude, check out our guide on [connecting Xero to ChatGPT](https://truto.one/connect-xero-to-chatgpt-sync-invoices-payments-financial-reports/) or explore our broader architectural overview on [connecting Xero to AI Agents](https://truto.one/connect-xero-to-ai-agents-automate-transactions-taxes-and-journals/).

Giving a Large Language Model (LLM) access to a sprawling financial ecosystem like Xero is a serious engineering challenge. You have to handle strict API validation rules, map massive JSON schemas to MCP tool definitions, and deal with Xero's highly specific rate limits. Every time Xero updates an endpoint or deprecates a field, you have to update your server code, redeploy, and test the integration. This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Xero, connect it natively to Claude, and execute complex financial workflows using natural language.

## The Engineering Reality of the Xero API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools using JSON-RPC 2.0, the reality of implementing it against Xero's accounting API is painful. You are not just integrating a standard REST API - you are integrating a double-entry accounting system with strict validation rules, complex nested models, and unforgiving error structures.

If you decide to build a custom MCP server for Xero, you own the entire API lifecycle. Here are the specific challenges you will face:

**Strict Line Item and Taxation Logic**
When Claude attempts to draft a quote or a purchase order, it cannot just pass a total amount. Xero requires `LineItems`, and each line item must align with strict tax logic driven by the `LineAmountTypes` field (which can be `Exclusive`, `Inclusive`, or `NoTax`). If an LLM hallucinates a tax rate or mismatched subtotal, Xero rejects the payload. A managed MCP server exposes these schema requirements explicitly to the LLM via documented tool definitions, ensuring Claude knows exactly which fields are mandatory.

**Foreign Key Entity Dependencies**
You cannot create a purchase order or quote in isolation. To create a quote, you need a valid `ContactID`. To add line items, you often need valid `ItemCodes` or `AccountCodes`. If you build this yourself, you must expose an interconnected web of lookup endpoints to the LLM so it can resolve names to IDs before executing a write operation. 

**Aggressive Rate Limiting and Backoff Mechanics**
Xero enforces strict rate limits: typically 60 calls per minute per tenant, and 5,000 calls per day. When an AI agent gets stuck in a loop summarizing hundreds of expense claims or polling for updates, it will quickly hit this ceiling. 

It is critical to note: **Truto does not retry, throttle, or apply backoff on rate limit errors.** When Xero returns an HTTP 429 Too Many Requests, Truto passes that error directly back to the caller. However, Truto normalizes the upstream rate limit information into standardized HTTP headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`) per the IETF specification. The MCP client or the calling agent framework is fully responsible for reading these headers and implementing its own retry and exponential backoff logic.

## How to Generate a Xero MCP Server with Truto

Truto dynamically derives MCP tools directly from Xero's API resources and documentation schemas. A tool only appears in the MCP server if it has a corresponding documentation entry - acting as a quality gate to ensure Claude only accesses well-documented endpoints. 

You can generate a Xero MCP server using either the Truto UI or the Truto API. The resulting URL contains a cryptographic token that securely encodes the connected Xero tenant, the allowed tools, and the expiration window.

### Method 1: Generating the Server via the Truto UI

If you are managing integrations manually or testing agent workflows, the UI is the fastest path.

1. Navigate to the **Integrated Accounts** page in your Truto dashboard and select your connected Xero account.
2. Click the **MCP Servers** tab.
3. Click **Create MCP Server**.
4. Configure the server name, allowed methods (e.g., `read`, `write`), tags, and an optional expiration date.
5. Click **Create** and immediately copy the generated MCP server URL. (You will only see this full URL once).

### Method 2: Generating the Server via the API

For engineering teams building multi-tenant AI products, you can dynamically generate MCP servers for your users on the fly. You simply make a POST request to Truto using the user's specific `integrated-account-id`.

```bash
curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Xero Finance Agent MCP",
    "config": {
      "methods": ["read", "write"],
      "tags": ["quotes", "expenses"]
    },
    "expires_at": "2025-12-31T23:59:59Z"
  }'
```

The Truto API will validate that the Xero integration has active tools, generate a secure token, store the configuration, and return a payload containing the ready-to-use URL:

```json
{
  "id": "mcp_abc123",
  "name": "Xero Finance Agent MCP",
  "config": { "methods": ["read", "write"] },
  "expires_at": "2025-12-31T23:59:59Z",
  "url": "https://api.truto.one/mcp/xyz987securetoken..."
}
```

## Connecting the MCP Server to Claude

Once you have the Truto MCP server URL, you need to connect it to your Claude environment. Because Truto handles the OAuth credential injection at the edge, the URL is fully self-contained. 

### Method A: Via the Claude UI (Desktop/Web)

If you are using the Claude application directly, adding the server takes seconds:

1. Open Claude and navigate to **Settings**.
2. Select **Integrations** (or **Connectors** depending on your tier) and click **Add MCP Server**.
3. Provide a recognizable name (e.g., "Xero Production Data").
4. Paste the Truto MCP Server URL.
5. Click **Add**.

Claude will immediately ping the server using the `initialize` JSON-RPC method, discover the available Xero tools, and confirm the connection. 

*(Note: If you are using ChatGPT instead, the process is similar: Settings -> Apps -> Advanced Settings -> Enable Developer Mode -> Add Custom Connector).* 

### Method B: Via Manual Config File (Claude Desktop / Custom Agents)

If you are configuring Claude Desktop locally or injecting the server into a custom agent framework via SSE (Server-Sent Events), you must update your MCP configuration file.

Edit your `claude_desktop_config.json` (located in `~/Library/Application Support/Claude/` on macOS or `%APPDATA%\Claude\` on Windows) to include the Truto server using the official SSE transport package.

```json
{
  "mcpServers": {
    "xero_finance": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/xyz987securetoken..."
      ]
    }
  }
}
```

Restart Claude Desktop. The application will execute the npx command, establish the SSE connection, and mount the Xero tools.

## Hero Tools for Xero

When the MCP client connects, Truto dynamically derives the tool definitions by iterating over the Xero integration's resources and applying any configured filters. 

Here are the highest-leverage operations your AI agent can execute against Xero, complete with descriptions and example prompts.

### List All Xero Quotes

Retrieves a paginated list of sales quotes. This tool allows the LLM to inspect the pipeline, check for expired quotes, or filter quotes by status (e.g., DRAFT, SENT, ACCEPTED).

> "Claude, pull all Xero quotes currently in 'DRAFT' status that were created this week, and summarize their total values by contact."

### Create a Xero Quote

Creates or updates one or more sales quotes in Xero. The agent must supply a valid `Contact` object (including a `ContactID`) and an array of `LineItems`. This is highly useful for automating sales handoffs.

> "Draft a new Xero quote for Contact ID 'b1234-xyz' for 10 hours of 'Consulting Services' at $150/hr. Set the expiry date to 14 days from today."

### List All Xero Purchase Orders

Retrieves purchase orders from the system. Agents use this to monitor procurement status, check supplier details, and identify POs that have been approved but not yet billed.

> "Fetch all purchase orders that have been 'APPROVED' but not yet marked as billed. List the supplier names and the expected delivery dates."

### Create a Xero Purchase Order

Generates new purchase orders to send to suppliers. The LLM can extract requests from an email or internal chat and immediately stage the PO in Xero for human approval.

> "Create a draft purchase order in Xero for our supplier 'Acme Hardware' (Contact ID '789-abc'). Add 5 'Server Racks' at $500 each and set the status to DRAFT."

### List All Xero Expense Claims

Fetches expense claims submitted by employees. This tool enables agents to audit recent employee spend, check claim statuses, and verify amounts against internal policies.

> "Pull all expense claims submitted in the last 30 days. Flag any claims that exceed $1,000 and have not yet been approved."

### Create a Xero Receipt

Submits or updates a draft expense claim receipt. Agents can parse physical receipts or digital invoices sent via email and automatically draft the corresponding expense line in Xero.

> "Update the draft expense receipt for user 'Jane Doe' (Receipt ID '456-def') to include a line item for 'Client Dinner' for $125.50 under the Meals account code."

For the complete inventory of available Xero tools, including bank transactions, invoices, and accounting journals, refer to the [Xero integration page](https://truto.one/integrations/detail/xero).

## Workflows in Action

Individual tools are useful, but MCP truly unlocks value when an LLM strings multiple tools together to automate a multi-step accounting process. Here are three real-world workflows you can execute using the Xero MCP server.

### Workflow 1: Sales Inquiry to Draft Quote

Sales teams often receive requests for proposals via email or Slack. Instead of manually cross-referencing CRMs and Xero, an AI agent handles the entire staging process.

> "A prospect from TechCorp asked for a quote for 50 software licenses at $120 each. Find their contact record in Xero and draft a quote valid for 30 days."

1. **Execution 1:** Claude calls `list_all_xero_contacts` with a search term for "TechCorp" to retrieve the correct `ContactID`.
2. **Execution 2:** Claude calculates the total, determines the date 30 days from now, and calls `create_a_xero_quote` passing the `ContactID` and the `LineItems` array.
3. **Result:** The user receives a confirmation that a Draft Quote is waiting in Xero for final review, including the exact Quote Number and total amount.

```mermaid
sequenceDiagram
    participant User as User
    participant Claude as Claude Desktop
    participant MCP as Truto MCP Server
    participant Upstream as Xero API
    
    User->>Claude: "Draft quote for TechCorp..."
    Claude->>MCP: tools/call (list_all_xero_contacts)
    MCP->>Upstream: GET /Contacts?where=Name=="TechCorp"
    Upstream-->>MCP: ContactID: 123-ABC
    MCP-->>Claude: Contact Data
    Claude->>MCP: tools/call (create_a_xero_quote)
    MCP->>Upstream: POST /Quotes {ContactID, LineItems}
    Upstream-->>MCP: QuoteID: 999-XYZ
    MCP-->>Claude: Success
    Claude-->>User: "Quote drafted successfully."
```

### Workflow 2: Procurement Auditing

Operations managers need visibility into pending supplier orders without running clunky manual reports.

> "Show me all approved purchase orders from last month that haven't been delivered, and give me a summary of which suppliers are holding up the most cash."

1. **Execution 1:** Claude calls `list_all_xero_purchase_orders` filtering for the previous month's date range and the status `APPROVED`.
2. **Execution 2:** Claude processes the returned JSON payload, identifying orders where the delivery date has passed or the status indicates non-fulfillment.
3. **Result:** The user gets a markdown table listing the delayed POs, sorted by the total cash amount, alongside the supplier names.

### Workflow 3: Automated Expense Receipt Processing

Finance teams waste hours manually entering data from digital receipts. An agent can read a receipt and stage it in Xero automatically.

> "I just reviewed this software subscription receipt for $50. Find the corresponding draft expense claim for the IT department and update the receipt with these details."

1. **Execution 1:** Claude calls `list_all_xero_receipts` to find the recent draft receipts associated with the requesting user or department.
2. **Execution 2:** Claude extracts the relevant `ReceiptID` and calls `create_a_xero_receipt` (which acts as an update in this context), injecting the $50 amount, the vendor name, and the appropriate account code.
3. **Result:** The agent confirms the receipt has been updated and is ready for final approval by the finance manager.

## Security and Access Control

Giving an LLM access to your core financial ledger requires strict governance. If an agent goes off-script, you do not want it arbitrarily deleting invoices or voiding bank transactions. Truto's MCP servers provide four layers of security to lock down agent capabilities:

*   **Method Filtering:** You can restrict a server to specific HTTP methods. For example, setting `methods: ["read"]` ensures the agent can only execute `get` and `list` operations, physically preventing it from creating or updating Xero records.
*   **Tag Filtering:** Integrations in Truto group resources by tags. By setting `tags: ["expenses"]`, you restrict the MCP server so it only exposes tools related to expense claims and receipts, hiding sensitive payroll or bank transfer endpoints.
*   **Require API Token Auth:** By setting `require_api_token_auth: true`, possession of the MCP URL is no longer sufficient. The MCP client must also send a valid Truto API token in the `Authorization` header, ensuring only authenticated internal systems can utilize the agent.
*   **Time-to-Live (Expires At):** You can assign an `expires_at` datetime. Truto will automatically enforce this expiration at the KV edge layer and schedule a durable alarm to permanently delete the server token from the database once the window closes. This is perfect for giving a contractor or a temporary script scoped access.

:::cta{buttonText="Talk to us" buttonUrl="https://cal.com/truto/partner-with-truto"} 
Ready to connect your AI agents to Xero? Let's discuss your integration architecture.
:::

Connecting Xero to Claude doesn't have to mean spending weeks wrestling with OAuth lifecycles, accounting schemas, and 429 rate limit responses. By generating a managed MCP server through Truto, you abstract away the API boilerplate and instantly give your LLMs the precise, documented tools they need to read and write accounting data safely.
