add-timesheet-line
Add a new timesheet line to an existing payroll timesheet in Xero.
Raise invoices, quotes and credit notes in a Xero organisation, pull the trial balance or profit and loss behind them, and take payroll timesheets from draft to approved.
LABSCO SUMMARY
The report tools return the trial balance, profit and loss, balance sheet and aged receivables or payables, and the same server creates the invoice, credit note or manual journal that follows from what they show. The update tools are the part to know about before you start: update-invoice, update-quote and update-credit-note work on drafts only, and each removes any line item you do not resend, so a partial update is a deletion. Payments carry their own precondition — an invoice has to be AUTHORIZED before create-payment will record anything against it.
A server over the Xero accounting API: 51 tools spanning sales documents, bank transactions, manual journals, the payroll module and the standard finance reports.
A Xero app with its XERO_CLIENT_ID and XERO_CLIENT_SECRET, plus XERO_SCOPES naming the scopes the tools may use, and the Xero organisation whose ledger they read and write. The timesheet tools additionally need employees and a payroll calendar in that organisation, since create-timesheet is addressed by employeeID and payrollCalendarID. MIT-licensed.
One command plus credentials — npx -y @xeroapi/xero-mcp-server@latest, then supply credentials
USE CASES
Look up the contact, then the account codes, item codes and tax rates the line items need, and raise the invoice from the same session. The created invoice comes back as a deep link into Xero for whoever has to look at it next.
Pull the aged receivables for one contact up to a report date, read the invoices and the payments already made against them, and record the payment when it arrives. The invoice has to be AUTHORIZED before a payment will attach to it.
Read the trial balance, then the profit and loss and balance sheet for the same dates, and post the correcting journal where they disagree. Journal lines carry account codes and have to balance across at least two lines.
Find the employee, open or create the timesheet against their payroll calendar, add the lines, then approve it. Approval is reversible from the same set — revert-timesheet puts one back to draft.
One employee ID answers the whole question: current balances by leave type, the leave already taken or pending, the periods those fall in with their payment dates, and the entitlements behind them.
Create the tracking category and its options once, and the balance sheet report will take tracking option IDs afterwards. Existing categories and their options can be read back before you add to them.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
add-timesheet-lineAdd a new timesheet line to an existing payroll timesheet in Xero.
approve-timesheetApprove a payroll timesheet in Xero by its ID.
create-bank-transactionCreate 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.
create-contactCreate 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.
create-credit-noteCreate 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.
create-invoiceCreate 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.
create-itemCreate an item in Xero.
create-manual-journalCreate 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.
create-paymentCreate 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.
create-quoteCreate 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.
create-timesheetCreate 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.
create-tracking-categoryCreate a tracking category in Xero.
create-tracking-optionsCreate tracking options for a tracking category in Xero.
delete-timesheetDelete an existing payroll timesheet in Xero by its ID.
get-timesheetRetrieve 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.
list-accountsLists all accounts in Xero. Use this tool to get the account codes and names to be used when creating invoices in Xero
list-aged-payables-by-contactLists the aged payables in Xero. This shows aged payables for a certain contact up to a report date.
list-aged-receivables-by-contactLists the aged receivables in Xero. This shows aged receivables for a certain contact up to a report date.
list-bank-transactionsList 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.
list-contact-groupsList all contact groups in Xero. You can optionally specify a contact group ID to retrieve details for that specific group, including its contacts.
list-contactsList all contacts in Xero. This includes Suppliers and Customers.
list-credit-notesList 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.
list-invoicesList 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.
list-itemsLists all items in Xero. Use this tool to get the item codes and descriptions to be used when creating invoices in Xero
list-manual-journalsList 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.
list-organisation-detailsLists the organisation details from Xero. Use this tool to get information about the current Xero organisation.
list-paymentsList 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.
list-payroll-employee-leaveList 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.
list-payroll-employee-leave-balancesList 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.
list-payroll-employee-leave-typesList 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.
list-payroll-employeesList 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.
list-payroll-leave-periodsList 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.
list-payroll-leave-typesLists 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.
list-profit-and-lossLists profit and loss report in Xero. This provides a summary of revenue, expenses, and profit or loss over a specified period of time.
list-quotesList 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.
list-report-balance-sheetList the Balance Sheet report from Xero.
list-tax-ratesLists all tax rates in Xero. Use this tool to get the tax rates to be used when creating invoices in Xero
list-timesheetsList 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.
list-tracking-categoriesList all tracking categories in Xero, along with their associated tracking options.
list-trial-balanceLists trial balance in Xero. This provides a snapshot of the general ledger, showing debit and credit balances for each account.
revert-timesheetRevert a payroll timesheet to draft in Xero by its ID.
update-bank-transactionUpdate 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.
update-contactUpdate 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.
update-credit-noteUpdate 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.
update-invoiceUpdate 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.
update-itemUpdate an item in Xero.
update-manual-journalUpdate 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.
update-quoteUpdate 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.
update-timesheet-lineUpdate an existing timesheet line in a payroll timesheet in Xero.
update-tracking-categoryUpdates an existing tracking category in Xero.
update-tracking-optionsUpdates tracking options for a tracking category in Xero.
BEFORE YOU INSTALL
51 tools when we connected.
Both documented setups run the server on your machine.
CONTEXT COST
Rated by the size of the 51 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y @xeroapi/xero-mcp-server@latest{
"mcpServers": {
"xero": {
"command": "npx",
"args": [
"-y",
"@xeroapi/xero-mcp-server@latest"
],
"env": {
"XERO_CLIENT_ID": "<YOUR_XERO_CLIENT_ID>",
"XERO_CLIENT_SECRET": "<YOUR_XERO_CLIENT_SECRET>",
"XERO_SCOPES": "accounting.invoices accounting.contacts accounting.settings"
}
}
}
}{
"mcpServers": {
"xero": {
"command": "npx",
"args": [
"-y",
"@xeroapi/xero-mcp-server@latest"
],
"env": {
"XERO_CLIENT_BEARER_TOKEN": "<YOUR_XERO_CLIENT_BEARER_TOKEN>"
}
}
}
}