Xero — Claude Code MCP server: invoices, contacts, reports
Bridges Xero accounting into an AI agent over MCP: invoices, contacts, payments, quotes and financial reports. Handy when you want Xero data inside the chat.
claude mcp add mcp-server-xero -e XERO_CLIENT_ID=<XERO_CLIENT_ID> -e XERO_CLIENT_SECRET=<XERO_CLIENT_SECRET> -e XERO_CLIENT_BEARER_TOKEN=<XERO_CLIENT_BEARER_TOKEN> -- npx -y @mindstone/mcp-server-xeroWhat Xero does
The server sits between an MCP client and the Xero API. Your agent gets tools named list-invoices, list-contacts, create-contact, list-accounts, list-profit-and-loss, list-bank-summary, list-budget-summary and list-executive-summary, and uses them to read or create records in an organisation.
OAuth2 comes in two flavours. Custom Connections suits testing and development: you supply a client id and secret scoped to one organisation. A bearer token is the pick when several Xero accounts run at once and the client handles an auth flow such as PKCE itself. Set both and XERO_CLIENT_BEARER_TOKEN wins over XERO_CLIENT_ID.
Node.js v20 or higher, npm or pnpm, and a Xero developer account with API credentials are required. Tool names here carry no prefix and use dash-case, so in a host running several MCP servers they can clash with someone else's list-* — turn on namespacing if your host offers it. Payroll queries only work when the organisation region is NZ or UK.
What it helps with
- pull a list of invoices into the chat
- create a contact in the ledger without typing it by hand
- read the profit and loss report
- compare budget against actuals
- check per-account bank balances and movements
Example prompts for the agent
- List every unpaid Xero invoice for this quarter
- Create a Xero contact named Acme with email [email protected]
- Show the profit and loss report for the demo company
How to install Xero
Platform CLI
claude mcp add mcp-server-xero -e XERO_CLIENT_ID=<XERO_CLIENT_ID> -e XERO_CLIENT_SECRET=<XERO_CLIENT_SECRET> -e XERO_CLIENT_BEARER_TOKEN=<XERO_CLIENT_BEARER_TOKEN> -- npx -y @mindstone/mcp-server-xeroReplace <…> with your own values
Platform CLI
codex mcp add xero --env XERO_CLIENT_ID=<XERO_CLIENT_ID> --env XERO_CLIENT_SECRET=<XERO_CLIENT_SECRET> --env XERO_CLIENT_BEARER_TOKEN=<XERO_CLIENT_BEARER_TOKEN> -- npx -y @mindstone/mcp-server-xeroReplace <…> with your own values
Config file
{
"mcpServers": {
"xero": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-xero"
],
"env": {
"XERO_CLIENT_ID": "<XERO_CLIENT_ID>",
"XERO_CLIENT_SECRET": "<XERO_CLIENT_SECRET>",
"XERO_CLIENT_BEARER_TOKEN": "<XERO_CLIENT_BEARER_TOKEN>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"xero": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-xero"
],
"env": {
"XERO_CLIENT_ID": "<XERO_CLIENT_ID>",
"XERO_CLIENT_SECRET": "<XERO_CLIENT_SECRET>",
"XERO_CLIENT_BEARER_TOKEN": "<XERO_CLIENT_BEARER_TOKEN>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e XERO_CLIENT_ID=<XERO_CLIENT_ID> -e XERO_CLIENT_SECRET=<XERO_CLIENT_SECRET> -e XERO_CLIENT_BEARER_TOKEN=<XERO_CLIENT_BEARER_TOKEN> xero npx -y @mindstone/mcp-server-xeroReplace <…> 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 Xero
How do I install the Xero MCP server in Claude Code?
Run `claude mcp add mcp-server-xero -e XERO_CLIENT_ID=<XERO_CLIENT_ID> -e XERO_CLIENT_SECRET=<XERO_CLIENT_SECRET> -e XERO_CLIENT_BEARER_TOKEN=<XERO_CLIENT_BEARER_TOKEN> -- npx -y @mindstone/mcp-server-xero` with your own values filled in.
What does the Xero MCP server do?
It exposes Xero accounting to an agent: contacts, chart of accounts, invoices, credit notes, items and financial reports. Everything runs over MCP, so Claude, Codex, Cursor and other clients can connect.
What do I need before running it?
Node.js v20 or higher, npm or pnpm, and a Xero developer account with API credentials. Custom Connection needs a client id and secret; the multi-account mode needs a bearer token.