Xero
A collection of examples demonstrating how to build AI agents that integrate with the Xero API using various agentic frameworks and the Xero MCP (Model Context Protocol) Server.
What is Xero?
Xero is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to collection of examples demonstrating how to build ai agents that integrate with the xero api using various agentic frameworks and the xero mcp (model context protocol) server.
A collection of examples demonstrating how to build AI agents that integrate with the Xero API using various agentic frameworks and the Xero MCP (Model Context Protocol) Server.
This server falls under the Business Applications category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A collection of examples demonstrating how to build AI agent
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx xero-agent-toolkitConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Xero
The Xero Agent Toolkit is a collection of reference implementations showing how to build AI agents that integrate with the Xero accounting API using popular agentic frameworks including LangChain, OpenAI Agents SDK, and Google ADK, all backed by the official Xero MCP Server. It demonstrates natural language interactions for accounting tasks: creating and updating invoices, managing customers and suppliers, recording payments, and querying financial reports. Developers and accounting software teams use it as a starting point for building production AI assistants that automate bookkeeping workflows through Xero's API without requiring users to navigate the Xero UI.
Prerequisites
- Python 3.10 or later with pip or uv installed
- A Xero developer account with a Custom Connection app (Client ID and Client Secret) — web app and PKCE app types do not work with these examples
- An API key for your chosen LLM framework: OpenAI API key for LangChain/OpenAI Agents examples, or Google AI Studio key for the Google ADK example
- Git to clone the repository
- An MCP-compatible client such as Claude Desktop
Clone the repository
Clone the Xero Agent Toolkit to your local machine.
git clone https://github.com/XeroAPI/xero-agent-toolkit.git
cd xero-agent-toolkitCreate a Xero Custom Connection app
Log in to developer.xero.com, create a new app, and choose 'Custom Connection' as the app type. Copy the Client ID and Client Secret. Note: Web app and PKCE app types are not compatible with these examples.
Navigate to your chosen framework directory and install dependencies
Each framework has its own subdirectory with its own requirements. Navigate to the one you want to use and install its dependencies.
# For the LangChain example:
cd langchain
pip install -r requirements.txt
# For the OpenAI Agents example:
cd openai-agents
pip install -r requirements.txtConfigure your Xero credentials and API keys
Set the required environment variables for your chosen framework. At minimum you need the Xero Client ID and Secret plus an LLM provider key.
export XERO_CLIENT_ID=your-xero-client-id
export XERO_CLIENT_SECRET=your-xero-client-secret
export OPENAI_API_KEY=sk-your-openai-api-keyRun the agent example
Follow the individual README inside each framework directory to start the agent. The agent connects to Xero via OAuth and exposes accounting tools through the Xero MCP Server.
python main.pyXero Examples
Client configuration
claude_desktop_config.json entry to connect to the Xero MCP Server directly (requires the Xero MCP Server package to be installed separately).
{
"mcpServers": {
"xero": {
"command": "npx",
"args": ["xero-mcp-server"],
"env": {
"XERO_CLIENT_ID": "your-xero-client-id",
"XERO_CLIENT_SECRET": "your-xero-client-secret"
}
}
}
}Prompts to try
Example accounting queries to try with a Xero-connected AI agent.
- "Create an invoice for ABC Corp for $1,500 consulting services due in 30 days"
- "Show me all overdue invoices and their total outstanding amount"
- "What is my profit and loss for this quarter?"
- "Create a new customer named XYZ Ltd with email [email protected]"
- "Record a payment of $750 against invoice INV-0042"
- "List all suppliers with outstanding bills over $5,000"Troubleshooting Xero
OAuth authentication fails or returns 'invalid_client' errors
Verify that XERO_CLIENT_ID and XERO_CLIENT_SECRET match exactly what is shown in your Xero developer dashboard. Confirm your app is configured as a 'Custom Connection' type — Web app and PKCE types are incompatible with these examples.
Agent cannot find or connect to Xero organisation data
Custom Connection apps in Xero must be explicitly authorized against a specific Xero organisation. Complete the OAuth consent flow for your target organisation in the Xero developer portal before running the agent.
LLM provider API calls fail with authentication or quota errors
Confirm the correct API key environment variable is set for your chosen framework (OPENAI_API_KEY for LangChain/OpenAI Agents, or Google credentials for ADK). Check your provider dashboard for quota limits or billing issues.
Frequently Asked Questions about Xero
What is Xero?
Xero is a Model Context Protocol (MCP) server that collection of examples demonstrating how to build ai agents that integrate with the xero api using various agentic frameworks and the xero mcp (model context protocol) server. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Xero?
Follow the installation instructions on the Xero GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Xero?
Xero works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Xero free to use?
Yes, Xero is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Xero Alternatives — Similar Business Applications Servers
Looking for alternatives to Xero? Here are other popular business applications servers you can use with Claude, Cursor, and VS Code.
n8n
★ 189.1kA comprehensive MCP server that provides full control over n8n automation workflows through natural language. It offers 43 tools for managing workflows, executions, credentials, and data tables, with safety features like write-mode protection and dou
LobeHub
★ 77.5k🤯 LobeHub is your Chief Agent Operator, organizing your agents into 7×24 operations by hiring, scheduling, and reporting on your entire AI team.
Jeecgboot
★ 46.4kAI 低代码平台,「低代码 + 零代码」双模式驱动:低代码一键生成前后端代码,零代码 5 分钟搭建系统,AI Skills 一句话画流程、设计表单、生成整套系统。内置 AI聊天、知识库、流程编排、MCP插件等,兼容主流大模型。引领「AI 生成 → 在线配置 → 代码生成 → 手工合并->AI修改」开发模式,消除 Java 项目 80% 的重复工作,提效而不失灵活。
CowAgent
★ 44.7kCowAgent (chatgpt-on-wechat) 是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、通过长期记忆和知识库不断成长,比OpenClaw更轻量和便捷。同时支持微信、飞书、钉钉、企微、QQ、公众号、网页等接入,可选择DeepSeek/OpenAI/Claude/Gemini/ MiniMax/Qwen/GLM/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助理和企业数字员工。
Minds Platform
★ 39.2kPlatform dedicated to building an open foundation for applied Artificial Intelligence, designed for people seeking production-ready AI systems they can truly control, extend and deploy anywhere.
Astrbot
★ 32.8kAI Agent Assistant & development framework that integrates lots of IM platforms, LLMs, plugins and AI feature, and can be your openclaw alternative. ✨
Browse More Business Applications MCP Servers
Explore all business applications servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Xero in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Xero?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.