Xero MCP Server
This is a Model Context Protocol (MCP) server implementation for Xero. It provides a bridge between the MCP protocol and Xero's API, allowing for standardized access to Xero's accounting and business features.
Features
- Xero OAuth2 authentication with custom connections
- Contact management
- Chart of Accounts management
- Invoice creation and management
- MCP protocol compliance
Prerequisites
- Node.js (v18 or higher)
- npm or pnpm
- A Xero developer account with API credentials
Configuring your Xero Developer account
Set up a Custom Connection following these instructions: https://developer.xero.com/documentation/guides/oauth2/custom-connections/
Currently the following scopes are required:
accounting.transactions accounting.contacts accounting.settings.read
Integrating the MCP server with Claude Desktop
To add the MCP server to Claude go to Settings > Developer > Edit config and add the following to your claude_desktop_config.json file:
1{ 2 "mcpServers": { 3 "xero": { 4 "command": "npx", 5 "args": ["-y", "@xeroapi/xero-mcp-server@latest"], 6 "env": { 7 "XERO_CLIENT_ID": "your_client_id_here", 8 "XERO_CLIENT_SECRET": "your_client_secret_here" 9 } 10 } 11 } 12}
Available MCP Commands
list-contacts
: Retrieve a list of contacts from Xerolist-invoices
: Retrieve a list of invoiceslist-accounts
: Retrieve a list of accountslist-tax-rates
: Retrieve a list of tax rateslist-quotes
: Retrieve a list of quoteslist-credit-notes
: Retrieve a list of credit notescreate-contact
: Create a new contactcreate-invoice
: Create a new invoicecreate-quote
: Create a new quotecreate-credit-note
: Create a new credit noteupdate-contact
: Update an existing contactupdate-invoice
: Update an existing draft invoice
For detailed API documentation, please refer to the MCP Protocol Specification.
For Developers
Installation
1# Using npm 2npm install 3 4# Using pnpm 5pnpm install
Run a build
1# Using npm 2npm run build 3 4# Using pnpm 5pnpm build
Integrating with Claude Desktop
To add the MCP server to Claude go to Settings > Developer > Edit config and add the following to your claude_desktop_config.json file:
1{ 2 "mcpServers": { 3 "xero": { 4 "command": "node", 5 "args": ["insert-your-file-path-here/xero-mcp-server/dist/index.js"], 6 "env": { 7 "XERO_CLIENT_ID": "your_client_id_here", 8 "XERO_CLIENT_SECRET": "your_client_secret_here" 9 } 10 } 11 } 12}
License
MIT
Security
Please do not commit your .env
file or any sensitive credentials to version control.