Xero MCP Server
OfficialXero MCP Server
Это реализация сервера протокола контекста модели (MCP) для Xero. Он служит мостом между протоколом MCP и API Xero, обеспечивая стандартизированный доступ к функциям бухгалтерского учета и бизнес-функциям Xero.
Возможности
Аутентификация Xero OAuth2 с пользовательскими подключениями
Управление контактами
Управление планом счетов
Создание и управление счетами
Соответствие протоколу MCP
Related MCP server: xero-mcp-enhanced
Предварительные требования
Node.js (v18 или выше)
npm или pnpm
Учетная запись разработчика Xero с учетными данными API
Документация и ссылки
Настройка
Создание учетной записи Xero
Если у вас еще нет учетной записи и организации Xero, вы можете создать их, зарегистрировавшись здесь с использованием бесплатной пробной версии.
Мы рекомендуем начать с использования демо-компании (Demo Company), так как она поставляется с предварительно загруженными образцами данных. После входа в систему переключитесь на нее, используя выпадающее меню в левом верхнем углу и выбрав "Demo Company". Вы можете сбросить данные в демо-компании или изменить страну в любое время, используя выпадающее меню в левом верхнем углу и перейдя в My Xero.
ПРИМЕЧАНИЕ: Для использования запросов, специфичных для расчета заработной платы (Payroll), регионом должен быть NZ (Новая Зеландия) или UK (Великобритания).
Аутентификация
Сервер Xero MCP поддерживает 2 режима аутентификации:
1. Пользовательские подключения (Custom Connections)
Это лучший выбор для тестирования и разработки, который позволяет указать идентификатор клиента (client id) и секреты для конкретной организации. Это также рекомендуемый подход, если вы интегрируете сервер в сторонние MCP-клиенты, такие как Claude Desktop.
Настройка учетной записи разработчика Xero
Настройте пользовательское подключение, следуя этим инструкциям: https://developer.xero.com/documentation/guides/oauth2/custom-connections/
Необходимые области доступа (Scopes)
Пользовательские подключения требуют различных областей доступа в зависимости от того, когда они были созданы. Все области доступа из соответствующего списка должны быть добавлены в ваше пользовательское подключение:
Создание пользовательского подключения | Необходимые области доступа |
До 29 апреля 2026 г. | |
С 29 апреля 2026 г. |
Примечание: MCP-сервер автоматически сначала пытается использовать области доступа V1 и при необходимости переключается на V2.
Вы можете переопределить их, установив переменную окружения
XERO_SCOPESв виде списка областей доступа, разделенных пробелами.
Интеграция MCP-сервера с Claude Desktop
Чтобы добавить MCP-сервер в Claude, перейдите в Settings > Developer > Edit config и добавьте следующее в ваш файл claude_desktop_config.json:
{
"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",
"XERO_SCOPES": "accounting.invoices accounting.contacts accounting.settings"
}
}
}
}Переменная XERO_SCOPES является необязательной. Если она опущена, будут использоваться указанные выше области доступа по умолчанию.
ПРИМЕЧАНИЕ: Если вы используете Node Version Manager, измените раздел "command": "npx" на полный путь к исполняемому файлу, например: your_home_directory/.nvm/versions/node/v22.14.0/bin/npx на Mac / Linux или "your_home_directory\\.nvm\\versions\\node\\v22.14.0\\bin\\npx" на Windows
2. Токен носителя (Bearer Token)
Это лучший выбор, если вы хотите поддерживать несколько учетных записей Xero во время выполнения и позволить MCP-клиенту выполнять поток аутентификации (например, PKCE) по мере необходимости. В этом случае используйте следующую конфигурацию:
{
"mcpServers": {
"xero": {
"command": "npx",
"args": ["-y", "@xeroapi/xero-mcp-server@latest"],
"env": {
"XERO_CLIENT_BEARER_TOKEN": "your_bearer_token"
}
}
}
}ПРИМЕЧАНИЕ: XERO_CLIENT_BEARER_TOKEN будет иметь приоритет над XERO_CLIENT_ID, если он определен.
Необходимые области доступа для токена носителя
При получении токена носителя вы должны запросить соответствующие области доступа. Запрашиваемые области доступа должны быть:
Примечание: Некоторые области доступа устаревают в пользу более гранулярных. Подробности о сроках устаревания см. в документации по областям доступа Xero OAuth 2.0.
accounting.transactions (Deprecated)
accounting.transactions.read (Deprecated)
accounting.invoices
accounting.invoices.read
accounting.payments
accounting.payments.read
accounting.banktransactions
accounting.banktransactions.read
accounting.manualjournals
accounting.manualjournals.read
accounting.reports.read (Deprecated)
accounting.reports.aged.read
accounting.reports.balancesheet.read
accounting.reports.profitandloss.read
accounting.reports.trialbalance.read
accounting.contacts
accounting.settings
payroll.settings
payroll.employees
payroll.timesheetsДоступные команды MCP
list-accounts: Получить список счетовlist-contacts: Получить список контактов из Xerolist-credit-notes: Получить список кредитовых авизоlist-invoices: Получить список счетов-фактурlist-items: Получить список позицийlist-manual-journals: Получить список ручных проводокlist-organisation-details: Получить сведения об организацииlist-profit-and-loss: Получить отчет о прибылях и убыткахlist-quotes: Получить список коммерческих предложенийlist-tax-rates: Получить список налоговых ставокlist-payments: Получить список платежейlist-trial-balance: Получить отчет об оборотно-сальдовой ведомостиlist-bank-transactions: Получить список транзакций по банковскому счетуlist-payroll-employees: Получить список сотрудников для расчета заработной платыlist-report-balance-sheet: Получить отчет о бухгалтерском балансеlist-payroll-employee-leave: Получить записи об отпусках сотрудника для расчета заработной платыlist-payroll-employee-leave-balances: Получить остатки отпусков сотрудника для расчета заработной платыlist-payroll-employee-leave-types: Получить список типов отпусков для расчета заработной платыlist-payroll-leave-periods: Получить список периодов отпусков сотрудника для расчета заработной платыlist-payroll-leave-types: Получить список всех доступных типов отпусков в Xero Payrolllist-timesheets: Получить список табелей учета рабочего времени для расчета заработной платыlist-aged-receivables-by-contact: Получить дебиторскую задолженность по срокам для контактаlist-aged-payables-by-contact: Получить кредиторскую задолженность по срокам для контактаlist-contact-groups: Получить список групп контактовlist-tracking-categories: Получить список категорий отслеживанияcreate-bank-transaction: Создать новую банковскую транзакциюcreate-contact: Создать новый контактcreate-credit-note: Создать новое кредитовое авизоcreate-invoice: Создать новый счет-фактуруcreate-item: Создать новую позициюcreate-manual-journal: Создать новую ручную проводкуcreate-payment: Создать новый платежcreate-quote: Создать новое коммерческое предложениеcreate-payroll-timesheet: Создать новый табель учета рабочего времени для расчета заработной платыcreate-tracking-category: Создать новую категорию отслеживанияcreate-tracking-option: Создать новую опцию отслеживанияupdate-bank-transaction: Обновить существующую банковскую транзакциюupdate-contact: Обновить существующий контактupdate-invoice: Обновить существующий черновик счета-фактурыupdate-item: Обновить существующую позициюupdate-manual-journal: Обновить существующую ручную проводкуupdate-quote: Обновить существующий черновик коммерческого предложенияupdate-credit-note: Обновить существующий черновик кредитового авизоupdate-tracking-category: Обновить существующую категорию отслеживанияupdate-tracking-options: Обновить опции отслеживанияupdate-payroll-timesheet-line: Обновить строку в существующем табеле учета рабочего времени для расчета заработной платыapprove-payroll-timesheet: Утвердить табель учета рабочего времени для расчета заработной платыrevert-payroll-timesheet: Отменить утверждение табеля учета рабочего времени для расчета заработной платыadd-payroll-timesheet-line: Добавить новую строку в существующий табель учета рабочего времени для расчета заработной платыdelete-payroll-timesheet: Удалить существующий табель учета рабочего времени для расчета заработной платыget-payroll-timesheet: Получить существующий табель учета рабочего времени для расчета заработной платы
Для получения подробной документации по API, пожалуйста, обратитесь к Спецификации протокола MCP.
Для разработчиков
Установка
# Using npm
npm install
# Using pnpm
pnpm installЗапуск сборки
# Using npm
npm run build
# Using pnpm
pnpm buildИнтеграция с Claude Desktop
Чтобы связать ваш сервер Xero MCP в процессе разработки с Claude Desktop, перейдите в Settings > Developer > Edit config и добавьте следующее в ваш файл claude_desktop_config.json:
ПРИМЕЧАНИЕ: Для Windows убедитесь, что путь в args содержит экранированные символы \ между папками, например: "C:\\projects\\xero-mcp-server\\dist\\index.js"
{
"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
Безопасность
Пожалуйста, не добавляйте ваш файл .env или любые конфиденциальные учетные данные в систему контроля версий (он включен в .gitignore как безопасное значение по умолчанию.)
Available Tools
51 toolsadd-timesheet-lineC
Add a new timesheet line to an existing payroll timesheet in Xero.
Inputs: timesheetID (required), timesheetLine (required).
approve-timesheetC
Approve a payroll timesheet in Xero by its ID.
Inputs: timesheetID (required).
create-bank-transactionC
Create a bank transaction in Xero. When a bank transaction is created, a deep link to the bank transaction in Xero is returned. This deep link can be used to view the bank transaction in Xero directly. This link should be displayed to the user.
Inputs: type (required), contactId (required), lineItems (required), bankAccountId (required), +2 more.
create-contactB
Create a contact in Xero. When a contact is created, a deep link to the contact in Xero is returned. This deep link can be used to view the contact in Xero directly. This link should be displayed to the user.
Inputs: name (required), email, phone.
create-credit-noteC
Create a credit note in Xero. When a credit note is created, a deep link to the credit note in Xero is returned. This deep link can be used to view the credit note in Xero directly. This link should be displayed to the user.
Inputs: contactId (required), lineItems (required), reference.
create-invoiceB
Create an invoice in Xero. When an invoice is created, a deep link to the invoice in Xero is returned. This deep link can be used to view the invoice in Xero directly. This link should be displayed to the user.
Inputs: type (required), contactId (required), lineItems (required), date, +1 more.
create-itemC
Create an item in Xero.
Inputs: code (required), name (required), description, salesDetails, +4 more.
create-manual-journalB
Create a manual journal in Xero. Retrieve a list of account codes in Xero to use for the journal lines. Journal lines must contain at least two individual journal lines with account codes, use basic accounting account types pairing when not specified, and make sure journal line pairs have credit and debit balanced.
Inputs: narration (required), manualJournalLines (required), url, date, +3 more.
create-paymentA
Create a payment against an invoice in Xero. This tool records a payment transaction against an invoice. You'll need to provide the invoice ID, account ID to make the payment from, and the amount. The amount must be positive and should not exceed the remaining amount due on the invoice. A payment can only be created for an invoice that is status AUTHORIZED A payment can only be created for an invoice that is not fully paid When a payment is created, a deep link to the payment in Xero is returned. This deep link can be used to view the payment in Xero directly. This link should be displayed to the user.
Inputs: amount (required), accountId (required), invoiceId (required), date, +1 more.
create-quoteC
Create a quote in Xero. When a quote is created, a deep link to the quote in Xero is returned. This deep link can be used to view the quote in Xero directly. This link should be displayed to the user.
Inputs: contactId (required), lineItems (required), terms, title, +3 more.
create-timesheetC
Create a new payroll timesheet in Xero. This allows you to specify details such as the employee ID, payroll calendar ID, start and end dates, and timesheet lines.
Inputs: endDate (required), startDate (required), employeeID (required), payrollCalendarID (required), +1 more.
create-tracking-categoryC
Create a tracking category in Xero.
Inputs: name (required).
create-tracking-optionsC
Create tracking options for a tracking category in Xero.
Inputs: optionNames (required), trackingCategoryId (required).
delete-timesheetC
Delete an existing payroll timesheet in Xero by its ID.
Inputs: timesheetID (required).
get-timesheetA
Retrieve a single payroll timesheet from Xero by its ID. This provides details such as the timesheet ID, employee ID, start and end dates, total hours, and the last updated date.
Inputs: timesheetID (required).
list-accountsA
Lists all accounts in Xero. Use this tool to get the account codes and names to be used when creating invoices in Xero
Inputs: no named parameters.
list-aged-payables-by-contactC
Lists the aged payables in Xero. This shows aged payables for a certain contact up to a report date.
Inputs: contactId (required), reportDate, invoicesToDate, invoicesFromDate.
list-aged-receivables-by-contactC
Lists the aged receivables in Xero. This shows aged receivables for a certain contact up to a report date.
Inputs: contactId (required), reportDate, invoicesToDate, invoicesFromDate.
list-bank-transactionsB
List all bank transactions in Xero. Ask the user if they want to see bank transactions for a specific bank account, or to see all bank transactions before running. Ask the user if they want the next page of quotes after running this tool if 10 bank transactions are returned. If they do, call this tool again with the next page number and the bank account if one was provided in the provided in the previous call.
Inputs: page (required), bankAccountId.
list-contact-groupsB
List all contact groups in Xero. You can optionally specify a contact group ID to retrieve details for that specific group, including its contacts.
Inputs: contactGroupId.
list-contactsC
List all contacts in Xero. This includes Suppliers and Customers.
Inputs: page, searchTerm.
list-credit-notesA
List credit notes in Xero. Ask the user if they want to see credit notes for a specific contact, or to see all credit notes before running. Ask the user if they want the next page of credit notes after running this tool if 10 credit notes are returned. If they want the next page, call this tool again with the next page number and the contact if one was provided in the previous call.
Inputs: page (required), contactId.
list-invoicesA
List invoices in Xero. This includes Draft, Submitted, and Paid invoices. Ask the user if they want to see invoices for a specific contact, invoice number, or to see all invoices before running. Ask the user if they want the next page of invoices after running this tool if 10 invoices are returned. If they want the next page, call this tool again with the next page number and the contact or invoice number if one was provided in the previous call.
Inputs: page (required), contactIds, invoiceNumbers.
list-itemsB
Lists all items in Xero. Use this tool to get the item codes and descriptions to be used when creating invoices in Xero
Inputs: page (required).
list-manual-journalsC
List all manual journals from Xero. Ask the user if they want to see a specific manual journal or all manual journals before running. Can optionally pass in manual journal ID to retrieve a specific journal, or a date to filter journals modified after that date. The response presents a complete overview of all manual journals currently registered in your Xero account, with their details. Ask the user if they want the next page of manual journals after running this tool if 10 manual journals are returned. If they want the next page, call this tool again with the next page number, modified date, and the manual journal ID if one was provided in the previous call.
Inputs: page, modifiedAfter, manualJournalId.
list-organisation-detailsB
Lists the organisation details from Xero. Use this tool to get information about the current Xero organisation.
Inputs: no named parameters.
list-paymentsA
List payments in Xero. This tool shows all payments made against invoices, including payment date, amount, and payment method. You can filter payments by invoice number, invoice ID, payment ID, or invoice reference. Ask the user if they want to see payments for a specific invoice, contact, payment or reference before running. If many payments are returned, ask the user if they want to see the next page.
Inputs: page, invoiceId, paymentId, reference, +1 more.
list-payroll-employee-leaveB
List all leave records for a specific employee in Xero. This shows all leave transactions including approved, pending, and processed time off. Provide an employee ID to see their leave history.
Inputs: employeeId (required).
list-payroll-employee-leave-balancesC
List all leave balances for a specific employee in Xero. This shows current leave balances for all leave types available to the employee, including annual, sick, and other leave types.
Inputs: employeeId (required).
list-payroll-employee-leave-typesB
List all leave types available for a specific employee in Xero. This shows detailed information about the types of leave an employee can take, including schedule of accrual, leave type name, and entitlement.
Inputs: employeeId (required).
list-payroll-employeesA
List all payroll employees in Xero. This retrieves comprehensive employee details including names, User IDs, dates of birth, email addresses, gender, phone numbers, start dates, engagement types (Permanent, FixedTerm, or Casual), titles, and when records were last updated. The response presents a complete overview of all staff currently registered in your Xero payroll, with their personal and employment information. If there are many employees, ask the user if they would like to see more detailed information about specific employees before proceeding.
Inputs: no named parameters.
list-payroll-leave-periodsA
List all leave periods for a specific employee in Xero. This shows detailed time off periods including start and end dates, period status, payment dates, and leave types. Provide an employee ID to see their leave periods.
Inputs: employeeId (required), endDate, startDate.
list-payroll-leave-typesB
Lists all available leave types in Xero Payroll. This provides information about all the leave categories configured in your Xero system, including statutory and organization-specific leave types.
Inputs: no named parameters.
list-profit-and-lossC
Lists profit and loss report in Xero. This provides a summary of revenue, expenses, and profit or loss over a specified period of time.
Inputs: toDate, periods, fromDate, timeframe, +2 more.
list-quotesA
List all quotes in Xero. Ask the user if they want to see quotes for a specific contact before running. Ask the user if they want the next page of quotes after running this tool if 10 quotes are returned. If they do, call this tool again with the page number and the contact provided in the previous call.
Inputs: page (required), contactId, quoteNumber.
list-report-balance-sheetC
List the Balance Sheet report from Xero.
Inputs: date, periods, timeframe, paymentsOnly, +3 more.
list-tax-ratesA
Lists all tax rates in Xero. Use this tool to get the tax rates to be used when creating invoices in Xero
Inputs: no named parameters.
list-timesheetsB
List all payroll timesheets in Xero. This retrieves comprehensive timesheet details including timesheet IDs, employee IDs, start and end dates, total hours, and the last updated date.
Inputs: no named parameters.
list-tracking-categoriesB
List all tracking categories in Xero, along with their associated tracking options.
Inputs: includeArchived.
list-trial-balanceB
Lists trial balance in Xero. This provides a snapshot of the general ledger, showing debit and credit balances for each account.
Inputs: date, paymentsOnly.
revert-timesheetC
Revert a payroll timesheet to draft in Xero by its ID.
Inputs: timesheetID (required).
update-bank-transactionC
Update a bank transaction in Xero. When a bank transaction is updated, a deep link to the bank transaction in Xero is returned. This deep link can be used to view the bank transaction in Xero directly. This link should be displayed to the user.
Inputs: bankTransactionId (required), date, type, contactId, +2 more.
update-contactC
Update a contact in Xero. When a contact is updated, a deep link to the contact in Xero is returned. This deep link can be used to view the contact in Xero directly. This link should be displayed to the user.
Inputs: name (required), contactId (required), email, phone, +3 more.
update-credit-noteA
Update a credit note in Xero. Only works on draft credit notes. All line items must be provided. Any line items not provided will be removed. Including existing line items. Do not modify line items that have not been specified by the user. When a credit note is updated, a deep link to the credit note in Xero is returned. This deep link can be used to view the credit note in Xero directly. This link should be displayed to the user.
Inputs: creditNoteId (required), date, contactId, lineItems, +1 more.
update-invoiceA
Update an invoice in Xero. Only works on draft invoices. All line items must be provided. Any line items not provided will be removed. Including existing line items. Do not modify line items that have not been specified by the user. When an invoice is updated, a deep link to the invoice in Xero is returned. This deep link can be used to view the contact in Xero directly. This link should be displayed to the user.
Inputs: invoiceId (required), date, dueDate, contactId, +2 more.
update-itemC
Update an item in Xero.
Inputs: code (required), name (required), itemId (required), description, +5 more.
update-manual-journalB
Update a manual journal in Xero. Only works on draft manual journals. Do not modify line items or parameters that have not been specified by the user.
Inputs: narration (required), manualJournalID (required), manualJournalLines (required), url, +4 more.
update-quoteA
Update a quote in Xero. Only works on draft quotes. All line items must be provided. Any line items not provided will be removed. Including existing line items. Do not modify line items that have not been specified by the user. When a quote is updated, a deep link to the quote in Xero is returned. This deep link can be used to view the quote in Xero directly. This link should be displayed to the user.
Inputs: quoteId (required), date, terms, title, +6 more.
update-timesheet-lineC
Update an existing timesheet line in a payroll timesheet in Xero.
Inputs: timesheetID (required), timesheetLine (required), timesheetLineID (required).
update-tracking-categoryC
Updates an existing tracking category in Xero.
Inputs: trackingCategoryId (required), name, status.
update-tracking-optionsC
Updates tracking options for a tracking category in Xero.
Inputs: options (required), trackingCategoryId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 51 tools
Most tools map to distinct Xero resources and actions, and the descriptions make similar payroll/leave and reporting tools reasonably separable. A few areas overlap, especially the multiple payroll leave list tools and list-vs-filter patterns, but overall an agent can tell them apart.
Tool names consistently use kebab-case verb-resource patterns such as create-invoice, list-contacts, update-item, and delete-timesheet. Minor variations like list-report-balance-sheet are still readable and fit the same overall convention.
With 51 tools, the surface is far above the ideal 3-15 range and will make tool selection harder for an agent. The breadth reflects the Xero accounting domain, but the set is still too large for a single MCP server without stronger grouping or consolidation.
Core create/list/update flows are well represented across invoices, contacts, items, quotes, credit notes, bank transactions, and payroll timesheets. However, delete operations are missing for most resources, direct get-by-ID tools are absent for almost everything except timesheets, and create-timesheet requires a payroll calendar ID even though no tool lists payroll calendars.
Maintenance
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
MCP server for Codat — companies, connections, invoices, bills and financial statements.
AI-native accounting MCP server: books, bank rec, invoices, bills, inventory, close & reports.
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- AlicenseBqualityBmaintenanceAn MCP server allowing Clients to interact with Xero Accounting Software15128 npm22MIT
- AlicenseNot gradedqualityNot gradedmaintenanceAn enhanced MCP server for Xero, enabling natural language interaction with your Xero organisation for accounting tasks like invoices, contacts, bank transactions, and payroll.MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI assistants to read and write Xero accounting data, including invoices, contacts, accounts, and payments, through natural language.MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for integrating Xero with GenAI applications.-