
Xero
io.github.wyre-technology由 GitHub 帳號 wyre-technology 發布v1.5.5更新於 Oct 24, 2026
MCP server for Xero accounting — contacts, invoices, payments, accounts, and financial reports.
概覽
面向 Xero 會計的 MCP 伺服器,讓助理瀏覽聯絡人、發票、付款、科目與財務報表,並可建立或更新記錄。
- 可以做什麼
- 在會計領域之間切換並返回領域選擇
- 列出、檢視、搜尋與建立聯絡人
- 列出與檢視發票,建立銷售發票或帳單,並更新發票狀態(提交、授權、作廢)
- 列出與檢視付款,並針對發票記錄付款
- 列出與檢視會計科目表項目
- 產生損益表、資產負債表、應收帳齡與應付帳齡報表
- 適用情境
- 適合需要查詢或操作 Xero 會計資料的情境:核對發票與付款狀態、尋找聯絡人、檢視會計科目表,或依期間取得標準財務報表。
- 執行需求
- 以本機程序執行(Node.js 20 或更新版本,或已發佈的容器映像)。需要 Xero 開發者帳號與 OAuth2 應用程式憑證:stdio 或 AUTH_MODE=env 模式下需 XERO_ACCESS_TOKEN 與 XERO_TENANT_ID。HTTP 模式另需 CONDUIT_S2S_SECRET。安裝已發佈的 npm 套件需要具備 read:packages 權限的 GitHub 權杖。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Xero,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Xero MCP Server
Model Context Protocol (MCP) server for the Xero Accounting API. Enables Claude and other MCP-compatible clients to manage Xero contacts, invoices, payments, accounts, and reports.
Features
- Contacts, invoices, payments, chart of accounts, and financial reports over stdio, HTTP, or Cloudflare Workers transports
- Interactive invoice card (MCP Apps, SEP-1865):
xero_invoices_getrenders as a rich, read-only card in MCP Apps hosts — neutral by default, brandable viawindow.__BRAND__injection orMCP_BRAND_*env vars - Gateway mode for per-request, multi-tenant credentials
One-Click Deployment
[Deploy to Cloudflare Workers]
Note on registry auth: This server depends only on public npm packages, so the Cloudflare and DigitalOcean cloud builders install its dependencies anonymously — no token is required for one-click deploy. (If a future release adds a private
@wyre-ai/*dependency, you would supply a GitHub PAT withread:packagesas a build variable —NODE_AUTH_TOKENfor Cloudflare Workers, a build-timeGITHUB_TOKENsecret for DigitalOcean.)Installing the published package: The released package is published to the GitHub Packages npm registry, which requires authentication on every install (even for public packages). To install it, authenticate npm to
npm.pkg.github.comwith a GitHub PAT that hasread:packages:
Quick Start
Prerequisites
- Node.js >= 20
- Xero OAuth2 app credentials (requires a Xero developer account)
Install and Build
Run (stdio mode)
Run (HTTP mode)
CONDUIT_S2S_SECRET is required. If it is empty or a known placeholder, the process logs an error and exits non-zero. It never prints the secret.
With a secret set and MCP_HTTP_HOST unset, the server listens on http://0.0.0.0:8080/mcp.
Local HTTP without a secret is development-only. It logs a warning, does not check X-Gateway-S2S, and binds 127.0.0.1 only (a non-loopback MCP_HTTP_HOST is ignored):
Docker
The image listens on 0.0.0.0 inside the container. Publish the port on loopback and pass the S2S secret. Gateway mode does not read Xero credentials from the environment:
Single-tenant HTTP (AUTH_MODE=env) still requires the S2S secret, then uses XERO_ACCESS_TOKEN and XERO_TENANT_ID:
Docker Compose
The checked-in Compose service is gateway mode. It does not set XERO_ACCESS_TOKEN or XERO_TENANT_ID and does not use env_file, so a project .env cannot inject static vendor credentials into the container. Compose refuses to start when CONDUIT_S2S_SECRET is unset or empty, and publishes 127.0.0.1:8080:8080.
Environment Variables
Copy .env.example. Leave CONDUIT_S2S_SECRET empty in that file.
/health stays unauthenticated and does not read credentials. The stdio transport does not use CONDUIT_S2S_SECRET.
HTTP authentication
With MCP_TRANSPORT=http and CONDUIT_S2S_SECRET set, every /mcp request must include X-Gateway-S2S. The check is verifyS2sHeader in src/s2s-verify.ts.
The header value is t=<unix seconds>,v1=<hex>:
<unix seconds>is the current UTC time.<hex>is HMAC-SHA256 of the literal stringt=<unix seconds>(the samet=prefix and digits), keyed withCONDUIT_S2S_SECRET, encoded as 64 lowercase hex characters.- The timestamp must be within 300 seconds of the server clock.
A missing or invalid header is HTTP 401, before vendor credentials are read. The secret is never logged.
Known placeholders (replace-with-a-real-secret, your-s2s-secret, your-secret, changeme, change-me, placeholder, secret, example, replace-me, s2s-secret, any case, surrounding whitespace ignored) are refused at startup so a copied example cannot forge that header. Generate a secret with openssl rand -hex 32.
Gateway Mode
When AUTH_MODE=gateway, credentials are passed per-request via HTTP headers instead of environment variables:
X-Xero-Access-Token— OAuth2 access tokenX-Xero-Tenant-Id— Xero tenant ID
A request missing either header gets HTTP 401 and does not fall back to XERO_ACCESS_TOKEN or XERO_TENANT_ID. When CONDUIT_S2S_SECRET is set, the request must also include a valid X-Gateway-S2S header. This allows a gateway/proxy to manage multi-tenant credentials.
Interactive Invoice Card (MCP Apps)
xero_invoices_get renders as an interactive card in MCP Apps hosts
(Claude Desktop/web) showing status, contact, dates, amounts, and line
items; plain-JSON behavior is unchanged in other hosts. The card is
read-only — invoices are financial records, so no write actions are
exposed from it. It is neutral by default and brandable via
window.__BRAND__ injection or MCP_BRAND_* env vars (MCP_BRAND_NAME,
MCP_BRAND_LOGO_URL, MCP_BRAND_PRIMARY_COLOR, MCP_BRAND_ACCENT_COLOR,
MCP_BRAND_BG, MCP_BRAND_TEXT) — no rebuild needed.
Available Tools
Tools are organized into domains. Use xero_navigate to select a domain, then use the domain-specific tools.
Navigation
xero_navigate— Select a domain (contacts, invoices, payments, accounts, reports)xero_back— Return to domain selection
Contacts
xero_contacts_list— List contacts with pagination and optional filteringxero_contacts_get— Get detailed contact information by IDxero_contacts_create— Create a new contact (customer or supplier)xero_contacts_search— Search contacts by name
Invoices
xero_invoices_list— List invoices with optional status and type filtersxero_invoices_get— Get detailed invoice information by IDxero_invoices_create— Create a new invoice (sales or bill)xero_invoices_update_status— Update invoice status (submit, authorise, void)
Payments
xero_payments_list— List payments with optional status filterxero_payments_get— Get detailed payment information by IDxero_payments_create— Record a payment against an invoice
Accounts
xero_accounts_list— List chart of accounts with optional type/class filterxero_accounts_get— Get detailed account information by ID
Reports
xero_reports_profit_and_loss— Profit and Loss (income statement) for a date rangexero_reports_balance_sheet— Balance Sheet as of a specific datexero_reports_aged_receivables— Aged Receivables by contactxero_reports_aged_payables— Aged Payables by contact
License
Apache-2.0
來源:README.md,提交 2ed8cf8
工具
0版本歷史
1- v1.5.5最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分