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

@integrity-labs/xero-mcp-server

v0.0.19

Published

Augmented Team fork of @xeroapi/xero-mcp-server adding XERO_TENANT_ID env var support (ENG-4898). Pins multi-tenant OAuth tokens to an explicit tenant instead of silently defaulting to tenants[0].

Readme

@integrity-labs/xero-mcp-server

Augmented Team fork of @xeroapi/xero-mcp-server (MIT, Xero Limited) — same MCP server, plus XERO_TENANT_ID env-var support so multi-tenant OAuth tokens can be pinned to an explicit tenant.

Why this fork exists (ENG-4898)

The upstream MCP server is designed for Xero Custom Connections — a flow that issues single-tenant tokens via client_credentials. With those tokens the upstream's "always pick tenants[0]" behaviour is correct, because there's only ever one tenant in the list.

Augmented Team's integration uses 3-leg OAuth, which returns a multi-tenant access token: it grants access to every Xero organisation the OAuth user has previously connected. Without explicit tenant pinning, the upstream server picks whichever tenant Xero happens to return first — which is not necessarily the one the operator selected during consent. That's a cross-tenant data leak: an agent in Org A could return Org B's invoices.

This fork adds the missing knob:

 if (this.tenants && this.tenants.length > 0) {
-  this.tenantId = this.tenants[0].tenantId;
+  const desired = process.env.XERO_TENANT_ID;
+  if (desired) {
+    const match = this.tenants.find((t) => t.tenantId === desired);
+    if (!match) {
+      throw new Error(`XERO_TENANT_ID=${desired} not in token's tenant list…`);
+    }
+    this.tenantId = desired;
+  } else {
+    this.tenantId = this.tenants[0].tenantId;
+  }
 }

Set XERO_TENANT_ID in the MCP server's env to pin. Leave it unset and the behaviour matches upstream.

Failure mode if mis-configured

If XERO_TENANT_ID is set to an ID that the bearer token doesn't have access to, the server throws on updateTenants / requestToken with the available IDs in the error message. That's deliberate — silently falling back to tenants[0] is the original bug.

Upstream sync

When pulling a new upstream release:

  1. git remote add xero-upstream https://github.com/XeroAPI/xero-mcp-server.git (one-time).
  2. git fetch xero-upstream.
  3. git merge --no-commit xero-upstream/main (or git checkout xero-upstream/main -- src/).
  4. Re-apply the XERO_TENANT_ID env-var patch in src/clients/xero-client.ts (two call sites: MCPXeroClient.updateTenants and CustomConnectionsXeroClient.requestToken).
  5. Bump version in package.json.
  6. npm publish (public, @integrity-labs scope).

A tracking PR upstream would let us drop the fork once merged. See [Issue / PR link in ENG-4898].

License

MIT — same as upstream. See UPSTREAM_LICENSE for the original Xero notice.