MCP Ecommerce
Xero logo

Installation guide

How to install Xero MCP Server

In Claude, ChatGPT, Gemini, Microsoft Copilot, Perplexity, Cursor and Claude Code, with what to check before you start and the first prompts to run.

This is a local install. The Xero MCP Server runs on your machine as a Node.js process, started by your MCP client with `npx -y @xeroapi/xero-mcp-server@latest`. It authenticates in one of two ways: Custom Connection credentials (`XERO_CLIENT_ID` and `XERO_CLIENT_SECRET`) tied to one Xero organisation, or a bearer token (`XERO_CLIENT_BEARER_TOKEN`) if your client runs its own auth flow. There is no hosted endpoint URL.

Have a Xero admin or the bookkeeper who owns the organisation create the Custom Connection in the Xero developer portal, ideally an agency developer working with them. Start with a Xero Demo Company and read-only requests. The write tools can create invoices and post manual journals, so scope credentials tightly before you point this at a live organisation.

Xero MCP Server setup guide: Xero's MCP documentation page on github.com, shown in a browser frame (payments MCP server for e-commerce)
Xero MCP Server setup guide preview: Xero’s documentation on github.com, captured Nov 6, 2026. The page may have changed since; the link opens the live version.

Before you start

  • Node.js v18 or higher, and npm or pnpm, installed on the machine that runs your MCP client
  • A Xero developer account and a Xero organisation, preferably the Demo Company (use the NZ or UK region if you need payroll tools)
  • A Custom Connection created by following the Xero Custom Connections guide, with every scope from SCOPES_V1 (created before Apr 29, 2026) or SCOPES_V2 (created from that date) added
  • Your client ID and client secret, or a bearer token if your client handles OAuth itself
  • Permission to edit your MCP client's config file
How it runs
Local, runs on your machine
Access
Read and write
Server address
Copy it from the vendor documentation

Xero MCP Server in Claude

  1. Create a Custom Connection in the Xero developer portal using the Xero Custom Connections guide linked from the repository README. Add every scope in SCOPES_V1 or SCOPES_V2, depending on when the connection was created. Authorise it against the Demo Company.
  2. In Claude Desktop, open Settings > Developer > Edit config to open claude_desktop_config.json.
  3. Add the xero entry from the snippet below and replace the placeholders with your client ID and client secret.
  4. Optional: add XERO_SCOPES to env as a space-separated list to narrow permissions. Take scope names from the vendor documentation.
  5. If you use Node Version Manager, replace npx in command with the full path to the executable, as the README describes (for example under .nvm/versions/node/<version>/bin/npx).
  6. Save the file and fully restart Claude Desktop, then run a read-only prompt against the Demo Company.
claude_desktop_config.json
{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "<YOUR_CLIENT_ID>",
        "XERO_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>"
      }
    }
  }
}

Xero MCP Server in ChatGPT

  1. The Xero MCP Server is a local process, and the documentation does not cover ChatGPT. ChatGPT connectors in Developer mode are added by a remote server URL.
  2. The vendor documentation gives no hosted URL, so there is nothing to paste into ChatGPT as it stands.
  3. To use it there, you would need to run the server behind your own remote MCP bridge. That setup is outside the Xero documentation, so check OpenAI's connector docs and review the security implications first.
  4. If you only need a quick test, use Claude Desktop, Cursor or Claude Code, which can start the local server directly.

Xero MCP Server in Gemini

  1. The documentation does not mention Gemini, so use the standard Gemini CLI approach: add a local server under mcpServers in the Gemini CLI settings JSON.
  2. Create a Custom Connection in Xero first, with all scopes from the relevant list, and authorise it against the Demo Company.
  3. Add the xero entry from the snippet below to your Gemini CLI settings file and replace the placeholders. Check Gemini CLI documentation for the file location.
  4. If you use Node Version Manager, replace npx with its full path, as the Xero README explains.
  5. Restart Gemini CLI and confirm the xero server and its tools are listed.
  6. Run a read-only prompt against the Demo Company.
Gemini CLI settings (mcpServers)
{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "<YOUR_CLIENT_ID>",
        "XERO_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>"
      }
    }
  }
}

Xero MCP Server in Microsoft Copilot

  1. The Xero documentation does not cover Copilot. For GitHub Copilot in VS Code, use the standard .vscode/mcp.json file with a top-level servers object. Copilot Studio is built around remote connectors, and this server has no hosted URL, so it is not a direct fit.
  2. Create a Custom Connection in Xero with all scopes from the relevant list, authorised against the Demo Company.
  3. In your workspace, create or open .vscode/mcp.json and add the xero entry from the snippet below.
  4. Replace the placeholders with your credentials. Do not commit this file with real secrets, because the README warns against committing credentials.
  5. Start the server from VS Code's MCP controls, then open Copilot Chat in agent mode and check that the Xero tools are listed.
  6. Run a read-only prompt against the Demo Company.
.vscode/mcp.json
{
  "servers": {
    "xero": {
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "<YOUR_CLIENT_ID>",
        "XERO_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>"
      }
    }
  }
}

Xero MCP Server in Perplexity

  1. The Xero documentation does not cover Perplexity. Perplexity connectors generally need either a remote server URL or support for local servers in the desktop app, depending on your version.
  2. The vendor provides no hosted URL. Only a local command is available: npx -y @xeroapi/xero-mcp-server@latest.
  3. If your Perplexity desktop app lets you add a local MCP server by command, enter that command and set XERO_CLIENT_ID and XERO_CLIENT_SECRET as environment variables. Follow Perplexity's own documentation for where to enter them.
  4. If it only accepts remote URLs, use another client from this guide instead.
  5. After adding it, run a read-only prompt against the Demo Company.

Xero MCP Server in Cursor

  1. Create a Custom Connection in Xero with all scopes from SCOPES_V1 or SCOPES_V2, authorised against the Demo Company.
  2. Open Cursor's MCP settings and add a server, or edit your MCP config JSON directly. The documentation does not cover Cursor, so this uses Cursor's standard mcpServers format.
  3. Add the xero entry from the snippet below and replace the placeholders with your credentials.
  4. If you use Node Version Manager, replace npx with its full path, as the Xero README explains.
  5. Save, then confirm the xero server shows as enabled in Cursor's MCP settings with its tools listed.
  6. Run a read-only prompt against the Demo Company.
Cursor MCP config (mcpServers)
{
  "mcpServers": {
    "xero": {
      "command": "npx",
      "args": [
        "-y",
        "@xeroapi/xero-mcp-server@latest"
      ],
      "env": {
        "XERO_CLIENT_ID": "<YOUR_CLIENT_ID>",
        "XERO_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>"
      }
    }
  }
}

Xero MCP Server in Claude Code

  1. Create a Custom Connection in Xero with all scopes from the relevant list, authorised against the Demo Company. The documentation does not cover Claude Code, so this uses its standard local-server command.
  2. Run the command below in your terminal to register the server.
  3. Provide XERO_CLIENT_ID and XERO_CLIENT_SECRET as environment variables for the server. Take the exact option syntax from the Claude Code documentation (claude mcp add --help lists it).
  4. If you use Node Version Manager, replace npx with its full path, as the Xero README explains.
  5. Run claude mcp list to confirm xero is registered, then start a session.
  6. Run a read-only prompt against the Demo Company.
Terminal
claude mcp add xero -- npx -y @xeroapi/xero-mcp-server@latest

Check that it works

Start with questions that only read data. If these answer from your real account, the connection is good.

  • Use list-organisation-details to show which Xero organisation you are connected to, and confirm it is the Demo Company.
  • List the 10 most recent invoices and show contact name, status and amount due. Do not create or change anything.
  • Pull a profit and loss report for last month using list-profit-and-loss and summarise the largest expense lines.

Troubleshooting

+

The client does not list the xero server or shows it as failed. What should I check?

Confirm Node.js v18 or higher with `node -v`, and that the JSON is valid. Restart the client fully after editing. If you use Node Version Manager, GUI clients may not find `npx`, so set `command` to the full path of `npx` as the README describes. Then check the client's MCP logs.

+

Authentication fails or tools return scope or authorisation errors. How do I fix it?

Check that every scope in SCOPES_V1 (connections created before Apr 29, 2026) or SCOPES_V2 (from that date) is on the Custom Connection. The server tries V1 first, then falls back to V2. If you set `XERO_SCOPES`, make sure it is a space-separated list that does not omit scopes a tool needs. Also check the connection is authorised for the organisation.

+

Why is my bearer token or client ID being ignored, and why do payroll tools fail?

If `XERO_CLIENT_BEARER_TOKEN` is set, it takes precedence over `XERO_CLIENT_ID`, so remove it when using Custom Connection credentials. Payroll tools only work for organisations in the NZ or UK region, and need the payroll scopes. Switch the Demo Company's country under My Xero if you are testing payroll.

Written Nov 6, 2026 from the vendor documentation. Exact menus, addresses and commands change; the official documentation is the source of truth.

Questions and answers

Questions readers and searchers ask about installing Xero MCP Server, answered by the site editor from the vendor documentation, plus reader experience. Every comment is reviewed before it appears.

Ask a question or share what worked

Reviewed before publishing. One link max, no HTML.