Skip to main content
Glama
Xero MCP Server

Xero MCP Server

by zoranges

Xero MCP Server

Xero Accounting API 的 MCP (Model Context Protocol) 服务器,让 Claude Desktop 用自然语言操作 Xero 云会计系统。

功能

读取(9 个工具)

  • 组织信息、联系人、科目表、发票、银行交易、付款、贷项通知单、产品目录、手工日记账

  • 审计轨迹查询

写入(6 个工具)

  • 创建联系人、发票、银行交易、手工日记账

  • 记录付款、上传附件

报表(4 个工具,本地计算)

  • 试算平衡表、应收账款账龄、应付账款账龄、损益表

Related MCP server: Xero MCP Server

两种运行模式

本地 STDIO 模式

pip install -r requirements.txt

# 设置环境变量
export XERO_CLIENT_ID=xxx
export XERO_CLIENT_SECRET=xxx
export XERO_TENANT_ID=xxx
export XERO_REFRESH_TOKEN=xxx

python server.py

Claude Desktop 配置见 claude_desktop_config_example.json

远程 HTTP 模式(多租户)

cp .env.example .env
# 编辑 .env 填写凭证和域名

docker compose up -d --build

详细部署教程见 部署教程.md 和 Claude_Desktop_MCP配置教程.md

架构

Claude Desktop ──HTTPS──▶ Nginx ──HTTP──▶ MCP Server ──OAuth 2.0──▶ Xero API
  • Nginx 负责 SSL 终结和反向代理

  • MCP Server (Starlette + uvicorn) 处理 MCP 协议

  • 多租户通过 API Key 隔离,OAuth Token 存在 SQLite

文件说明

文件

用途

server.py

本地 STDIO 模式入口

server_remote.py

远程 HTTP 多租户模式入口

xero_client.py

Xero API 客户端,自动刷新 Token

aggregations.py

本地报表计算(试算平衡/账龄/损益)

Dockerfile / docker-compose.yml

Docker 部署

部署教程.md

服务器部署详细步骤

Claude_Desktop_MCP配置教程.md

Claude Desktop 配置教程(含踩坑记录)

依赖

  • Python 3.12+

  • mcp >= 2.0.0

  • uvicorn / starlette

  • requests

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • Query and export Xero finance data and prepare accounting drafts in your xpnAI Workspace.

      https://api.xpnai.app/mcp
    • MYOB MCP server for ChatGPT, Claude and any AI agent: create invoice, send invoice, record payment, create bill and list overdue invoices in your own MYOB account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to MYOB yourself; Cotlet does not store your password and you need no MYOB API key. About the official MYOB API: Yes, MYOB has a full REST API, the MYOB Business API, for sales invoices, bills, customer and supplier payments and contacts (checked 14 Oct 2026), but it is not open by default: you request access through the API support form, register an app in my.MYOB for a key and secret, and every user grants OAuth consent per company file. MYOB also runs an official connector for Claude and ChatGPT, but it is read-only and in invite-only beta in Australia, so no official MCP server creates or sends an invoice. Setup and FAQ: https://cotlet.dev/integrations/myob-api-mcp-server

      https://cotlet.dev/mcp/v1/myob
    • 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

      https://mcp.apideck.dev/mcp
    • MCP server for Codat — companies, connections, invoices, bills and financial statements.

      https://codat.usefulapi.io/mcp

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      A Model Context Protocol server implementation providing standardized access to Xero's accounting and business features, enabling operations like contact management, invoice creation, and chart of accounts management through MCP.
      51
      21,642 npm
      394
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that integrates LinkedIn, Salesforce, and Xero, enabling AI agents to perform CRUD operations, search, and manage data across these platforms through natural language.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An enhanced MCP server for Xero, enabling natural language interaction with your Xero organisation for accounting tasks like invoices, contacts, bank transactions, and payroll.
      MIT