@softeria/ms-365-mcp-server 0.85.1 → 0.86.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.
@@ -54,17 +54,11 @@ async function exchangeCodeForToken(code, redirectUri, clientId, clientSecret, t
54
54
  if (codeVerifier) {
55
55
  params.append("code_verifier", codeVerifier);
56
56
  }
57
- const headers = {
58
- "Content-Type": "application/x-www-form-urlencoded"
59
- };
60
- try {
61
- const redirectUrl = new URL(redirectUri);
62
- headers["Origin"] = redirectUrl.origin;
63
- } catch {
64
- }
65
57
  const response = await fetch(`${cloudEndpoints.authority}/${tenantId}/oauth2/v2.0/token`, {
66
58
  method: "POST",
67
- headers,
59
+ headers: {
60
+ "Content-Type": "application/x-www-form-urlencoded"
61
+ },
68
62
  body: params
69
63
  });
70
64
  if (!response.ok) {
@@ -74,7 +68,7 @@ async function exchangeCodeForToken(code, redirectUri, clientId, clientSecret, t
74
68
  }
75
69
  return response.json();
76
70
  }
77
- async function refreshAccessToken(refreshToken, clientId, clientSecret, tenantId = "common", cloudType = "global", origin) {
71
+ async function refreshAccessToken(refreshToken, clientId, clientSecret, tenantId = "common", cloudType = "global") {
78
72
  const cloudEndpoints = getCloudEndpoints(cloudType);
79
73
  const params = new URLSearchParams({
80
74
  grant_type: "refresh_token",
@@ -84,15 +78,11 @@ async function refreshAccessToken(refreshToken, clientId, clientSecret, tenantId
84
78
  if (clientSecret) {
85
79
  params.append("client_secret", clientSecret);
86
80
  }
87
- const headers = {
88
- "Content-Type": "application/x-www-form-urlencoded"
89
- };
90
- if (origin) {
91
- headers["Origin"] = origin;
92
- }
93
81
  const response = await fetch(`${cloudEndpoints.authority}/${tenantId}/oauth2/v2.0/token`, {
94
82
  method: "POST",
95
- headers,
83
+ headers: {
84
+ "Content-Type": "application/x-www-form-urlencoded"
85
+ },
96
86
  body: params
97
87
  });
98
88
  if (!response.ok) {
package/dist/server.js CHANGED
@@ -351,14 +351,12 @@ class MicrosoftGraphServer {
351
351
  } else {
352
352
  logger.info("Refresh endpoint: Using public client without client_secret");
353
353
  }
354
- const origin = req.get("origin") || req.get("referer") || void 0;
355
354
  const result = await refreshAccessToken(
356
355
  body.refresh_token,
357
356
  clientId,
358
357
  clientSecret,
359
358
  tenantId,
360
- this.secrets.cloudType,
361
- origin
359
+ this.secrets.cloudType
362
360
  );
363
361
  res.json(result);
364
362
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
- "version": "0.85.1",
3
+ "version": "0.86.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",
@@ -640,6 +640,30 @@
640
640
  "toolName": "get-onenote-page-content",
641
641
  "scopes": ["Notes.Read"]
642
642
  },
643
+ {
644
+ "pathPattern": "/sites/{site-id}/onenote/notebooks",
645
+ "method": "get",
646
+ "toolName": "list-sharepoint-site-onenote-notebooks",
647
+ "workScopes": ["Notes.Read"]
648
+ },
649
+ {
650
+ "pathPattern": "/sites/{site-id}/onenote/notebooks/{notebook-id}/sections",
651
+ "method": "get",
652
+ "toolName": "list-sharepoint-site-onenote-notebook-sections",
653
+ "workScopes": ["Notes.Read"]
654
+ },
655
+ {
656
+ "pathPattern": "/sites/{site-id}/onenote/sections/{onenoteSection-id}/pages",
657
+ "method": "get",
658
+ "toolName": "list-sharepoint-site-onenote-section-pages",
659
+ "workScopes": ["Notes.Read"]
660
+ },
661
+ {
662
+ "pathPattern": "/sites/{site-id}/onenote/pages/{onenotePage-id}/content",
663
+ "method": "get",
664
+ "toolName": "get-sharepoint-site-onenote-page-content",
665
+ "workScopes": ["Notes.Read"]
666
+ },
643
667
  {
644
668
  "pathPattern": "/me/onenote/pages",
645
669
  "method": "post",
@@ -777,6 +801,39 @@
777
801
  "scopes": ["Tasks.ReadWrite"],
778
802
  "llmTip": "CRITICAL: Requires If-Match header with ETag from get-planner-task-details (use includeHeaders=true). Checklist items use GUID keys: {\"checklist\": {\"<guid>\": {\"title\": \"...\", \"isChecked\": false}}}."
779
803
  },
804
+ {
805
+ "pathPattern": "/planner/plans/{plannerPlan-id}/buckets",
806
+ "method": "get",
807
+ "toolName": "list-plan-buckets",
808
+ "scopes": ["Tasks.Read"]
809
+ },
810
+ {
811
+ "pathPattern": "/planner/buckets/{plannerBucket-id}",
812
+ "method": "get",
813
+ "toolName": "get-planner-bucket",
814
+ "scopes": ["Tasks.Read"],
815
+ "llmTip": "Response includes @odata.etag — required as If-Match for update-planner-bucket and delete-planner-bucket. Use includeHeaders=true."
816
+ },
817
+ {
818
+ "pathPattern": "/planner/buckets",
819
+ "method": "post",
820
+ "toolName": "create-planner-bucket",
821
+ "scopes": ["Tasks.ReadWrite"]
822
+ },
823
+ {
824
+ "pathPattern": "/planner/buckets/{plannerBucket-id}",
825
+ "method": "patch",
826
+ "toolName": "update-planner-bucket",
827
+ "scopes": ["Tasks.ReadWrite"],
828
+ "llmTip": "CRITICAL: Requires If-Match header with ETag from get-planner-bucket (use includeHeaders=true)."
829
+ },
830
+ {
831
+ "pathPattern": "/planner/buckets/{plannerBucket-id}",
832
+ "method": "delete",
833
+ "toolName": "delete-planner-bucket",
834
+ "scopes": ["Tasks.ReadWrite"],
835
+ "llmTip": "CRITICAL: Requires If-Match header with ETag from get-planner-bucket (use includeHeaders=true)."
836
+ },
780
837
  {
781
838
  "pathPattern": "/me/contacts",
782
839
  "method": "get",
@@ -901,6 +958,20 @@
901
958
  "workScopes": ["Group.Read.All"],
902
959
  "llmTip": "Gets a specific group's details: displayName, description, mail, visibility, groupTypes, membershipRule, createdDateTime. Use $select to limit returned properties."
903
960
  },
961
+ {
962
+ "pathPattern": "/groups/{group-id}/calendarView",
963
+ "method": "get",
964
+ "toolName": "get-group-calendar-view",
965
+ "workScopes": ["Group.Read.All"],
966
+ "supportsTimezone": true
967
+ },
968
+ {
969
+ "pathPattern": "/groups/{group-id}/events",
970
+ "method": "get",
971
+ "toolName": "list-group-events",
972
+ "workScopes": ["Group.Read.All"],
973
+ "supportsTimezone": true
974
+ },
904
975
  {
905
976
  "pathPattern": "/groups/{group-id}/members",
906
977
  "method": "get",