A Model Context Protocol server allows Clients to interact with Xero
Configuration
View docs{
"mcpServers": {
"john-zhang-dev-xero-mcp": {
"command": "npx",
"args": [
"-y",
"xero-mcp@latest"
],
"env": {
"XERO_CLIENT_ID": "<XERO_CLIENT_ID>",
"XERO_REDIRECT_URI": "http://localhost:5000/callback",
"XERO_CLIENT_SECRET": "<XERO_CLIENT_SECRET>"
}
}
}
}This MCP Server enables clients to interact with Xero Accounting Software by handling OAuth2 authentication and providing a set of Xero-related actions through a consistent MCP interface. It streamlines common accounting tasks by exposing them as MCP tools that you can invoke from your client.
You connect to Xero through this MCP server by first authenticating with an OAuth2 flow. Once authenticated, you can perform operations such as creating contacts, listing invoices, or retrieving balance sheet data. Use your MCP client to call any of the available tools and supply any required inputs through the MCP client’s interface. If prompted for consent during the first use, complete the flow in the browser window and close the page when prompted to return to your client.
Prerequisites you need before installation:
- Node.js installed on your system
- Claude Desktop installed
{
"mcpServers": {
"xero-mcp": {
"command": "npx",
"args": ["-y", "xero-mcp@latest"],
"env": {
"XERO_CLIENT_ID": "YOUR_CLIENT_ID",
"XERO_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
"XERO_REDIRECT_URI": "http://localhost:5000/callback"
}
}
}
}Next, update Claude Desktop’s configuration to reference the MCP server you just prepared. Then restart Claude Desktop to pick up the new server configuration.
Open your MCP client and start using tools such as authenticate, list_contacts, list_invoices, get_balance_sheet, and more. When you use a tool for the first time, you will be prompted to authenticate with Xero. Complete the OAuth2 flow in the browser window and return to your client to continue.
Privacy alert: after completing the Xero OAuth2 flow, your Xero data may pass through the language model you use. If you are testing, authorize access to your Xero Demo Company to minimize risk.
authenticate — Authenticate with Xero using OAuth2 create_bank_transactions — Creates one or more spent or received money transactions create_contacts — Creates one or multiple contacts in a Xero organisation get_balance_sheet — Retrieves the balance sheet report list_accounts — Retrieves the full chart of accounts list_bank_transactions — Retrieves spent or received money transactions list_contacts — Retrieves all contacts in a Xero organisation list_invoices — Retrieves sales invoices or purchase bills list_journals — Retrieves journals list_organisations — Retrieves Xero organisation details list_payments — Retrieves payments for invoices and credit notes list_quotes — Retrieves sales quotes " ,
- "Visualize my financial position over the last month"
- "Track my spendings over last week"
- "Add all transactions from the monthly statement into my revenue account (account code 201) as receive money"
Obtain OAuth2 access by authenticating with Xero and obtaining an access token for subsequent API calls.
Create one or more spent or received money transactions in Xero.
Create one or multiple contacts in a Xero organisation.
Retrieve the balance sheet report for the organisation.
Retrieve the full chart of accounts.
List all spent or received money transactions.
List all contacts in the Xero organisation.
Retrieve sales invoices or purchase bills.
Retrieve journals.
Retrieve Xero organisation details.
Retrieve payments for invoices and credit notes.
Retrieve sales quotes.