@softeria/ms-365-mcp-server 0.79.0 → 0.79.2

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.
@@ -214,7 +214,9 @@ async function executeGraphTool(tool, config, graphClient, params, authManager)
214
214
  let allItems = combinedResponse.value || [];
215
215
  let nextLink = combinedResponse["@odata.nextLink"];
216
216
  let pageCount = 1;
217
- while (nextLink && pageCount < 100) {
217
+ const maxPages = 100;
218
+ const maxItems = 1e4;
219
+ while (nextLink && pageCount < maxPages && allItems.length < maxItems) {
218
220
  logger.info(`Fetching page ${pageCount + 1} from: ${nextLink}`);
219
221
  const url = new URL(nextLink);
220
222
  const nextPath = url.pathname.replace("/v1.0", "");
@@ -236,8 +238,13 @@ async function executeGraphTool(tool, config, graphClient, params, authManager)
236
238
  break;
237
239
  }
238
240
  }
239
- if (pageCount >= 100) {
240
- logger.warn(`Reached maximum page limit (100) for pagination`);
241
+ if (pageCount >= maxPages) {
242
+ logger.warn(`Reached maximum page limit (${maxPages}) for pagination`);
243
+ }
244
+ if (allItems.length >= maxItems) {
245
+ logger.warn(
246
+ `Reached maximum item limit (${maxItems}) for pagination \u2014 truncated at ${allItems.length} items`
247
+ );
241
248
  }
242
249
  combinedResponse.value = allItems;
243
250
  if (combinedResponse["@odata.count"]) {
package/dist/logger.js CHANGED
@@ -2,10 +2,11 @@ import winston from "winston";
2
2
  import path from "path";
3
3
  import { fileURLToPath } from "url";
4
4
  import fs from "fs";
5
+ import os from "os";
5
6
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
6
- const logsDir = path.join(__dirname, "..", "logs");
7
+ const logsDir = process.env.MS365_MCP_LOG_DIR || path.join(os.homedir(), ".ms-365-mcp-server", "logs");
7
8
  if (!fs.existsSync(logsDir)) {
8
- fs.mkdirSync(logsDir);
9
+ fs.mkdirSync(logsDir, { recursive: true, mode: 448 });
9
10
  }
10
11
  const logger = winston.createLogger({
11
12
  level: process.env.LOG_LEVEL || "info",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
- "version": "0.79.0",
3
+ "version": "0.79.2",
4
4
  "description": " A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/logs/error.log DELETED
File without changes
@@ -1,11 +0,0 @@
1
- 2026-04-14 21:28:26 INFO: [GRAPH CLIENT] Final URL being sent to Microsoft: https://graph.microsoft.com/v1.0/me
2
- 2026-04-14 21:28:26 INFO: [GRAPH CLIENT] Final URL being sent to Microsoft: https://graph.microsoft.com/v1.0/me
3
- 2026-04-14 21:28:26 INFO: [GRAPH CLIENT] Final URL being sent to Microsoft: https://graph.microsoft.com/v1.0/me
4
- 2026-04-14 21:28:26 INFO: [GRAPH CLIENT] Final URL being sent to Microsoft: https://graph.microsoft.com/v1.0/me/messages
5
- 2026-04-14 21:28:26 INFO: [GRAPH CLIENT] Final URL being sent to Microsoft: https://graph.microsoft.com/v1.0/me/calendar
6
- 2026-04-14 21:28:26 INFO: [GRAPH CLIENT] Final URL being sent to Microsoft: https://graph.microsoft.com/v1.0/me/photo/$value
7
- 2026-04-14 21:28:27 INFO: Using environment variables for secrets
8
- 2026-04-14 21:28:27 INFO: Using environment variables for secrets
9
- 2026-04-14 21:28:27 INFO: Using environment variables for secrets
10
- 2026-04-14 21:28:27 INFO: Using environment variables for secrets
11
- 2026-04-14 21:28:27 INFO: Using environment variables for secrets