@softeria/ms-365-mcp-server 0.31.2 → 0.33.0

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.
@@ -301,14 +301,14 @@
301
301
  "pathPattern": "/me/onenote/pages/{onenotePage-id}/content",
302
302
  "method": "get",
303
303
  "toolName": "get-onenote-page-content",
304
- "scopes": ["Notes.Read"],
305
- "returnDownloadUrl": true
304
+ "scopes": ["Notes.Read"]
306
305
  },
307
306
  {
308
307
  "pathPattern": "/me/onenote/pages",
309
308
  "method": "post",
310
309
  "toolName": "create-onenote-page",
311
- "scopes": ["Notes.Create"]
310
+ "scopes": ["Notes.Create"],
311
+ "contentType": "text/html"
312
312
  },
313
313
  {
314
314
  "pathPattern": "/me/todo/lists",
@@ -83,6 +83,10 @@ async function executeGraphTool(tool, config, graphClient, params) {
83
83
  headers["Prefer"] = `outlook.timezone="${params.timezone}"`;
84
84
  logger.info(`Setting timezone header: Prefer: outlook.timezone="${params.timezone}"`);
85
85
  }
86
+ if (config?.contentType) {
87
+ headers["Content-Type"] = config.contentType;
88
+ logger.info(`Setting custom Content-Type: ${config.contentType}`);
89
+ }
86
90
  if (Object.keys(queryParams).length > 0) {
87
91
  const queryString = Object.entries(queryParams).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join("&");
88
92
  path2 = `${path2}${path2.includes("?") ? "&" : "?"}${queryString}`;
@@ -92,7 +96,17 @@ async function executeGraphTool(tool, config, graphClient, params) {
92
96
  headers
93
97
  };
94
98
  if (options.method !== "GET" && body) {
95
- options.body = typeof body === "string" ? body : JSON.stringify(body);
99
+ if (config?.contentType === "text/html") {
100
+ if (typeof body === "string") {
101
+ options.body = body;
102
+ } else if (typeof body === "object" && "content" in body) {
103
+ options.body = body.content;
104
+ } else {
105
+ options.body = String(body);
106
+ }
107
+ } else {
108
+ options.body = typeof body === "string" ? body : JSON.stringify(body);
109
+ }
96
110
  }
97
111
  const isProbablyMediaContent = tool.errors?.some((error) => error.description === "Retrieved media content") || path2.endsWith("/content");
98
112
  if (config?.returnDownloadUrl && path2.endsWith("/content")) {
@@ -1,5 +1,5 @@
1
- 2026-01-30 13:27:02 INFO: Using environment variables for secrets
2
- 2026-01-30 13:27:02 INFO: Using environment variables for secrets
3
- 2026-01-30 13:27:02 INFO: Using environment variables for secrets
4
- 2026-01-30 13:27:02 INFO: Using environment variables for secrets
5
- 2026-01-30 13:27:02 INFO: Using environment variables for secrets
1
+ 2026-02-01 10:50:13 INFO: Using environment variables for secrets
2
+ 2026-02-01 10:50:13 INFO: Using environment variables for secrets
3
+ 2026-02-01 10:50:13 INFO: Using environment variables for secrets
4
+ 2026-02-01 10:50:13 INFO: Using environment variables for secrets
5
+ 2026-02-01 10:50:13 INFO: Using environment variables for secrets
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
- "version": "0.31.2",
3
+ "version": "0.33.0",
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",
@@ -301,14 +301,14 @@
301
301
  "pathPattern": "/me/onenote/pages/{onenotePage-id}/content",
302
302
  "method": "get",
303
303
  "toolName": "get-onenote-page-content",
304
- "scopes": ["Notes.Read"],
305
- "returnDownloadUrl": true
304
+ "scopes": ["Notes.Read"]
306
305
  },
307
306
  {
308
307
  "pathPattern": "/me/onenote/pages",
309
308
  "method": "post",
310
309
  "toolName": "create-onenote-page",
311
- "scopes": ["Notes.Create"]
310
+ "scopes": ["Notes.Create"],
311
+ "contentType": "text/html"
312
312
  },
313
313
  {
314
314
  "pathPattern": "/me/todo/lists",