Skip to main content
MCP server CX Codex

mcp-xero — Claude Code MCP server: what it does, how to install

Connects Xero cloud accounting to your AI assistant. Lets you issue invoices, record payments, and inspect balance sheets directly in chat.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add mcp-xero -e XERO_ACCESS_TOKEN=<XERO_ACCESS_TOKEN> -e XERO_TENANT_ID=<XERO_TENANT_ID> -- npx -y @codespar/mcp-xero
Open on GitHub

What mcp-xero does

The server exposes 24 tools to interact with Xero accounting. An assistant can look up contacts, draft invoices, void records, email authorized invoices to clients, and log bank transactions. It also pulls financial reports like the balance sheet and inspects the chart of accounts.

Authentication requires two environment variables: XERO_ACCESS_TOKEN and XERO_TENANT_ID. The server expects an already issued bearer token. Upstream services must handle OAuth token refreshes. Once a token expires, API calls fail with a 401 status.

It runs over stdio with npx -y @codespar/mcp-xero. List tools support server-side filtering via the standard Xero where query parameter.

What it helps with

  • generate and email invoices to customers
  • pull balance sheet reports into chat
  • record payments and bank transactions
  • filter and manage client contact records

Example prompts for the agent

  • List all unpaid invoices in Xero with status AUTHORISED
  • Create a new contact for ACME Corp and draft an invoice
  • Fetch the balance sheet report for my organization

How to install mcp-xero

Platform CLI

claude mcp add mcp-xero -e XERO_ACCESS_TOKEN=<XERO_ACCESS_TOKEN> -e XERO_TENANT_ID=<XERO_TENANT_ID> -- npx -y @codespar/mcp-xero

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about mcp-xero

How to install mcp-xero in Claude Code?

Run claude mcp add mcp-xero -e XERO_ACCESS_TOKEN=<XERO_ACCESS_TOKEN> -e XERO_TENANT_ID=<XERO_TENANT_ID> -- npx -y @codespar/mcp-xero. Replace the placeholders with your valid OAuth token and tenant ID.

What does mcp-xero do?

It provides 24 tools for interacting with Xero. Assistants can create invoices, register incoming payments, inspect accounts, and read balance sheets.

How does authentication work in mcp-xero?

The server relies on a pre-generated token passed via XERO_ACCESS_TOKEN. Refresh-token handling must live outside this server, because it passes through 401 errors without rotating credentials.

Similar MCP servers

Everything for Finance and business →

From the same set124

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor