Global accounting, #2 ERP (UK/AU/NZ leader). Contacts, invoices, payments, items, accounts, balance sheet. Together with QuickBooks covers ~80% of global SMB accounting.
Xero gives your agent 24 tools it calls directly β pick the ones it needs, in Claude, Cursor, or any MCP client.
create_contact β Create a Xero contact (customer or supplier β Xero uses one unified Contact object with IsCustomer/IsSupplier flags inferred from transactions).get_contact β Retrieve a single Xero contact by ContactID (UUID).list_contacts β List Xero contacts. Supports Xero's where clause for server-side filtering (e.g. 'Name=="ACME Ltd"', 'IsCustomer==true').// Your agent calls a tool directly β no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("create_contact", { /* ... */ });$ npm install @codespar/mcp-xeroAdd this entry to your claude_desktop_config.json (or any MCP-compatible client config).
{
"mcpServers": {
"xero": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-xero"
],
"env": {
"XERO_ACCESS_TOKEN": "<your_xero_access_token>",
"XERO_TENANT_ID": "<your_xero_tenant_id>"
}
}
}
}After restart, your agent can call any of the 24 tools below β try create_contact first.
Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.
XERO_ACCESS_TOKENXero OAuth2 access token (Bearer). Obtain via Xero OAuth2 flow; rotate on expiry.
XERO_TENANT_IDXero tenant/organization id sent in the Xero-tenant-id header on every request.
Each tool is independent β your agent loads only what it needs to reduce context and response time.
create_contactget_contactlist_contactscreate_invoiceget_invoicelist_invoicesemail_invoicecreate_paymentMCP is a protocol β any framework that speaks it can mount this server.