xero-mcp-server
MCP ServerFreeAn MCP server that integrates with the MCP protocol. https://modelcontextprotocol.io/introduction
Capabilities11 decomposed
mcp protocol bridge to xero accounting api
Medium confidenceImplements a Model Context Protocol (MCP) server that translates MCP tool calls into Xero REST API requests and formats responses back to MCP-compliant JSON. Uses stdio transport for bidirectional communication with MCP clients (Claude Desktop, etc.), abstracting away Xero's REST API complexity behind a standardized protocol interface. The server instantiates core components during initialization and registers 49+ tools before accepting client connections.
Implements a five-layer architecture (protocol → tool management → business logic → API integration) with strategy pattern authentication that selects between BearerTokenXeroClient and CustomConnectionsXeroClient based on environment variables, enabling both multi-tenant and single-org deployments from the same codebase
Provides native MCP protocol support out-of-the-box (vs REST wrappers), enabling seamless integration with Claude Desktop and other MCP clients without custom adapter code
strategy-pattern authentication with dual credential support
Medium confidenceImplements a pluggable authentication system using the strategy pattern, selecting between two client implementations (BearerTokenXeroClient for OAuth tokens, CustomConnectionsXeroClient for client credentials) based on environment variables. Bearer token takes precedence when both credential types are present. The MCPXeroClient abstract base class defines the interface both implementations satisfy, allowing runtime credential selection without code changes.
Uses abstract base class MCPXeroClient with concrete implementations for each auth strategy, enabling compile-time type safety while maintaining runtime flexibility — bearer token precedence is baked into initialization logic rather than conditional checks throughout the codebase
Cleaner than conditional auth checks scattered across handlers; more flexible than hard-coded single auth method; supports both OAuth (multi-tenant) and client credentials (development) without separate deployments
xero organization context and multi-tenant isolation
Medium confidenceManages organization context (tenant ID) throughout the request lifecycle, ensuring that all API calls are scoped to the correct Xero organization. The server extracts organization ID from authentication context (OAuth token or client credentials) and passes it to all tool handlers. This prevents cross-tenant data leakage and ensures that each request operates on the correct organization's data.
Extracts organization ID from authentication context at server initialization and threads it through all tool handlers via dependency injection, preventing accidental cross-tenant queries that would be easy to miss with manual parameter passing
More secure than passing organization ID as tool parameter (cannot be overridden by client); more efficient than querying organization ID on each request; prevents entire classes of multi-tenant bugs
accounting entity crud operations (invoices, contacts, quotes, credit notes, bank transactions, manual journals)
Medium confidenceProvides 36+ tools for creating, reading, updating, and deleting core accounting entities through the Xero API. Each entity type (Invoice, Contact, Quote, CreditNote, BankTransaction, ManualJournal, Item, TrackingCategory) has dedicated handler functions that map MCP tool parameters to Xero REST endpoints, handle validation, and format responses. The handler layer abstracts entity-specific business logic (e.g., invoice line items, contact addresses) from the protocol layer.
Separates entity handlers into dedicated modules (src/tools/create, src/tools/update, src/tools/list, src/tools/delete, src/tools/get) with consistent parameter validation and error handling patterns, enabling easy addition of new entity types without modifying core protocol logic
More granular than generic REST proxy (each entity has optimized parameters and validation); more maintainable than monolithic handler (entity-specific logic isolated); supports Xero-specific features like tracking categories and line item arrays that generic CRUD tools miss
financial reporting with calculated metrics (p&l, balance sheet, trial balance, aged receivables/payables)
Medium confidenceExposes 5 financial report tools that retrieve pre-calculated accounting reports from Xero's reporting engine. Reports are fetched via dedicated API endpoints and formatted into structured JSON with line items, subtotals, and period comparisons. The server handles date range filtering, currency conversion, and report-specific parameters (e.g., tracking category breakdown for P&L).
Leverages Xero's server-side report calculation engine rather than computing reports client-side, eliminating the need to fetch and aggregate raw transactions — reports are pre-calculated and formatted by Xero's reporting infrastructure
Faster than transaction-level aggregation (no need to fetch 1000+ transactions); more accurate than client-side calculations (uses Xero's official GL); supports Xero-specific features like tracking category breakdowns that generic accounting tools don't expose
payroll operations for nz/uk regions (employees, timesheets, leave)
Medium confidenceProvides 8 tools for managing payroll in New Zealand and United Kingdom regions only, covering employee master data, timesheet entry, and leave accrual/usage. Tools interact with Xero Payroll API endpoints that are region-specific and require payroll-enabled organizations. The server validates region context before executing payroll operations and returns region-specific error messages if payroll is not enabled.
Implements region-aware payroll operations with compile-time region validation, preventing execution of payroll tools in unsupported regions and returning clear error messages — payroll API endpoints are region-specific and require different authentication scopes than accounting API
Tighter integration with Xero Payroll than generic HR APIs (understands NZ annual leave, UK statutory sick leave rules); prevents cross-region misconfiguration that would fail silently with generic REST clients
deep link generation for xero ui navigation
Medium confidenceGenerates clickable deep links to specific Xero UI pages (invoice detail, contact profile, report view) that users can follow to view or edit entities in the Xero web app. Links are constructed using entity IDs and organization context, enabling seamless handoff from AI agent to human user for manual review or editing. Helper utility functions format links based on entity type and Xero region.
Encapsulates Xero URL structure and region-specific routing in helper utilities, preventing hardcoded URLs scattered across handlers — supports multiple Xero regions (AU, NZ, UK, US) with correct domain and path formatting
More maintainable than embedding URLs in handler logic; supports region-aware routing that generic URL builders miss; enables audit trails showing exactly which Xero UI page was linked for each AI action
structured error handling with xero api error code mapping
Medium confidenceImplements a centralized error handling layer that catches Xero API errors, maps them to human-readable messages, and returns structured error responses to MCP clients. Error handler translates Xero-specific error codes (e.g., 'INVALID_CONTACT_STATUS', 'DUPLICATE_INVOICE_NUMBER') into actionable messages with remediation suggestions. Errors are logged with full context (request parameters, API response) for debugging.
Maps Xero-specific error codes to remediation suggestions (e.g., 'INVALID_CONTACT_STATUS' → 'Contact must be in ACTIVE status; use update_contact to change status first'), enabling agents to self-correct without human intervention
More actionable than raw API errors; better than generic HTTP status codes (distinguishes between validation errors, permission errors, and system errors); supports Xero-specific error semantics that generic error handlers miss
data formatting and field mapping for xero api compatibility
Medium confidenceProvides utility functions that transform MCP tool parameters into Xero API request format and transform Xero API responses into MCP-compatible JSON. Handles field name mapping (e.g., 'contact_name' → 'Name'), type conversion (dates to ISO 8601, amounts to decimal), and nested object flattening (e.g., contact addresses as array → individual address fields). Formatters ensure data consistency across all 49+ tools.
Centralizes field mapping logic in utility functions rather than scattering it across 49+ tool handlers, enabling consistent formatting and easy updates when Xero API changes field names or types
More maintainable than inline field mapping in each handler; supports Xero-specific types (tracking categories, line item arrays) that generic formatters don't understand; reduces boilerplate code across handlers
tool registration and discovery for mcp clients
Medium confidenceImplements a tool registry that exposes all 49+ tools to MCP clients via the MCP protocol's tools/list endpoint. Each tool is registered with metadata (name, description, input schema, output schema) that enables clients to discover capabilities and validate parameters before execution. The registry is populated during server initialization and remains static for the server lifetime. Input schemas are JSON Schema format, enabling client-side validation.
Registers tools with full JSON Schema input validation, enabling MCP clients to validate parameters before execution and provide autocomplete/type hints in UIs — schemas are generated from TypeScript types at build time
More discoverable than hardcoded tool lists; enables client-side validation before server execution (faster feedback); supports schema-driven UI generation that generic tool lists don't enable
stdio transport for mcp protocol communication
Medium confidenceImplements stdin/stdout-based bidirectional communication using the MCP protocol, enabling the server to receive tool calls from MCP clients and send responses back. The transport layer handles message framing, JSON serialization/deserialization, and error propagation. Stdio transport is compatible with any MCP client (Claude Desktop, custom agents, etc.) without requiring HTTP or WebSocket infrastructure.
Uses @modelcontextprotocol/sdk's stdio transport implementation, which handles MCP protocol framing and message serialization — server doesn't need to implement protocol parsing manually
Simpler than HTTP/WebSocket transport (no server port management); more secure for local deployments (no network exposure); compatible with Claude Desktop out-of-the-box
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with xero-mcp-server, ranked by overlap. Discovered automatically through the match graph.
@xeroapi/xero-mcp-server
MCP server implementation for Xero integration
MCP Plexus
**: A secure, **multi-tenant** Python MCP server framework built to integrate easily with external services via OAuth 2.1, offering scalable and robust solutions for managing complex AI applications.
MCPVerse
** - A portal for creating & hosting authenticated MCP servers and connecting to them securely.
1mcpserver
** - MCP of MCPs. Automatic discovery and configure MCP servers on your local machine. Fully REMOTE! Just use [https://mcp.1mcpserver.com/mcp/](https://mcp.1mcpserver.com/mcp/)
mcp-use
The fullstack MCP framework to develop MCP Apps for ChatGPT / Claude & MCP Servers for AI Agents.
MCP Router
** – Free Windows and macOS app that simplifies MCP management while providing seamless app authentication and powerful log visualization by **[MCP Router](https://github.com/mcp-router/mcp-router)**
Best For
- ✓AI assistant developers integrating Xero accounting workflows
- ✓Teams building multi-tenant AI applications with accounting backends
- ✓Xero partners extending AI capabilities to their user base
- ✓Multi-tenant SaaS platforms using OAuth for user-specific Xero access
- ✓Development teams testing against Xero sandbox with static credentials
- ✓Organizations migrating from client credentials to OAuth
- ✓Multi-tenant SaaS platforms using OAuth with per-user Xero access
- ✓Accounting firms managing multiple client organizations
Known Limitations
- ⚠Stdio transport limits concurrent connections — single client per server instance
- ⚠No built-in request queuing or rate-limiting — relies on Xero API rate limits
- ⚠Response formatting adds serialization overhead for large datasets (100+ records)
- ⚠No automatic token refresh — bearer tokens must be pre-refreshed by caller
- ⚠Environment variable precedence is fixed (bearer token always wins) — no runtime override
- ⚠No credential rotation or expiry management — relies on external token management
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
Repository Details
Last commit: Apr 17, 2026
About
An MCP server that integrates with the MCP protocol. https://modelcontextprotocol.io/introduction
Categories
Alternatives to xero-mcp-server
Are you the builder of xero-mcp-server?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →