Mcp Xero

io.github.codespar由 GitHub 帳號 codespar 發布v0.2.2更新於 Oct 24, 2026

MCP server for Xero — global cloud accounting: contacts, invoices, payments, items, reports

已驗證STDIO僅桌面金融商業與電商

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理連接 Xero 雲端會計,管理聯絡人、發票、付款、品項和報表。

可以做什麼
建立、讀取、更新和封存聯絡人(客戶與供應商),並列出組織、稅率和會計科目表。建立、讀取、更新和作廢發票,並把已授權的發票以電子郵件寄到聯絡人存檔的信箱。記錄和列出付款、貸項通知單、品項和銀行交易。取得該租戶的資產負債表報表。可用 Xero where 子句運算式篩選清單結果。
適用情境
適合需要讓助理處理 Xero 會計資料的情境,例如為在巴西以外營運或有國際實體的公司草擬發票、記錄付款或取得資產負債表,不必離開對話。
執行需求
以 npm 套件形式透過 stdio 在本機執行(需要 Node.js)。需要預先簽發的 Xero OAuth2 存取權杖(XERO_ACCESS_TOKEN)以及租戶或組織 ID(XERO_TENANT_ID)。OAuth 授權、更新權杖輪替和租戶選擇需在上游處理;權杖過期會回傳 401,需更新後重試。
安裝前請注意
存取權杖是機密,可存取組織的會計資料,應避免寫入日誌並在過期時輪替。多個工具會寫入真實會計記錄,包括建立發票、付款、貸項通知單和銀行交易,作廢發票,封存聯絡人以及寄送發票郵件給客戶。執行寫入操作前請先確認。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Xero,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@codespar/mcp-xero

MCP server for Xero — global cloud accounting for SMBs.

Xero is the #2 global SMB ERP and the leader in the UK, Australia, and New Zealand, with rapid expansion in the US. Paired with QuickBooks, the two platforms cover roughly 80% of global SMB accounting. For LatAm SaaS serving US/UK/AU/NZ customers or with international subsidiaries, Xero is the essential complement to our Brazil-native ERPs (Omie, Conta Azul, Bling, Tiny).

Tools (24)

ToolPurpose
create_contactCreate a Xero contact (customer or supplier — Xero uses one unified Contact object with IsCustomer/IsSuppli...
get_contactRetrieve a single Xero contact by ContactID (UUID).
list_contactsList Xero contacts.
create_invoiceCreate an invoice in Xero.
get_invoiceRetrieve a single invoice by InvoiceID (UUID) or InvoiceNumber.
list_invoicesList invoices with optional Xero where-clause filtering.
email_invoiceEmail an AUTHORISED invoice to the contact's email address on file.
create_paymentRecord a payment against an invoice or credit note.
create_itemCreate a Xero inventory/product item.
list_itemsList all items/products in the Xero tenant.
list_accountsList the Xero chart of accounts.
update_contactUpdate an existing Xero contact.
archive_contactArchive a Xero contact by setting ContactStatus=ARCHIVED.
update_invoiceUpdate an existing invoice.
void_invoiceVoid an invoice by setting Status=VOIDED.
get_paymentRetrieve a single payment by PaymentID.
list_paymentsList payments recorded in Xero.
create_bank_transactionCreate a bank transaction (SPEND = money out, RECEIVE = money in) directly on a bank account — for transact...
list_bank_transactionsList bank transactions (spend/receive entries on bank accounts).
list_organisationsRetrieve the Xero organisation(s) the access token has access to — returns name, base currency, country, fi...
list_tax_ratesList tax rates configured in the Xero tenant.
create_credit_noteCreate a credit note.
list_credit_notesList credit notes.
get_balance_sheetRetrieve the Balance Sheet report for the tenant.

Install

bash
npm install @codespar/mcp-xero

Environment

bash
XERO_ACCESS_TOKEN="..."   # OAuth2 bearer access token (required, secret)XERO_TENANT_ID="..."      # Xero tenant/organization id (required)

Authentication

Xero uses OAuth2. Every request includes:

Authorization: Bearer <XERO_ACCESS_TOKEN>Xero-tenant-id: <XERO_TENANT_ID>Accept: application/jsonContent-Type: application/json

This server assumes a pre-issued access token. OAuth consent, refresh-token rotation, and tenant selection happen upstream (in your OAuth proxy or secrets layer). When the token expires, Xero returns 401 and the tool surfaces the error verbatim — refresh and retry.

Run

bash
# stdio (default — Claude Desktop, Cursor, etc)npx @codespar/mcp-xero
# HTTP (server-to-server testing)MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-xero

Where clause

Xero's list endpoints accept a where query param for server-side filtering. Examples:

Name.Contains("ACME")IsCustomer==trueStatus=="AUTHORISED" AND Type=="ACCREC"Date>=DateTime(2026,1,1)Contact.ContactID==guid("00000000-0000-0000-0000-000000000000")

Positioning in the CodeSpar ERP catalog

  • Brazil-native: Omie, Conta Azul, Bling, Tiny — NF-e, Simples Nacional, local tax.
  • Global SMB: Xero + QuickBooks — US/UK/AU/NZ/global accounting.

Use Xero for companies headquartered or operating outside Brazil (or with international entities). Use the BR-native servers for the local market.

Docs

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

來源:packages/erp/xero/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分