npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

xero-accounting-mcp

v0.1.1

Published

Xero Accounting MCP Server — full API passthrough with schema discovery

Readme

Xero Accounting MCP Server

A full-passthrough MCP server for the Xero Accounting API. Every Xero Accounting endpoint is accessible — not a curated subset.

Inspired by the ConnectWise RMM MCP pattern: load the official OpenAPI spec, expose schema discovery tools so the LLM can explore the API, and provide a generic xero_api_call tool that hits any endpoint.

What It Does

3 layers of access:

  1. Schema Discovery — The server loads Xero's official OpenAPI spec (v13.0.0, 138 paths). The LLM can browse available endpoints, search by keyword, and inspect parameters/schemas before making calls.
  2. Generic Passthroughxero_api_call lets you hit any Xero Accounting endpoint with any method, body, and query params. Full API, no restrictions.
  3. Convenience Tools — Pre-built tools for common operations (P&L, Balance Sheet, Invoices, Contacts, etc.) so the LLM doesn't have to look up the path every time.

23 tools total:

| Category | Tools | |---|---| | Schema Discovery | xero_get_schema_overview, xero_get_endpoint_details, xero_search_endpoints | | Generic Passthrough | xero_api_call | | Reports | P&L, Balance Sheet, Budget Summary, Executive Summary, Trial Balance, Bank Summary, Aged Payables, Aged Receivables | | Data | Organisation, Accounts, Invoices, Contacts, Journals, Tracking Categories, Tax Rates, Budgets, Bank Transactions, Payments, Credit Notes |

Requirements

  • Node.js 18+
  • A Xero app with client_credentials grant (Custom Connection in the Xero developer portal)
  • Scopes: accounting.reports.read, accounting.transactions.read, accounting.contacts.read, accounting.settings.read, accounting.budgets.read, accounting.journals.read
  • Your Xero tenant ID (found in the Xero developer portal under your connected tenant)

Install

Option 1: Clone and build locally

git clone https://github.com/mrsmickers/xero-mcp.git
cd xero-mcp
npm install
npm run build

Option 2: npx (no clone needed)

npx xero-accounting-mcp

Configure

Set these environment variables:

XERO_CLIENT_ID=your_client_id
XERO_CLIENT_SECRET=your_client_secret
XERO_TENANT_ID=your_tenant_id

You'll find the Client ID and Secret in the Xero Developer Portal under your Custom Connection app. The Tenant ID is shown when you connect a tenant to your app.

🤖 Ask Claude to Set It Up For You

Copy this prompt and paste it into Claude Code, Claude Desktop, or any Claude session:

Set up the Xero Accounting MCP server for me. The npm package is `xero-accounting-mcp`.

1. Ask me whether I want this for Claude Code, Claude Desktop, or Claude Cowork.
2. Help me get my Xero credentials:
   - Go to https://developer.xero.com/app/manage and create or open a Custom Connection app
   - Copy the Client ID and Client Secret
   - Connect a tenant and copy the Tenant ID
3. If Claude Desktop/Cowork: add the MCP server config to claude_desktop_config.json
   - macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
   - Windows: %APPDATA%\Claude\claude_desktop_config.json
   - Use npx so no global install is needed
4. If Claude Code: add it as an MCP server in .claude/settings.json or .mcp.json
5. Tell me to restart Claude after the config is saved

Non-technical users can just say "set up the Xero MCP server" and Claude will walk them through it step by step — choosing where to install it, getting their Xero credentials, and writing the config.

Claude Desktop Setup

Add to your claude_desktop_config.json:

Local build:

{
  "mcpServers": {
    "xero": {
      "command": "node",
      "args": ["/absolute/path/to/xero-mcp/dist/index.js"],
      "env": {
        "XERO_CLIENT_ID": "your_client_id",
        "XERO_CLIENT_SECRET": "your_client_secret",
        "XERO_TENANT_ID": "your_tenant_id"
      }
    }
  }
}

npx:

{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": ["-y", "xero-accounting-mcp"],
      "env": {
        "XERO_CLIENT_ID": "your_client_id",
        "XERO_CLIENT_SECRET": "your_client_secret",
        "XERO_TENANT_ID": "your_tenant_id"
      }
    }
  }
}

Claude Desktop config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

After editing, restart Claude Desktop completely.

Claude Code Setup

Add to your project's .mcp.json or global ~/.claude/settings.json:

{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": ["-y", "xero-accounting-mcp"],
      "env": {
        "XERO_CLIENT_ID": "your_client_id",
        "XERO_CLIENT_SECRET": "your_client_secret",
        "XERO_TENANT_ID": "your_tenant_id"
      }
    }
  }
}

OpenClaw Setup

Add to your openclaw.yaml under mcpServers:

mcpServers:
  xero:
    command: node
    args: [/path/to/xero-mcp/dist/index.js]
    env:
      XERO_CLIENT_ID: your_client_id
      XERO_CLIENT_SECRET: your_client_secret
      XERO_TENANT_ID: your_tenant_id

Usage Examples

Once running, ask your LLM:

  • "What Xero API endpoints are available for invoices?"
  • "Get my P&L for this year so far"
  • "Search Xero endpoints for bank reconciliation"
  • "Call the Xero API to get invoice INV-01234"

The LLM will use schema discovery tools to find the right endpoint, then xero_api_call or a convenience tool to execute.

Rate Limits

Xero enforces:

  • 60 calls/min per tenant
  • 5,000 calls/day (Core+ tier)
  • 5 concurrent requests max
  • On 429: respect Retry-After header

License

ISC