This is a Model Context Protocol (MCP) server implementation for Xero. It provides a bridge between the MCP protocol and Xero's API, allowing for standardized access to Xero's accounting and business features.
- Xero OAuth2 authentication with custom connections
- Contact management
- Chart of Accounts management
- Invoice creation and management
- MCP protocol compliance
- Node.js (v18 or higher)
- npm or pnpm
- A Xero developer account with API credentials
Set up a Custom Connection following these instructions: https://developer.xero.com/documentation/guides/oauth2/custom-connections/
Currently the following scopes are required:
accounting.transactions accounting.contacts accounting.settings.read accounting.reports.read
To add the MCP server to Claude go to Settings > Developer > Edit config and add the following to your claude_desktop_config.json file:
{
"mcpServers": {
"xero": {
"command": "npx",
"args": ["-y", "@xeroapi/xero-mcp-server@latest"],
"env": {
"XERO_CLIENT_ID": "your_client_id_here",
"XERO_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}
list-contacts
: Retrieve a list of contacts from Xerolist-invoices
: Retrieve a list of invoiceslist-accounts
: Retrieve a list of accountslist-tax-rates
: Retrieve a list of tax rateslist-quotes
: Retrieve a list of quoteslist-credit-notes
: Retrieve a list of credit noteslist-trial-balance
: Retrieve a trial balance reportlist-profit-and-loss
: Retrieve a profit and loss reportcreate-contact
: Create a new contactcreate-invoice
: Create a new invoicecreate-quote
: Create a new quotecreate-credit-note
: Create a new credit noteupdate-contact
: Update an existing contactupdate-invoice
: Update an existing draft invoiceupdate-quote
: Update an existing draft quote
For detailed API documentation, please refer to the MCP Protocol Specification.
# Using npm
npm install
# Using pnpm
pnpm install
# Using npm
npm run build
# Using pnpm
pnpm build
To add the MCP server to Claude go to Settings > Developer > Edit config and add the following to your claude_desktop_config.json file:
{
"mcpServers": {
"xero": {
"command": "node",
"args": ["insert-your-file-path-here/xero-mcp-server/dist/index.js"],
"env": {
"XERO_CLIENT_ID": "your_client_id_here",
"XERO_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}
MIT
Please do not commit your .env
file or any sensitive credentials to version control.