@softeria/ms-365-mcp-server 0.86.0 → 0.87.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/dist/auth.js CHANGED
@@ -12,7 +12,8 @@ async function getKeytar() {
12
12
  }
13
13
  if (keytar === null) {
14
14
  try {
15
- keytar = await import("keytar");
15
+ const mod = await import("keytar");
16
+ keytar = mod.default ?? mod;
16
17
  return keytar;
17
18
  } catch (error) {
18
19
  logger.info("keytar not available, using file-based credential storage");
@@ -1618,5 +1618,47 @@
1618
1618
  "toolName": "create-chat",
1619
1619
  "workScopes": ["Chat.Create", "Chat.ReadWrite"],
1620
1620
  "llmTip": "Creates a new 1:1 or group Teams chat. Body: { chatType ('oneOnOne' or 'group'), topic (optional, group only), members: [{ '@odata.type': '#microsoft.graph.aadUserConversationMember', roles: ['owner' | 'guest'], 'user@odata.bind': 'https://graph.microsoft.com/v1.0/users({id})' }] }. A oneOnOne chat requires exactly 2 members (self + other), both with role 'owner'. For group chats, include all participants. The signed-in user must be one of the members. Returns the created chat with its id — use that id with send-chat-message, list-chat-members, etc."
1621
+ },
1622
+ {
1623
+ "pathPattern": "/subscriptions",
1624
+ "method": "get",
1625
+ "toolName": "list-subscriptions",
1626
+ "scopes": [],
1627
+ "llmTip": "Lists webhook subscriptions owned by the current app/user. Returns id, resource, changeType, notificationUrl, expirationDateTime, clientState. Use $filter=resource eq '/me/messages' to find subscriptions for a specific resource. No dedicated 'Subscription.*' scope exists — the caller must already have a read permission for the subscribed resource (e.g. Mail.Read for /me/messages), which is supplied by the tool that reads that resource."
1628
+ },
1629
+ {
1630
+ "pathPattern": "/subscriptions",
1631
+ "method": "post",
1632
+ "toolName": "create-subscription",
1633
+ "scopes": [],
1634
+ "llmTip": "Creates a webhook subscription for change notifications. Required body: { changeType (comma-separated: 'created,updated,deleted'), notificationUrl (HTTPS, must validate with token echo), resource (e.g. '/me/mailFolders/inbox/messages', '/users/{id}/events', '/teams/{id}/channels/{id}/messages'), expirationDateTime (ISO 8601, max varies by resource type — 1 hour for calls, 24h for messages, 3 days for mail), clientState (opaque string returned in notifications, for validation) }. Optional: includeResourceData (true enables rich notifications, requires encryptionCertificate + encryptionCertificateId). No dedicated scope — caller must have a read permission for the target resource (e.g. Mail.Read, Calendars.Read, ChannelMessage.Read.All, Files.Read.All)."
1635
+ },
1636
+ {
1637
+ "pathPattern": "/subscriptions/{subscription-id}",
1638
+ "method": "get",
1639
+ "toolName": "get-subscription",
1640
+ "scopes": [],
1641
+ "llmTip": "Gets a specific webhook subscription by id. Use list-subscriptions to find the id. Returns full subscription details including resource, changeType, notificationUrl, expirationDateTime, applicationId."
1642
+ },
1643
+ {
1644
+ "pathPattern": "/subscriptions/{subscription-id}",
1645
+ "method": "patch",
1646
+ "toolName": "update-subscription",
1647
+ "scopes": [],
1648
+ "llmTip": "Renews a webhook subscription by extending its expiration. Body: { expirationDateTime (ISO 8601, new expiry) }. Call before the current expirationDateTime to avoid missing notifications. Max extension varies by resource type — check Microsoft Graph docs for subscription limits."
1649
+ },
1650
+ {
1651
+ "pathPattern": "/subscriptions/{subscription-id}",
1652
+ "method": "delete",
1653
+ "toolName": "delete-subscription",
1654
+ "scopes": [],
1655
+ "llmTip": "Deletes a webhook subscription. No further change notifications will be sent. Use this to clean up stale subscriptions or stop receiving notifications. Use list-subscriptions to find the id."
1656
+ },
1657
+ {
1658
+ "pathPattern": "/subscriptions/{subscription-id}/reauthorize",
1659
+ "method": "post",
1660
+ "toolName": "reauthorize-subscription",
1661
+ "scopes": [],
1662
+ "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."
1621
1663
  }
1622
1664
  ]
@@ -4292,6 +4292,11 @@ const microsoft_graph_virtualEventSessionCollectionResponse = z.object({
4292
4292
  "@odata.nextLink": z.string().nullable(),
4293
4293
  value: z.array(microsoft_graph_virtualEventSession)
4294
4294
  }).partial().passthrough();
4295
+ const microsoft_graph_subscriptionCollectionResponse = z.object({
4296
+ "@odata.count": z.number().int().nullable(),
4297
+ "@odata.nextLink": z.string().nullable(),
4298
+ value: z.array(microsoft_graph_subscription)
4299
+ }).partial().passthrough();
4295
4300
  const microsoft_graph_channelCollectionResponse = z.object({
4296
4301
  "@odata.count": z.number().int().nullable(),
4297
4302
  "@odata.nextLink": z.string().nullable(),
@@ -4748,6 +4753,7 @@ const schemas = {
4748
4753
  microsoft_graph_virtualEventRegistration,
4749
4754
  microsoft_graph_virtualEventWebinar,
4750
4755
  microsoft_graph_virtualEventSessionCollectionResponse,
4756
+ microsoft_graph_subscriptionCollectionResponse,
4751
4757
  microsoft_graph_channelCollectionResponse,
4752
4758
  microsoft_graph_teamsTabCollectionResponse,
4753
4759
  microsoft_graph_userCollectionResponse
@@ -11409,6 +11415,126 @@ To monitor future changes, call the delta API by using the @odata.deltaLink in t
11409
11415
  ],
11410
11416
  response: z.void()
11411
11417
  },
11418
+ {
11419
+ method: "get",
11420
+ path: "/subscriptions",
11421
+ alias: "list-subscriptions",
11422
+ description: `Retrieve the properties and relationships of webhook subscriptions, based on the app ID, the user, and the user's role with a tenant. The content of the response depends on the context in which the app is calling; for details, see the scenarios in the Permissions section.`,
11423
+ requestFormat: "json",
11424
+ parameters: [
11425
+ {
11426
+ name: "$top",
11427
+ type: "Query",
11428
+ schema: z.number().int().gte(0).describe("Show only the first n items").optional()
11429
+ },
11430
+ {
11431
+ name: "$skip",
11432
+ type: "Query",
11433
+ schema: z.number().int().gte(0).describe("Skip the first n items").optional()
11434
+ },
11435
+ {
11436
+ name: "$search",
11437
+ type: "Query",
11438
+ schema: z.string().describe("Search items by search phrases").optional()
11439
+ },
11440
+ {
11441
+ name: "$filter",
11442
+ type: "Query",
11443
+ schema: z.string().describe("Filter items by property values").optional()
11444
+ },
11445
+ {
11446
+ name: "$count",
11447
+ type: "Query",
11448
+ schema: z.boolean().describe("Include count of items").optional()
11449
+ },
11450
+ {
11451
+ name: "$orderby",
11452
+ type: "Query",
11453
+ schema: z.array(z.string()).describe("Order items by property values").optional()
11454
+ },
11455
+ {
11456
+ name: "$select",
11457
+ type: "Query",
11458
+ schema: z.array(z.string()).describe("Select properties to be returned").optional()
11459
+ },
11460
+ {
11461
+ name: "$expand",
11462
+ type: "Query",
11463
+ schema: z.array(z.string()).describe("Expand related entities").optional()
11464
+ }
11465
+ ],
11466
+ response: z.void()
11467
+ },
11468
+ {
11469
+ method: "post",
11470
+ path: "/subscriptions",
11471
+ alias: "create-subscription",
11472
+ description: `Subscribes a listener application to receive change notifications when the requested type of changes occur to the specified resource in Microsoft Graph. To identify the resources for which you can create subscriptions and the limitations on subscriptions, see Set up notifications for changes in resource data: Supported resources. Some resources support rich notifications, that is, notifications that include resource data. For more information about these resources, see Set up change notifications that include resource data: Supported resources.`,
11473
+ requestFormat: "json",
11474
+ parameters: [
11475
+ {
11476
+ name: "body",
11477
+ description: `New entity`,
11478
+ type: "Body",
11479
+ schema: microsoft_graph_subscription
11480
+ }
11481
+ ],
11482
+ response: z.void()
11483
+ },
11484
+ {
11485
+ method: "get",
11486
+ path: "/subscriptions/:subscriptionId",
11487
+ alias: "get-subscription",
11488
+ description: `Retrieve the properties and relationships of a subscription. See the table in the Permissions section for the list of resources that support subscribing to change notifications.`,
11489
+ requestFormat: "json",
11490
+ parameters: [
11491
+ {
11492
+ name: "$select",
11493
+ type: "Query",
11494
+ schema: z.array(z.string()).describe("Select properties to be returned").optional()
11495
+ }
11496
+ ],
11497
+ response: z.void()
11498
+ },
11499
+ {
11500
+ method: "patch",
11501
+ path: "/subscriptions/:subscriptionId",
11502
+ alias: "update-subscription",
11503
+ description: `Renew a subscription by extending its expiry time. The table in the Permissions section lists the resources that support subscribing to change notifications. Subscriptions expire after a length of time that varies by resource type. In order to avoid missing change notifications, an app should renew its subscriptions well in advance of their expiry date. See subscription for maximum length of a subscription for each resource type.`,
11504
+ requestFormat: "json",
11505
+ parameters: [
11506
+ {
11507
+ name: "body",
11508
+ description: `New property values`,
11509
+ type: "Body",
11510
+ schema: microsoft_graph_subscription
11511
+ }
11512
+ ],
11513
+ response: z.void()
11514
+ },
11515
+ {
11516
+ method: "delete",
11517
+ path: "/subscriptions/:subscriptionId",
11518
+ alias: "delete-subscription",
11519
+ description: `Delete a subscription. For the list of resources that support subscribing to change notifications, see the table in the Permissions section.`,
11520
+ requestFormat: "json",
11521
+ parameters: [
11522
+ {
11523
+ name: "If-Match",
11524
+ type: "Header",
11525
+ schema: z.string().describe("ETag").optional()
11526
+ }
11527
+ ],
11528
+ response: z.void()
11529
+ },
11530
+ {
11531
+ method: "post",
11532
+ path: "/subscriptions/:subscriptionId/reauthorize",
11533
+ alias: "reauthorize-subscription",
11534
+ description: `Reauthorize a subscription when you receive a reauthorizationRequired challenge.`,
11535
+ requestFormat: "json",
11536
+ response: z.void()
11537
+ },
11412
11538
  {
11413
11539
  method: "get",
11414
11540
  path: "/teams/:teamId",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
- "version": "0.86.0",
3
+ "version": "0.87.1",
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",
@@ -1618,5 +1618,47 @@
1618
1618
  "toolName": "create-chat",
1619
1619
  "workScopes": ["Chat.Create", "Chat.ReadWrite"],
1620
1620
  "llmTip": "Creates a new 1:1 or group Teams chat. Body: { chatType ('oneOnOne' or 'group'), topic (optional, group only), members: [{ '@odata.type': '#microsoft.graph.aadUserConversationMember', roles: ['owner' | 'guest'], 'user@odata.bind': 'https://graph.microsoft.com/v1.0/users({id})' }] }. A oneOnOne chat requires exactly 2 members (self + other), both with role 'owner'. For group chats, include all participants. The signed-in user must be one of the members. Returns the created chat with its id — use that id with send-chat-message, list-chat-members, etc."
1621
+ },
1622
+ {
1623
+ "pathPattern": "/subscriptions",
1624
+ "method": "get",
1625
+ "toolName": "list-subscriptions",
1626
+ "scopes": [],
1627
+ "llmTip": "Lists webhook subscriptions owned by the current app/user. Returns id, resource, changeType, notificationUrl, expirationDateTime, clientState. Use $filter=resource eq '/me/messages' to find subscriptions for a specific resource. No dedicated 'Subscription.*' scope exists — the caller must already have a read permission for the subscribed resource (e.g. Mail.Read for /me/messages), which is supplied by the tool that reads that resource."
1628
+ },
1629
+ {
1630
+ "pathPattern": "/subscriptions",
1631
+ "method": "post",
1632
+ "toolName": "create-subscription",
1633
+ "scopes": [],
1634
+ "llmTip": "Creates a webhook subscription for change notifications. Required body: { changeType (comma-separated: 'created,updated,deleted'), notificationUrl (HTTPS, must validate with token echo), resource (e.g. '/me/mailFolders/inbox/messages', '/users/{id}/events', '/teams/{id}/channels/{id}/messages'), expirationDateTime (ISO 8601, max varies by resource type — 1 hour for calls, 24h for messages, 3 days for mail), clientState (opaque string returned in notifications, for validation) }. Optional: includeResourceData (true enables rich notifications, requires encryptionCertificate + encryptionCertificateId). No dedicated scope — caller must have a read permission for the target resource (e.g. Mail.Read, Calendars.Read, ChannelMessage.Read.All, Files.Read.All)."
1635
+ },
1636
+ {
1637
+ "pathPattern": "/subscriptions/{subscription-id}",
1638
+ "method": "get",
1639
+ "toolName": "get-subscription",
1640
+ "scopes": [],
1641
+ "llmTip": "Gets a specific webhook subscription by id. Use list-subscriptions to find the id. Returns full subscription details including resource, changeType, notificationUrl, expirationDateTime, applicationId."
1642
+ },
1643
+ {
1644
+ "pathPattern": "/subscriptions/{subscription-id}",
1645
+ "method": "patch",
1646
+ "toolName": "update-subscription",
1647
+ "scopes": [],
1648
+ "llmTip": "Renews a webhook subscription by extending its expiration. Body: { expirationDateTime (ISO 8601, new expiry) }. Call before the current expirationDateTime to avoid missing notifications. Max extension varies by resource type — check Microsoft Graph docs for subscription limits."
1649
+ },
1650
+ {
1651
+ "pathPattern": "/subscriptions/{subscription-id}",
1652
+ "method": "delete",
1653
+ "toolName": "delete-subscription",
1654
+ "scopes": [],
1655
+ "llmTip": "Deletes a webhook subscription. No further change notifications will be sent. Use this to clean up stale subscriptions or stop receiving notifications. Use list-subscriptions to find the id."
1656
+ },
1657
+ {
1658
+ "pathPattern": "/subscriptions/{subscription-id}/reauthorize",
1659
+ "method": "post",
1660
+ "toolName": "reauthorize-subscription",
1661
+ "scopes": [],
1662
+ "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."
1621
1663
  }
1622
1664
  ]