@softeria/ms-365-mcp-server 0.88.1 → 0.89.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.
- package/README.md +4 -0
- package/dist/endpoints.json +21 -0
- package/dist/generated/client.js +163 -0
- package/dist/graph-tools.js +1 -6
- package/package.json +1 -1
- package/src/endpoints.json +21 -0
package/README.md
CHANGED
|
@@ -622,6 +622,10 @@ After cloning the repository, you may need to generate the client code from the
|
|
|
622
622
|
npm run generate
|
|
623
623
|
```
|
|
624
624
|
|
|
625
|
+
## Related Projects
|
|
626
|
+
|
|
627
|
+
- [ms-365-admin-mcp-server](https://github.com/okapi-ca/ms-365-admin-mcp-server) by [@okapi-ca](https://github.com/okapi-ca): companion server for admin/daemon scenarios using application permissions (client credentials flow), covering security alerts, audit logs, service health, and usage reports.
|
|
628
|
+
|
|
625
629
|
## Support
|
|
626
630
|
|
|
627
631
|
If you're having problems or need help:
|
package/dist/endpoints.json
CHANGED
|
@@ -1715,5 +1715,26 @@
|
|
|
1715
1715
|
"toolName": "reauthorize-subscription",
|
|
1716
1716
|
"scopes": [],
|
|
1717
1717
|
"llmTip": "Reauthorizes a subscription after receiving a 'reauthorizationRequired' lifecycle notification from Microsoft Graph. No body required. Must be called within the reauthorizationRequiredDateTime window (typically 48h) to avoid subscription expiry."
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
"pathPattern": "/drives/{drive-id}/items/{driveItem-id}/extractSensitivityLabels",
|
|
1721
|
+
"method": "post",
|
|
1722
|
+
"toolName": "extract-drive-item-sensitivity-labels",
|
|
1723
|
+
"workScopes": ["Files.Read.All"],
|
|
1724
|
+
"llmTip": "Returns the Microsoft Information Protection (MIP) sensitivity labels assigned to a file. No request body. Response: { value: { labels: [{ sensitivityLabelId, assignmentMethod, tenantId }] } }. Use list-sensitivity-labels to map sensitivityLabelId to a human-readable name. Not supported for personal Microsoft accounts. May return 423 Locked if the file is double-key-encrypted or decryption is deferred."
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
"pathPattern": "/me/dataSecurityAndGovernance/sensitivityLabels",
|
|
1728
|
+
"method": "get",
|
|
1729
|
+
"toolName": "list-sensitivity-labels",
|
|
1730
|
+
"workScopes": ["SensitivityLabel.Read"],
|
|
1731
|
+
"llmTip": "Lists Microsoft Information Protection (MIP) sensitivity labels available to the signed-in user. Use to map label IDs (returned by extract-drive-item-sensitivity-labels) to human-readable names. Not supported for personal Microsoft accounts."
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
"pathPattern": "/me/dataSecurityAndGovernance/sensitivityLabels/{sensitivityLabel-id}",
|
|
1735
|
+
"method": "get",
|
|
1736
|
+
"toolName": "get-sensitivity-label",
|
|
1737
|
+
"workScopes": ["SensitivityLabel.Read"],
|
|
1738
|
+
"llmTip": "Gets a single MIP sensitivity label by id. Use list-sensitivity-labels to find ids. Not supported for personal Microsoft accounts."
|
|
1718
1739
|
}
|
|
1719
1740
|
]
|
package/dist/generated/client.js
CHANGED
|
@@ -776,6 +776,22 @@ const microsoft_graph_uploadSession = z.object({
|
|
|
776
776
|
uploadUrl: z.string().describe("The URL endpoint that accepts PUT requests for byte ranges of the file.").nullish()
|
|
777
777
|
}).passthrough();
|
|
778
778
|
const BaseDeltaFunctionResponse = z.object({ "@odata.nextLink": z.string().nullable(), "@odata.deltaLink": z.string().nullable() }).partial().passthrough();
|
|
779
|
+
const microsoft_graph_sensitivityLabelAssignmentMethod = z.enum([
|
|
780
|
+
"standard",
|
|
781
|
+
"privileged",
|
|
782
|
+
"auto",
|
|
783
|
+
"unknownFutureValue"
|
|
784
|
+
]);
|
|
785
|
+
const microsoft_graph_sensitivityLabelAssignment = z.object({
|
|
786
|
+
assignmentMethod: microsoft_graph_sensitivityLabelAssignmentMethod.optional(),
|
|
787
|
+
sensitivityLabelId: z.string().describe("The unique identifier for the sensitivity label assigned to the file.").optional(),
|
|
788
|
+
tenantId: z.string().describe(
|
|
789
|
+
"The unique identifier for the tenant that hosts the file when this label is applied."
|
|
790
|
+
).optional()
|
|
791
|
+
}).passthrough();
|
|
792
|
+
const microsoft_graph_extractSensitivityLabelsResult = z.object({
|
|
793
|
+
labels: z.array(microsoft_graph_sensitivityLabelAssignment).describe("List of sensitivity labels assigned to a file.").optional()
|
|
794
|
+
}).passthrough();
|
|
779
795
|
const share_drive_item_Body = z.object({
|
|
780
796
|
requireSignIn: z.boolean().nullable().default(false),
|
|
781
797
|
roles: z.array(z.string().nullable()),
|
|
@@ -1975,6 +1991,67 @@ const microsoft_graph_contactCollectionResponse = z.object({
|
|
|
1975
1991
|
"@odata.nextLink": z.string().nullable(),
|
|
1976
1992
|
value: z.array(microsoft_graph_contact)
|
|
1977
1993
|
}).partial().passthrough();
|
|
1994
|
+
const microsoft_graph_labelActionSource = z.enum([
|
|
1995
|
+
"manual",
|
|
1996
|
+
"automatic",
|
|
1997
|
+
"recommended",
|
|
1998
|
+
"none",
|
|
1999
|
+
"unknownFutureValue"
|
|
2000
|
+
]);
|
|
2001
|
+
const microsoft_graph_usageRights = z.enum([
|
|
2002
|
+
"unknown",
|
|
2003
|
+
"docEdit",
|
|
2004
|
+
"edit",
|
|
2005
|
+
"comment",
|
|
2006
|
+
"export",
|
|
2007
|
+
"forward",
|
|
2008
|
+
"owner",
|
|
2009
|
+
"print",
|
|
2010
|
+
"reply",
|
|
2011
|
+
"replyAll",
|
|
2012
|
+
"view",
|
|
2013
|
+
"extract",
|
|
2014
|
+
"viewRightsData",
|
|
2015
|
+
"editRightsData",
|
|
2016
|
+
"objModel",
|
|
2017
|
+
"accessDenied",
|
|
2018
|
+
"userDefinedProtectionTypeNotSupportedException",
|
|
2019
|
+
"encryptedProtectionTypeNotSupportedException",
|
|
2020
|
+
"purviewClaimsChallengeNotSupportedException",
|
|
2021
|
+
"exception",
|
|
2022
|
+
"labelNotFoundException",
|
|
2023
|
+
"unknownFutureValue"
|
|
2024
|
+
]);
|
|
2025
|
+
const microsoft_graph_usageRightsIncluded = z.object({
|
|
2026
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
2027
|
+
ownerEmail: z.string().describe("The email of owner label rights.").nullish(),
|
|
2028
|
+
userEmail: z.string().describe("The email of user with label user rights.").nullish(),
|
|
2029
|
+
value: microsoft_graph_usageRights.optional()
|
|
2030
|
+
}).passthrough();
|
|
2031
|
+
const microsoft_graph_sensitivityLabel = z.lazy(
|
|
2032
|
+
() => z.object({
|
|
2033
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
2034
|
+
actionSource: microsoft_graph_labelActionSource.optional(),
|
|
2035
|
+
autoTooltip: z.string().nullish(),
|
|
2036
|
+
description: z.string().nullish(),
|
|
2037
|
+
displayName: z.string().nullish(),
|
|
2038
|
+
hasProtection: z.boolean().nullish(),
|
|
2039
|
+
isDefault: z.boolean().nullish(),
|
|
2040
|
+
isEndpointProtectionEnabled: z.boolean().nullish(),
|
|
2041
|
+
isScopedToUser: z.boolean().nullish(),
|
|
2042
|
+
locale: z.string().nullish(),
|
|
2043
|
+
name: z.string().nullish(),
|
|
2044
|
+
priority: z.number().gte(-2147483648).lte(2147483647).nullish(),
|
|
2045
|
+
toolTip: z.string().nullish(),
|
|
2046
|
+
rights: microsoft_graph_usageRightsIncluded.optional(),
|
|
2047
|
+
sublabels: z.array(microsoft_graph_sensitivityLabel).optional()
|
|
2048
|
+
}).passthrough()
|
|
2049
|
+
);
|
|
2050
|
+
const microsoft_graph_sensitivityLabelCollectionResponse = z.object({
|
|
2051
|
+
"@odata.count": z.number().int().nullable(),
|
|
2052
|
+
"@odata.nextLink": z.string().nullable(),
|
|
2053
|
+
value: z.array(microsoft_graph_sensitivityLabel)
|
|
2054
|
+
}).partial().passthrough();
|
|
1978
2055
|
const microsoft_graph_storagePlanInformation = z.object({
|
|
1979
2056
|
upgradeAvailable: z.boolean().describe("Indicates whether there are higher storage quota plans available. Read-only.").nullish()
|
|
1980
2057
|
}).passthrough();
|
|
@@ -4404,6 +4481,9 @@ const schemas = {
|
|
|
4404
4481
|
create_upload_session_Body,
|
|
4405
4482
|
microsoft_graph_uploadSession,
|
|
4406
4483
|
BaseDeltaFunctionResponse,
|
|
4484
|
+
microsoft_graph_sensitivityLabelAssignmentMethod,
|
|
4485
|
+
microsoft_graph_sensitivityLabelAssignment,
|
|
4486
|
+
microsoft_graph_extractSensitivityLabelsResult,
|
|
4407
4487
|
share_drive_item_Body,
|
|
4408
4488
|
BaseCollectionPaginationCountResponse,
|
|
4409
4489
|
microsoft_graph_sharePointGroupIdentity,
|
|
@@ -4520,6 +4600,11 @@ const schemas = {
|
|
|
4520
4600
|
microsoft_graph_chatCollectionResponse,
|
|
4521
4601
|
microsoft_graph_contact,
|
|
4522
4602
|
microsoft_graph_contactCollectionResponse,
|
|
4603
|
+
microsoft_graph_labelActionSource,
|
|
4604
|
+
microsoft_graph_usageRights,
|
|
4605
|
+
microsoft_graph_usageRightsIncluded,
|
|
4606
|
+
microsoft_graph_sensitivityLabel,
|
|
4607
|
+
microsoft_graph_sensitivityLabelCollectionResponse,
|
|
4523
4608
|
microsoft_graph_storagePlanInformation,
|
|
4524
4609
|
microsoft_graph_quota,
|
|
4525
4610
|
microsoft_graph_systemFacet,
|
|
@@ -5472,6 +5557,14 @@ Items with this property set should be removed from your local state.`,
|
|
|
5472
5557
|
],
|
|
5473
5558
|
response: z.void()
|
|
5474
5559
|
},
|
|
5560
|
+
{
|
|
5561
|
+
method: "post",
|
|
5562
|
+
path: "/drives/:driveId/items/:driveItemId/extractSensitivityLabels",
|
|
5563
|
+
alias: "extract-drive-item-sensitivity-labels",
|
|
5564
|
+
description: `Invoke action extractSensitivityLabels`,
|
|
5565
|
+
requestFormat: "json",
|
|
5566
|
+
response: z.void()
|
|
5567
|
+
},
|
|
5475
5568
|
{
|
|
5476
5569
|
method: "post",
|
|
5477
5570
|
path: "/drives/:driveId/items/:driveItemId/invite",
|
|
@@ -7571,6 +7664,76 @@ or from some other calendar of the user.`,
|
|
|
7571
7664
|
],
|
|
7572
7665
|
response: z.void()
|
|
7573
7666
|
},
|
|
7667
|
+
{
|
|
7668
|
+
method: "get",
|
|
7669
|
+
path: "/me/dataSecurityAndGovernance/sensitivityLabels",
|
|
7670
|
+
alias: "list-sensitivity-labels",
|
|
7671
|
+
description: `Get sensitivityLabels from me`,
|
|
7672
|
+
requestFormat: "json",
|
|
7673
|
+
parameters: [
|
|
7674
|
+
{
|
|
7675
|
+
name: "$top",
|
|
7676
|
+
type: "Query",
|
|
7677
|
+
schema: z.number().int().gte(0).describe("Show only the first n items").optional()
|
|
7678
|
+
},
|
|
7679
|
+
{
|
|
7680
|
+
name: "$skip",
|
|
7681
|
+
type: "Query",
|
|
7682
|
+
schema: z.number().int().gte(0).describe("Skip the first n items").optional()
|
|
7683
|
+
},
|
|
7684
|
+
{
|
|
7685
|
+
name: "$search",
|
|
7686
|
+
type: "Query",
|
|
7687
|
+
schema: z.string().describe("Search items by search phrases").optional()
|
|
7688
|
+
},
|
|
7689
|
+
{
|
|
7690
|
+
name: "$filter",
|
|
7691
|
+
type: "Query",
|
|
7692
|
+
schema: z.string().describe("Filter items by property values").optional()
|
|
7693
|
+
},
|
|
7694
|
+
{
|
|
7695
|
+
name: "$count",
|
|
7696
|
+
type: "Query",
|
|
7697
|
+
schema: z.boolean().describe("Include count of items").optional()
|
|
7698
|
+
},
|
|
7699
|
+
{
|
|
7700
|
+
name: "$orderby",
|
|
7701
|
+
type: "Query",
|
|
7702
|
+
schema: z.array(z.string()).describe("Order items by property values").optional()
|
|
7703
|
+
},
|
|
7704
|
+
{
|
|
7705
|
+
name: "$select",
|
|
7706
|
+
type: "Query",
|
|
7707
|
+
schema: z.array(z.string()).describe("Select properties to be returned").optional()
|
|
7708
|
+
},
|
|
7709
|
+
{
|
|
7710
|
+
name: "$expand",
|
|
7711
|
+
type: "Query",
|
|
7712
|
+
schema: z.array(z.string()).describe("Expand related entities").optional()
|
|
7713
|
+
}
|
|
7714
|
+
],
|
|
7715
|
+
response: z.void()
|
|
7716
|
+
},
|
|
7717
|
+
{
|
|
7718
|
+
method: "get",
|
|
7719
|
+
path: "/me/dataSecurityAndGovernance/sensitivityLabels/:sensitivityLabelId",
|
|
7720
|
+
alias: "get-sensitivity-label",
|
|
7721
|
+
description: `Get sensitivityLabels from me`,
|
|
7722
|
+
requestFormat: "json",
|
|
7723
|
+
parameters: [
|
|
7724
|
+
{
|
|
7725
|
+
name: "$select",
|
|
7726
|
+
type: "Query",
|
|
7727
|
+
schema: z.array(z.string()).describe("Select properties to be returned").optional()
|
|
7728
|
+
},
|
|
7729
|
+
{
|
|
7730
|
+
name: "$expand",
|
|
7731
|
+
type: "Query",
|
|
7732
|
+
schema: z.array(z.string()).describe("Expand related entities").optional()
|
|
7733
|
+
}
|
|
7734
|
+
],
|
|
7735
|
+
response: z.void()
|
|
7736
|
+
},
|
|
7574
7737
|
{
|
|
7575
7738
|
method: "get",
|
|
7576
7739
|
path: "/me/directReports",
|
package/dist/graph-tools.js
CHANGED
|
@@ -221,13 +221,8 @@ async function executeGraphTool(tool, config, graphClient, params, authManager)
|
|
|
221
221
|
while (nextLink && pageCount < maxPages && allItems.length < maxItems) {
|
|
222
222
|
logger.info(`Fetching page ${pageCount + 1} from: ${nextLink}`);
|
|
223
223
|
const url = new URL(nextLink);
|
|
224
|
-
const nextPath = url.pathname.replace("/v1.0", "");
|
|
224
|
+
const nextPath = url.pathname.replace("/v1.0", "") + url.search;
|
|
225
225
|
const nextOptions = { ...options };
|
|
226
|
-
const nextQueryParams = {};
|
|
227
|
-
for (const [key, value] of url.searchParams.entries()) {
|
|
228
|
-
nextQueryParams[key] = value;
|
|
229
|
-
}
|
|
230
|
-
nextOptions.queryParams = nextQueryParams;
|
|
231
226
|
const nextResponse = await graphClient.graphRequest(nextPath, nextOptions);
|
|
232
227
|
if (nextResponse?.content?.[0]?.text) {
|
|
233
228
|
const nextJsonResponse = JSON.parse(nextResponse.content[0].text);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softeria/ms-365-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.89.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",
|
package/src/endpoints.json
CHANGED
|
@@ -1715,5 +1715,26 @@
|
|
|
1715
1715
|
"toolName": "reauthorize-subscription",
|
|
1716
1716
|
"scopes": [],
|
|
1717
1717
|
"llmTip": "Reauthorizes a subscription after receiving a 'reauthorizationRequired' lifecycle notification from Microsoft Graph. No body required. Must be called within the reauthorizationRequiredDateTime window (typically 48h) to avoid subscription expiry."
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
"pathPattern": "/drives/{drive-id}/items/{driveItem-id}/extractSensitivityLabels",
|
|
1721
|
+
"method": "post",
|
|
1722
|
+
"toolName": "extract-drive-item-sensitivity-labels",
|
|
1723
|
+
"workScopes": ["Files.Read.All"],
|
|
1724
|
+
"llmTip": "Returns the Microsoft Information Protection (MIP) sensitivity labels assigned to a file. No request body. Response: { value: { labels: [{ sensitivityLabelId, assignmentMethod, tenantId }] } }. Use list-sensitivity-labels to map sensitivityLabelId to a human-readable name. Not supported for personal Microsoft accounts. May return 423 Locked if the file is double-key-encrypted or decryption is deferred."
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
"pathPattern": "/me/dataSecurityAndGovernance/sensitivityLabels",
|
|
1728
|
+
"method": "get",
|
|
1729
|
+
"toolName": "list-sensitivity-labels",
|
|
1730
|
+
"workScopes": ["SensitivityLabel.Read"],
|
|
1731
|
+
"llmTip": "Lists Microsoft Information Protection (MIP) sensitivity labels available to the signed-in user. Use to map label IDs (returned by extract-drive-item-sensitivity-labels) to human-readable names. Not supported for personal Microsoft accounts."
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
"pathPattern": "/me/dataSecurityAndGovernance/sensitivityLabels/{sensitivityLabel-id}",
|
|
1735
|
+
"method": "get",
|
|
1736
|
+
"toolName": "get-sensitivity-label",
|
|
1737
|
+
"workScopes": ["SensitivityLabel.Read"],
|
|
1738
|
+
"llmTip": "Gets a single MIP sensitivity label by id. Use list-sensitivity-labels to find ids. Not supported for personal Microsoft accounts."
|
|
1718
1739
|
}
|
|
1719
1740
|
]
|