@teamnetwork-nz/xero-mcp-server 1.14.2 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/clients/xero-client.js +30 -7
- package/dist/env.js +12 -0
- package/dist/handlers/delete-xero-invoice-attachment.handler.js +2 -1
- package/dist/helpers/get-package-version.js +14 -0
- package/dist/helpers/write-gate.js +10 -0
- package/dist/helpers/xero-config.js +21 -0
- package/dist/http-server.js +83 -0
- package/dist/index.js +16 -6
- package/dist/server/xero-mcp-server.js +6 -4
- package/dist/strict-tools.js +29 -0
- package/dist/tools/tool-factory.js +2 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# TEAMnetwork Xero MCP Server
|
|
2
2
|
|
|
3
|
+
## Streamable HTTP
|
|
4
|
+
|
|
5
|
+
Set `XERO_TRANSPORT=http` to serve stateless MCP at `/mcp`. It binds to `127.0.0.1` by default; remote binding requires `XERO_HTTP_BEARER_TOKEN` and `XERO_HTTP_ALLOWED_HOSTS`. Optional controls include `XERO_HTTP_PORT`, `XERO_HTTP_ALLOWED_ORIGINS`, and `XERO_HTTP_MAX_BODY_BYTES`. A health endpoint is available at `/health`.
|
|
6
|
+
|
|
3
7
|
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for Xero, maintained by [TEAMnetwork](https://teamnetwork.co.nz). Forked and extended from the [official Xero MCP Server](https://github.com/XeroAPI/xero-mcp-server).
|
|
4
8
|
|
|
5
9
|
Provides AI agents and MCP-compatible clients (e.g. Claude Desktop) with tools to read and write Xero accounting data, manage invoice attachments, and download invoice PDFs.
|
|
@@ -102,9 +106,12 @@ Scopes and tools are controlled by environment variables. This means you only pr
|
|
|
102
106
|
| *(core — always on)* | — | `accounting.transactions` `accounting.contacts` `accounting.settings` `accounting.attachments` `accounting.journals.read` | All invoicing, contact, payment, attachment, PDF & journal tools |
|
|
103
107
|
| `XERO_ENABLE_REPORTS` | `true` | `accounting.reports.read` | Trial Balance, P&L, Balance Sheet, Aged Payables/Receivables |
|
|
104
108
|
| `XERO_ENABLE_PAYROLL` | `false` | `payroll.settings` `payroll.employees` `payroll.timesheets` | All payroll tools |
|
|
109
|
+
| `XERO_READWRITE` | `false` | No additional scopes | Create, update, and delete tools |
|
|
105
110
|
|
|
106
111
|
> **Note:** To use payroll tools, your Xero region must be **NZ** or **UK**, and your Xero app must have the payroll scopes provisioned.
|
|
107
112
|
|
|
113
|
+
`XERO_ENABLE_READWRITE=true` remains a deprecated compatibility alias for one release. `XERO_READWRITE` takes precedence when both are set.
|
|
114
|
+
|
|
108
115
|
### Full configuration example
|
|
109
116
|
|
|
110
117
|
```json
|
|
@@ -118,6 +125,7 @@ Scopes and tools are controlled by environment variables. This means you only pr
|
|
|
118
125
|
"XERO_CLIENT_SECRET": "your_client_secret_here",
|
|
119
126
|
"XERO_ENABLE_REPORTS": "true",
|
|
120
127
|
"XERO_ENABLE_PAYROLL": "false",
|
|
128
|
+
"XERO_READWRITE": "false",
|
|
121
129
|
"XERO_DOWNLOAD_PATH": "C:/Users/you/Downloads/Xero"
|
|
122
130
|
}
|
|
123
131
|
}
|
|
@@ -2,14 +2,14 @@ import axios from "axios";
|
|
|
2
2
|
import dotenv from "dotenv";
|
|
3
3
|
import { XeroClient, } from "xero-node";
|
|
4
4
|
import { ensureError } from "../helpers/ensure-error.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
5
|
+
import { loadXeroCredentials } from "../helpers/xero-config.js";
|
|
6
|
+
import { readWriteEnabled } from "../helpers/write-gate.js";
|
|
7
|
+
dotenv.config({ quiet: true });
|
|
8
|
+
const credentials = loadXeroCredentials();
|
|
9
|
+
const client_id = credentials.clientId;
|
|
10
|
+
const client_secret = credentials.clientSecret;
|
|
11
|
+
const bearer_token = credentials.bearerToken;
|
|
9
12
|
const grant_type = "client_credentials";
|
|
10
|
-
if (!bearer_token && (!client_id || !client_secret)) {
|
|
11
|
-
throw Error("Environment Variables not set - please check your .env file");
|
|
12
|
-
}
|
|
13
13
|
/**
|
|
14
14
|
* Builds the OAuth2 scope string based on enabled feature groups.
|
|
15
15
|
*
|
|
@@ -131,6 +131,24 @@ class BearerTokenXeroClient extends MCPXeroClient {
|
|
|
131
131
|
await this.updateTenants();
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
+
const writeEnabled = readWriteEnabled("XERO_READWRITE", { name: "XERO_ENABLE_READWRITE" });
|
|
135
|
+
export function assertXeroWritable() {
|
|
136
|
+
if (!writeEnabled)
|
|
137
|
+
throw new Error("Write operations are disabled. Set XERO_READWRITE=true to enable them.");
|
|
138
|
+
}
|
|
139
|
+
function writeProtectedApi(api) {
|
|
140
|
+
if (writeEnabled)
|
|
141
|
+
return api;
|
|
142
|
+
return new Proxy(api, {
|
|
143
|
+
get(target, property, receiver) {
|
|
144
|
+
const value = Reflect.get(target, property, receiver);
|
|
145
|
+
if (typeof property === "string" && typeof value === "function" && /^(create|update|delete|archive|void|approve|revert)/i.test(property)) {
|
|
146
|
+
return () => Promise.reject(new Error("Write operations are disabled. Set XERO_READWRITE=true to enable them."));
|
|
147
|
+
}
|
|
148
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
}
|
|
134
152
|
export const xeroClient = bearer_token
|
|
135
153
|
? new BearerTokenXeroClient({
|
|
136
154
|
bearerToken: bearer_token,
|
|
@@ -140,3 +158,8 @@ export const xeroClient = bearer_token
|
|
|
140
158
|
clientSecret: client_secret,
|
|
141
159
|
grantType: grant_type,
|
|
142
160
|
});
|
|
161
|
+
if (!writeEnabled) {
|
|
162
|
+
const mutable = xeroClient;
|
|
163
|
+
mutable.accountingApi = writeProtectedApi(mutable.accountingApi);
|
|
164
|
+
mutable.payrollNZApi = writeProtectedApi(mutable.payrollNZApi);
|
|
165
|
+
}
|
package/dist/env.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function parsePositiveInt(name, raw, fallback, maximum) {
|
|
2
|
+
if (raw === undefined || raw.trim() === '')
|
|
3
|
+
return fallback;
|
|
4
|
+
if (!/^\d+$/.test(raw.trim())) {
|
|
5
|
+
throw new Error(`${name} must be an integer from 1 to ${maximum}`);
|
|
6
|
+
}
|
|
7
|
+
const value = Number(raw);
|
|
8
|
+
if (!Number.isSafeInteger(value) || value < 1 || value > maximum) {
|
|
9
|
+
throw new Error(`${name} must be an integer from 1 to ${maximum}`);
|
|
10
|
+
}
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
|
-
import { xeroClient } from "../clients/xero-client.js";
|
|
2
|
+
import { assertXeroWritable, xeroClient } from "../clients/xero-client.js";
|
|
3
3
|
import { formatError } from "../helpers/format-error.js";
|
|
4
4
|
/**
|
|
5
5
|
* Delete an attachment from an invoice by its attachment ID.
|
|
@@ -9,6 +9,7 @@ import { formatError } from "../helpers/format-error.js";
|
|
|
9
9
|
*/
|
|
10
10
|
export async function deleteXeroInvoiceAttachment(invoiceId, attachmentId) {
|
|
11
11
|
try {
|
|
12
|
+
assertXeroWritable();
|
|
12
13
|
await xeroClient.authenticate();
|
|
13
14
|
const tokenSet = xeroClient.readTokenSet();
|
|
14
15
|
const accessToken = tokenSet.access_token;
|
|
@@ -18,3 +18,17 @@ export function getPackageVersion() {
|
|
|
18
18
|
return '0.0.0'; // Fallback version
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
/** Gets the published package name from package.json. */
|
|
22
|
+
export function getPackageName() {
|
|
23
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
24
|
+
const __dirname = dirname(__filename);
|
|
25
|
+
const packagePath = join(__dirname, '../../package.json');
|
|
26
|
+
try {
|
|
27
|
+
const packageJson = JSON.parse(readFileSync(packagePath, 'utf-8'));
|
|
28
|
+
return packageJson.name ?? 'xero-mcp-server';
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
console.warn('Failed to read package name:', error);
|
|
32
|
+
return 'xero-mcp-server';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function readWriteEnabled(canonicalName, legacy, env = process.env) {
|
|
2
|
+
const canonical = env[canonicalName];
|
|
3
|
+
if (canonical !== undefined)
|
|
4
|
+
return canonical.toLowerCase() === 'true';
|
|
5
|
+
if (!legacy || env[legacy.name] === undefined)
|
|
6
|
+
return false;
|
|
7
|
+
process.stderr.write(`[deprecated] ${legacy.name} is deprecated; use ${canonicalName}=true to enable writes.\n`);
|
|
8
|
+
const value = env[legacy.name].toLowerCase();
|
|
9
|
+
return legacy.readonlySemantics ? value === 'false' : value === 'true';
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const XeroCredentialSchema = z.object({
|
|
3
|
+
clientId: z.string().min(1).optional(),
|
|
4
|
+
clientSecret: z.string().min(1).optional(),
|
|
5
|
+
bearerToken: z.string().min(1).optional(),
|
|
6
|
+
}).strict().superRefine((value, ctx) => {
|
|
7
|
+
const hasPair = Boolean(value.clientId && value.clientSecret);
|
|
8
|
+
if (!value.bearerToken && !hasPair) {
|
|
9
|
+
ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Set XERO_CLIENT_BEARER_TOKEN, or set both XERO_CLIENT_ID and XERO_CLIENT_SECRET' });
|
|
10
|
+
}
|
|
11
|
+
if ((value.clientId && !value.clientSecret) || (!value.clientId && value.clientSecret)) {
|
|
12
|
+
ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'XERO_CLIENT_ID and XERO_CLIENT_SECRET must be set together' });
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export function loadXeroCredentials() {
|
|
16
|
+
return XeroCredentialSchema.parse({
|
|
17
|
+
clientId: process.env.XERO_CLIENT_ID?.trim() || undefined,
|
|
18
|
+
clientSecret: process.env.XERO_CLIENT_SECRET || undefined,
|
|
19
|
+
bearerToken: process.env.XERO_CLIENT_BEARER_TOKEN || undefined,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { timingSafeEqual } from "node:crypto";
|
|
2
|
+
import http from "node:http";
|
|
3
|
+
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
4
|
+
const loopback = new Set(["127.0.0.1", "::1", "localhost"]);
|
|
5
|
+
const send = (res, status, body) => {
|
|
6
|
+
res.writeHead(status, { "Content-Type": "application/json" }).end(JSON.stringify(body));
|
|
7
|
+
};
|
|
8
|
+
const error = (res, status, code, message) => send(res, status, { jsonrpc: "2.0", error: { code, message }, id: null });
|
|
9
|
+
const matches = (value, expected) => {
|
|
10
|
+
if (!value?.startsWith("Bearer "))
|
|
11
|
+
return false;
|
|
12
|
+
const supplied = Buffer.from(value.slice(7));
|
|
13
|
+
const wanted = Buffer.from(expected);
|
|
14
|
+
return supplied.length === wanted.length && timingSafeEqual(supplied, wanted);
|
|
15
|
+
};
|
|
16
|
+
const readBody = (req, limit) => new Promise((resolve, reject) => {
|
|
17
|
+
const chunks = [];
|
|
18
|
+
let size = 0;
|
|
19
|
+
let oversized = false;
|
|
20
|
+
req.on("data", (chunk) => { size += chunk.length; oversized ||= size > limit; if (!oversized)
|
|
21
|
+
chunks.push(chunk); });
|
|
22
|
+
req.on("end", () => {
|
|
23
|
+
if (oversized)
|
|
24
|
+
return reject(Object.assign(new Error("Request body too large"), { statusCode: 413 }));
|
|
25
|
+
try {
|
|
26
|
+
resolve(JSON.parse(Buffer.concat(chunks).toString("utf8")));
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
reject(Object.assign(new Error("Invalid JSON body"), { statusCode: 400 }));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
req.on("error", reject);
|
|
33
|
+
});
|
|
34
|
+
export function validateHttpOptions(o) {
|
|
35
|
+
if (!Number.isInteger(o.port) || o.port < 1 || o.port > 65535)
|
|
36
|
+
throw new Error(`Invalid HTTP port: ${o.port}`);
|
|
37
|
+
if (o.maxBodyBytes !== undefined && (!Number.isInteger(o.maxBodyBytes) || o.maxBodyBytes < 1))
|
|
38
|
+
throw new Error(`Invalid HTTP body limit: ${o.maxBodyBytes}`);
|
|
39
|
+
if (!loopback.has(o.host) && !o.bearerToken)
|
|
40
|
+
throw new Error("A bearer token is required when binding beyond loopback");
|
|
41
|
+
if (!loopback.has(o.host) && !o.allowedHosts?.length)
|
|
42
|
+
throw new Error("HTTP_ALLOWED_HOSTS is required when binding beyond loopback");
|
|
43
|
+
}
|
|
44
|
+
export function createHttpServer(factory, o) {
|
|
45
|
+
validateHttpOptions(o);
|
|
46
|
+
const hosts = new Set(o.allowedHosts?.map(v => v.toLowerCase()));
|
|
47
|
+
const origins = new Set(o.allowedOrigins?.map(v => v.toLowerCase()));
|
|
48
|
+
return http.createServer(async (req, res) => {
|
|
49
|
+
const path = new URL(req.url ?? "/", "http://localhost").pathname;
|
|
50
|
+
if (path === "/health")
|
|
51
|
+
return send(res, 200, { status: "ok", server: o.serverName });
|
|
52
|
+
if (path !== "/mcp")
|
|
53
|
+
return void res.writeHead(404).end();
|
|
54
|
+
if (hosts.size && !hosts.has((req.headers.host ?? "").toLowerCase()))
|
|
55
|
+
return error(res, 403, -32000, "Host not allowed");
|
|
56
|
+
if (req.headers.origin && !origins.has(req.headers.origin.toLowerCase()))
|
|
57
|
+
return error(res, 403, -32000, "Origin not allowed");
|
|
58
|
+
if (o.bearerToken && !matches(req.headers.authorization, o.bearerToken)) {
|
|
59
|
+
res.setHeader("WWW-Authenticate", "Bearer");
|
|
60
|
+
return error(res, 401, -32001, "Unauthorized");
|
|
61
|
+
}
|
|
62
|
+
if (req.method !== "POST") {
|
|
63
|
+
res.setHeader("Allow", "POST");
|
|
64
|
+
return error(res, 405, -32000, "Method not allowed");
|
|
65
|
+
}
|
|
66
|
+
const server = factory();
|
|
67
|
+
const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined });
|
|
68
|
+
try {
|
|
69
|
+
const body = await readBody(req, o.maxBodyBytes ?? 1048576);
|
|
70
|
+
await server.connect(transport);
|
|
71
|
+
await transport.handleRequest(req, res, body);
|
|
72
|
+
res.once("close", () => { void transport.close(); void server.close(); });
|
|
73
|
+
}
|
|
74
|
+
catch (cause) {
|
|
75
|
+
void transport.close();
|
|
76
|
+
void server.close();
|
|
77
|
+
if (!res.headersSent) {
|
|
78
|
+
const status = cause.statusCode ?? 500;
|
|
79
|
+
error(res, status, status === 400 ? -32700 : -32603, status < 500 ? cause.message : "Internal server error");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -3,14 +3,24 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
3
3
|
import { XeroMcpServer } from "./server/xero-mcp-server.js";
|
|
4
4
|
import { ToolFactory } from "./tools/tool-factory.js";
|
|
5
5
|
import { registerResources } from "./resources/register-resources.js";
|
|
6
|
+
import { createHttpServer } from "./http-server.js";
|
|
7
|
+
import { parsePositiveInt } from "./env.js";
|
|
6
8
|
const main = async () => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
const createConfiguredServer = () => {
|
|
10
|
+
const server = XeroMcpServer.GetServer(true);
|
|
11
|
+
ToolFactory(server);
|
|
12
|
+
registerResources(server);
|
|
13
|
+
return server;
|
|
14
|
+
};
|
|
11
15
|
// Start receiving messages on stdin and sending messages on stdout
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
if ((process.env["XERO_TRANSPORT"] ?? "stdio") === "http") {
|
|
17
|
+
const host = process.env["XERO_HTTP_HOST"] ?? "127.0.0.1";
|
|
18
|
+
const port = parsePositiveInt("XERO_HTTP_PORT", process.env["XERO_HTTP_PORT"], 3000, 65535);
|
|
19
|
+
createHttpServer(createConfiguredServer, { host, port, serverName: "@teamnetwork-nz/xero-mcp-server", bearerToken: process.env["XERO_HTTP_BEARER_TOKEN"], allowedHosts: process.env["XERO_HTTP_ALLOWED_HOSTS"]?.split(",").map(v => v.trim()).filter(Boolean), allowedOrigins: process.env["XERO_HTTP_ALLOWED_ORIGINS"]?.split(",").map(v => v.trim()).filter(Boolean), maxBodyBytes: parsePositiveInt("XERO_HTTP_MAX_BODY_BYTES", process.env["XERO_HTTP_MAX_BODY_BYTES"], 1_048_576, 16_777_216) }).listen(port, host, () => process.stderr.write(`[xero-mcp] HTTP listening on ${host}:${port}/mcp\n`));
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
await createConfiguredServer().connect(new StdioServerTransport());
|
|
23
|
+
}
|
|
14
24
|
};
|
|
15
25
|
main().catch((error) => {
|
|
16
26
|
console.error("Error:", error);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
import { getPackageVersion } from "../helpers/get-package-version.js";
|
|
2
|
+
import { getPackageName, getPackageVersion } from "../helpers/get-package-version.js";
|
|
3
|
+
import { enforceStrictToolInputs } from "../strict-tools.js";
|
|
3
4
|
export class XeroMcpServer {
|
|
4
5
|
static instance = null;
|
|
5
6
|
constructor() { }
|
|
6
|
-
static GetServer() {
|
|
7
|
-
if (XeroMcpServer.instance === null) {
|
|
7
|
+
static GetServer(fresh = false) {
|
|
8
|
+
if (fresh || XeroMcpServer.instance === null) {
|
|
8
9
|
XeroMcpServer.instance = new McpServer({
|
|
9
|
-
name:
|
|
10
|
+
name: getPackageName(),
|
|
10
11
|
version: getPackageVersion(),
|
|
11
12
|
}, {
|
|
12
13
|
instructions: [
|
|
@@ -43,6 +44,7 @@ export class XeroMcpServer {
|
|
|
43
44
|
"For a full query playbook read the MCP resource: xero://guidance/agent-playbook",
|
|
44
45
|
].join("\n"),
|
|
45
46
|
});
|
|
47
|
+
enforceStrictToolInputs(XeroMcpServer.instance);
|
|
46
48
|
}
|
|
47
49
|
return XeroMcpServer.instance;
|
|
48
50
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
function isSchema(value) {
|
|
3
|
+
return typeof value === "object" && value !== null && "_def" in value;
|
|
4
|
+
}
|
|
5
|
+
function isRawShape(value) {
|
|
6
|
+
if (typeof value !== "object" || value === null || isSchema(value))
|
|
7
|
+
return false;
|
|
8
|
+
const values = Object.values(value);
|
|
9
|
+
return values.length === 0 || values.some(isSchema);
|
|
10
|
+
}
|
|
11
|
+
function strictSchema(schema) {
|
|
12
|
+
if (schema === undefined)
|
|
13
|
+
return z.object({}).strict();
|
|
14
|
+
if (isRawShape(schema))
|
|
15
|
+
return z.object(schema).strict();
|
|
16
|
+
if (isSchema(schema) && typeof schema.strict === "function")
|
|
17
|
+
return schema.strict();
|
|
18
|
+
return schema;
|
|
19
|
+
}
|
|
20
|
+
/** Make every tool object reject undeclared arguments, including no-argument tools. */
|
|
21
|
+
export function enforceStrictToolInputs(server) {
|
|
22
|
+
const mutable = server;
|
|
23
|
+
const createRegisteredTool = mutable._createRegisteredTool.bind(server);
|
|
24
|
+
mutable._createRegisteredTool = (...args) => {
|
|
25
|
+
// SDK 1.29 funnels both tool() and registerTool() through this method.
|
|
26
|
+
args[3] = strictSchema(args[3]);
|
|
27
|
+
return createRegisteredTool(...args);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -3,10 +3,11 @@ import { CoreDeleteTools, PayrollDeleteTools } from "./delete/index.js";
|
|
|
3
3
|
import { CoreGetTools, PayrollGetTools } from "./get/index.js";
|
|
4
4
|
import { CoreListTools, ReportListTools, PayrollListTools } from "./list/index.js";
|
|
5
5
|
import { CoreUpdateTools, PayrollUpdateTools } from "./update/index.js";
|
|
6
|
+
import { readWriteEnabled } from "../helpers/write-gate.js";
|
|
6
7
|
export function ToolFactory(server) {
|
|
7
8
|
const enableReports = process.env.XERO_ENABLE_REPORTS !== "false";
|
|
8
9
|
const enablePayroll = process.env.XERO_ENABLE_PAYROLL === "true";
|
|
9
|
-
const enableReadWrite =
|
|
10
|
+
const enableReadWrite = readWriteEnabled("XERO_READWRITE", { name: "XERO_ENABLE_READWRITE" });
|
|
10
11
|
const allTools = [
|
|
11
12
|
...CoreListTools,
|
|
12
13
|
...CoreGetTools,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamnetwork-nz/xero-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.1",
|
|
4
4
|
"description": "MCP server implementation for Xero integration - TEAMnetwork",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"lint": "eslint ."
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
22
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
23
23
|
"dotenv": "^16.4.7",
|
|
24
24
|
"openid-client": "^6.8.1",
|
|
25
25
|
"xero-node": "^13.3.0",
|
|
26
|
-
"zod": "3.25"
|
|
26
|
+
"zod": "^3.25.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@eslint/js": "^9.39.1",
|