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 分