finance
Xero MCP, CLI, and Lua Integration for AI Agents
Xero integration docs for AI agents: MCP gateway setup, Xero CLI commands, Lua API reference, credentials, and function schemas.
7 functions 6 read 1 write Manual OAuth token auth
Xero for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
xero- route_slug
xero- package
xero- auth_strategy
oauth2_manual_tokenManual OAuth token- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Xero CLIHeadless setup and direct function calls. Xero MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Xero MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Xero.
Claude Code Xero MCP setup for Claude Code. Cursor Xero MCP setup for Cursor. Codex Xero MCP setup for Codex. OpenAI Agents Xero MCP setup for OpenAI Agents SDK. Claude Agent SDK Xero MCP setup for Claude Agent SDK. Vercel AI SDK Xero MCP setup for Vercel AI SDK. LangChain Xero MCP setup for LangChain. LangGraph Xero MCP setup for LangGraph. CrewAI Xero MCP setup for CrewAI. MCP clients Xero MCP setup for Generic MCP Clients.
Xero CLI Matrix
Use these pages for direct Xero CLI workflows in scripts, CI, cron, and agent wrappers.
CI Xero CLI for CI. Cron Jobs Xero CLI for cron jobs. Shell Scripts Xero CLI for shell scripts. Headless Automation Xero CLI for headless automation. Coding Agents Xero CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
xero.xero_create_invoice | Write write | 7 | Create a new invoice in Xero. Requires a contact_id and at least one line item with description and unit_amount. Returns the created invoice with its ID and number. |
xero.xero_get_contact | Read read | 1 | Retrieve a Xero contact by its ID. Returns the contact's ID, name, email, phone, addresses, and status. |
xero.xero_get_current_user | Read read | 0 | Retrieve the currently authenticated Xero user. Returns the user's ID, name, and email. Useful for identifying which Xero organisation or token is in use. |
xero.xero_get_invoice | Read read | 1 | Retrieve a Xero invoice by its ID. Returns the full invoice including line items, contact details, and totals. |
xero.xero_list_accounts | Read read | 2 | List Xero chart of accounts. Returns account codes, names, types, tax types, and statuses. |
xero.xero_list_contacts | Read read | 4 | List Xero contacts with pagination. Returns contact IDs, names, emails, and types. Use page for pagination (1-indexed). |
xero.xero_list_invoices | Read read | 5 | List Xero invoices with pagination and filtering. Returns invoice IDs, numbers, amounts, status, and dates. Use page and pageSize for pagination. |