List contacts in your Xero organization
Get details of a specific contact by ID
Create a new contact in Xero
Update an existing contact in Xero
List contact groups in your Xero organization
List accounts in your chart of accounts
Get details of a specific account by ID
Create a new invoice in Xero
List invoices in your Xero organization
Get details of a specific invoice by ID
List organizations you have access to in Xero
The Xero MCP server provides a bridge between the Model Context Protocol and Xero's accounting API. It enables AI assistants to interact with Xero's accounting platform, allowing for contact management, chart of accounts access, invoice creation, and other accounting operations. With this integration, you can leverage Xero's powerful accounting features directly through AI assistants that support the MCP protocol. The server handles authentication, data formatting, and API interactions, making it easy to perform accounting tasks programmatically.
The Xero MCP server provides a standardized interface for AI assistants to interact with Xero's accounting platform. This integration allows you to manage contacts, access chart of accounts, create and manage invoices, and perform other accounting operations directly through AI assistants that support the Model Context Protocol.
Before setting up the Xero MCP server, you'll need:
npm install @xeroapi/xero-mcp-server
git clone https://github.com/XeroAPI/xero-mcp-server.git
cd xero-mcp-server
npm install
Create a .env
file in the root directory based on the .env.example
file.
Set up authentication using one of the two supported methods:
This method is ideal for development and testing, allowing you to specify client ID and secrets for a specific organization.
Set up a Custom Connection in your Xero Developer account:
Update your .env
file with the following:
XERO_CLIENT_ID=your_client_id
XERO_CLIENT_SECRET=your_client_secret
XERO_REDIRECT_URI=http://localhost:8080/callback
Start the server and complete the authentication flow:
npm start
Follow the authentication prompts in your terminal to authorize the connection.
For production environments or when integrating with existing authentication systems:
Update your .env
file with:
XERO_BEARER_TOKEN=your_bearer_token
Ensure your bearer token has the necessary scopes for the operations you plan to perform.
Start the server with:
npm start
By default, the server runs on port 8080. You can change this by setting the PORT
environment variable.
To use the Xero MCP server with AI assistants that support the Model Context Protocol:
http://localhost:8080
)