Xero MCP Server

Xero MCP Server

A Model Context Protocol server that enables Claude Desktop to interact with Xero Accounting API using natural language for reading, writing, and reporting on accounting data.

Category
Visit Server

README

Xero MCP Server

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

功能

读取(9 个工具)

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

写入(6 个工具)

  • 创建联系人、发票、银行交易、手工日记账
  • 记录付款、上传附件

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

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

两种运行模式

本地 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured