@softeria/ms-365-mcp-server 0.17.0 → 0.18.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 +21 -0
- package/dist/endpoints.json +30 -0
- package/dist/generated/client.js +334 -12
- package/package.json +1 -1
- package/src/endpoints.json +30 -0
package/README.md
CHANGED
|
@@ -71,6 +71,13 @@ get-sharepoint-site-drive-by-id, list-sharepoint-site-items, get-sharepoint-site
|
|
|
71
71
|
get-sharepoint-site-list, list-sharepoint-site-list-items, get-sharepoint-site-list-item,
|
|
72
72
|
get-sharepoint-sites-delta</sub>
|
|
73
73
|
|
|
74
|
+
**Shared Mailboxes**
|
|
75
|
+
<sub>list-shared-mailbox-messages, list-shared-mailbox-folder-messages, get-shared-mailbox-message,
|
|
76
|
+
send-shared-mailbox-mail</sub>
|
|
77
|
+
|
|
78
|
+
**User Management**
|
|
79
|
+
<sub>list-users</sub>
|
|
80
|
+
|
|
74
81
|
## Organization/Work Mode
|
|
75
82
|
|
|
76
83
|
To access work/school features (Teams, SharePoint, etc.), enable organization mode using any of these flags:
|
|
@@ -89,6 +96,20 @@ To access work/school features (Teams, SharePoint, etc.), enable organization mo
|
|
|
89
96
|
Organization mode must be enabled from the start to access work account features. Without this flag, only personal
|
|
90
97
|
account features (email, calendar, OneDrive, etc.) are available.
|
|
91
98
|
|
|
99
|
+
## Shared Mailbox Access
|
|
100
|
+
|
|
101
|
+
To access shared mailboxes, you need:
|
|
102
|
+
|
|
103
|
+
1. **Organization mode**: Shared mailbox tools require `--org-mode` flag (work/school accounts only)
|
|
104
|
+
2. **Delegated permissions**: `Mail.Read.Shared` or `Mail.Send.Shared` scopes
|
|
105
|
+
3. **Exchange permissions**: The signed-in user must have been granted access to the shared mailbox
|
|
106
|
+
4. **Usage**: Use the shared mailbox's email address as the `user-id` parameter in the shared mailbox tools
|
|
107
|
+
|
|
108
|
+
**Finding shared mailboxes**: Use the `list-users` tool to discover available users and shared mailboxes in your
|
|
109
|
+
organization.
|
|
110
|
+
|
|
111
|
+
Example: `list-shared-mailbox-messages` with `user-id` set to `shared-mailbox@company.com`
|
|
112
|
+
|
|
92
113
|
## Quick Start Example
|
|
93
114
|
|
|
94
115
|
Test login in Claude Desktop:
|
package/dist/endpoints.json
CHANGED
|
@@ -29,6 +29,36 @@
|
|
|
29
29
|
"toolName": "send-mail",
|
|
30
30
|
"scopes": ["Mail.Send"]
|
|
31
31
|
},
|
|
32
|
+
{
|
|
33
|
+
"pathPattern": "/users/{user-id}/messages",
|
|
34
|
+
"method": "get",
|
|
35
|
+
"toolName": "list-shared-mailbox-messages",
|
|
36
|
+
"workScopes": ["Mail.Read.Shared"]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"pathPattern": "/users/{user-id}/mailFolders/{mailFolder-id}/messages",
|
|
40
|
+
"method": "get",
|
|
41
|
+
"toolName": "list-shared-mailbox-folder-messages",
|
|
42
|
+
"workScopes": ["Mail.Read.Shared"]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"pathPattern": "/users/{user-id}/messages/{message-id}",
|
|
46
|
+
"method": "get",
|
|
47
|
+
"toolName": "get-shared-mailbox-message",
|
|
48
|
+
"workScopes": ["Mail.Read.Shared"]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"pathPattern": "/users/{user-id}/sendMail",
|
|
52
|
+
"method": "post",
|
|
53
|
+
"toolName": "send-shared-mailbox-mail",
|
|
54
|
+
"workScopes": ["Mail.Send.Shared"]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"pathPattern": "/users",
|
|
58
|
+
"method": "get",
|
|
59
|
+
"toolName": "list-users",
|
|
60
|
+
"workScopes": ["User.Read.All"]
|
|
61
|
+
},
|
|
32
62
|
{
|
|
33
63
|
"pathPattern": "/me/messages",
|
|
34
64
|
"method": "post",
|
package/dist/generated/client.js
CHANGED
|
@@ -355,7 +355,7 @@ const microsoft_graph_teamsTab = z.object({
|
|
|
355
355
|
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
356
356
|
configuration: microsoft_graph_teamsTabConfiguration.optional(),
|
|
357
357
|
displayName: z.string().describe("Name of the tab.").nullish(),
|
|
358
|
-
webUrl: z.string().describe("Deep link URL of the tab instance. Read
|
|
358
|
+
webUrl: z.string().describe("Deep link URL of the tab instance. Read-only.").nullish(),
|
|
359
359
|
teamsApp: microsoft_graph_teamsApp.optional()
|
|
360
360
|
}).strict();
|
|
361
361
|
const microsoft_graph_chat = z.object({
|
|
@@ -3104,6 +3104,11 @@ const microsoft_graph_conversationMemberCollectionResponse = z.object({
|
|
|
3104
3104
|
"@odata.nextLink": z.string().nullable(),
|
|
3105
3105
|
value: z.array(microsoft_graph_conversationMember)
|
|
3106
3106
|
}).partial().strict();
|
|
3107
|
+
const microsoft_graph_userCollectionResponse = z.object({
|
|
3108
|
+
"@odata.count": z.number().int().nullable(),
|
|
3109
|
+
"@odata.nextLink": z.string().nullable(),
|
|
3110
|
+
value: z.array(microsoft_graph_user)
|
|
3111
|
+
}).partial().strict();
|
|
3107
3112
|
const schemas = {
|
|
3108
3113
|
microsoft_graph_chatType,
|
|
3109
3114
|
microsoft_graph_teamworkUserIdentityType,
|
|
@@ -3421,7 +3426,8 @@ const schemas = {
|
|
|
3421
3426
|
microsoft_graph_listItemCollectionResponse,
|
|
3422
3427
|
BaseDeltaFunctionResponse,
|
|
3423
3428
|
microsoft_graph_channelCollectionResponse,
|
|
3424
|
-
microsoft_graph_conversationMemberCollectionResponse
|
|
3429
|
+
microsoft_graph_conversationMemberCollectionResponse,
|
|
3430
|
+
microsoft_graph_userCollectionResponse
|
|
3425
3431
|
};
|
|
3426
3432
|
const endpoints = makeApi([
|
|
3427
3433
|
{
|
|
@@ -4161,7 +4167,7 @@ const endpoints = makeApi([
|
|
|
4161
4167
|
method: "get",
|
|
4162
4168
|
path: "/me",
|
|
4163
4169
|
alias: "get-current-user",
|
|
4164
|
-
description: `
|
|
4170
|
+
description: `Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node.`,
|
|
4165
4171
|
requestFormat: "json",
|
|
4166
4172
|
parameters: [
|
|
4167
4173
|
{
|
|
@@ -5658,7 +5664,11 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5658
5664
|
method: "post",
|
|
5659
5665
|
path: "/me/messages",
|
|
5660
5666
|
alias: "create-draft-email",
|
|
5661
|
-
description: `Create
|
|
5667
|
+
description: `Create a draft of a new message in either JSON or MIME format. When using JSON format, you can:
|
|
5668
|
+
- Include an attachment to the message.
|
|
5669
|
+
- Update the draft later to add content to the body or change other message properties. When using MIME format:
|
|
5670
|
+
- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.
|
|
5671
|
+
- /* Add any attachments and S/MIME properties to the MIME content. By default, this operation saves the draft in the Drafts folder. Send the draft message in a subsequent operation. Alternatively, send a new message in a single operation, or create a draft to forward, reply and reply-all to an existing message.`,
|
|
5662
5672
|
requestFormat: "json",
|
|
5663
5673
|
parameters: [
|
|
5664
5674
|
{
|
|
@@ -5771,13 +5781,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5771
5781
|
method: "get",
|
|
5772
5782
|
path: "/me/messages/:messageId",
|
|
5773
5783
|
alias: "get-mail-message",
|
|
5774
|
-
description: `
|
|
5775
|
-
that include extended properties matching a filter. Using the query parameter $expand allows you to get the specified resource instance expanded with a specific extended
|
|
5776
|
-
property. Use a $filter and eq operator on the id property to specify the extended property. This is currently the only way to get the singleValueLegacyExtendedProperty object that represents an extended property. To get resource instances that have certain extended properties, use the $filter query parameter and apply an eq operator
|
|
5777
|
-
on the id property. In addition, for numeric extended properties, apply one of the following operators on the value property:
|
|
5778
|
-
eq, ne,ge, gt, le, or lt. For string-typed extended properties, apply a contains, startswith, eq, or ne operator on value. The filter is applied to all instances of the resource in the signed-in user's mailbox. Filtering the string name (Name) in the id of an extended property is case-sensitive. Filtering the value property of an extended
|
|
5779
|
-
property is case-insensitive. The following user resources are supported: As well as the following group resources: See Extended properties overview for more information about when to use
|
|
5780
|
-
open extensions or extended properties, and how to specify extended properties.`,
|
|
5784
|
+
description: `Get the properties and relationships of the eventMessage object. Apply the $expand parameter on the event navigation property to get the associated event in an attendee's calendar. Currently, this operation returns event message bodies in only HTML format.`,
|
|
5781
5785
|
requestFormat: "json",
|
|
5782
5786
|
parameters: [
|
|
5783
5787
|
{
|
|
@@ -6545,7 +6549,7 @@ open extensions or extended properties, and how to specify extended properties.`
|
|
|
6545
6549
|
method: "delete",
|
|
6546
6550
|
path: "/me/todo/lists/:todoTaskListId/tasks/:todoTaskId",
|
|
6547
6551
|
alias: "delete-todo-task",
|
|
6548
|
-
description: `
|
|
6552
|
+
description: `Delete a todoTask object.`,
|
|
6549
6553
|
requestFormat: "json",
|
|
6550
6554
|
parameters: [
|
|
6551
6555
|
{
|
|
@@ -8219,6 +8223,324 @@ To monitor future changes, call the delta API by using the @odata.deltaLink in t
|
|
|
8219
8223
|
schema: microsoft_graph_ODataErrors_ODataError
|
|
8220
8224
|
}
|
|
8221
8225
|
]
|
|
8226
|
+
},
|
|
8227
|
+
{
|
|
8228
|
+
method: "get",
|
|
8229
|
+
path: "/users",
|
|
8230
|
+
alias: "list-users",
|
|
8231
|
+
description: `List properties and relationships of the user objects.`,
|
|
8232
|
+
requestFormat: "json",
|
|
8233
|
+
parameters: [
|
|
8234
|
+
{
|
|
8235
|
+
name: "ConsistencyLevel",
|
|
8236
|
+
type: "Header",
|
|
8237
|
+
schema: z.string().describe(
|
|
8238
|
+
"Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries"
|
|
8239
|
+
).optional()
|
|
8240
|
+
},
|
|
8241
|
+
{
|
|
8242
|
+
name: "$top",
|
|
8243
|
+
type: "Query",
|
|
8244
|
+
schema: z.number().int().gte(0).describe("Show only the first n items").optional()
|
|
8245
|
+
},
|
|
8246
|
+
{
|
|
8247
|
+
name: "$search",
|
|
8248
|
+
type: "Query",
|
|
8249
|
+
schema: z.string().describe("Search items by search phrases").optional()
|
|
8250
|
+
},
|
|
8251
|
+
{
|
|
8252
|
+
name: "$filter",
|
|
8253
|
+
type: "Query",
|
|
8254
|
+
schema: z.string().describe("Filter items by property values").optional()
|
|
8255
|
+
},
|
|
8256
|
+
{
|
|
8257
|
+
name: "$count",
|
|
8258
|
+
type: "Query",
|
|
8259
|
+
schema: z.boolean().describe("Include count of items").optional()
|
|
8260
|
+
},
|
|
8261
|
+
{
|
|
8262
|
+
name: "$orderby",
|
|
8263
|
+
type: "Query",
|
|
8264
|
+
schema: z.array(z.string()).describe("Order items by property values").optional()
|
|
8265
|
+
},
|
|
8266
|
+
{
|
|
8267
|
+
name: "$select",
|
|
8268
|
+
type: "Query",
|
|
8269
|
+
schema: z.array(z.string()).describe("Select properties to be returned").optional()
|
|
8270
|
+
},
|
|
8271
|
+
{
|
|
8272
|
+
name: "$expand",
|
|
8273
|
+
type: "Query",
|
|
8274
|
+
schema: z.array(z.string()).describe("Expand related entities").optional()
|
|
8275
|
+
}
|
|
8276
|
+
],
|
|
8277
|
+
response: z.void(),
|
|
8278
|
+
errors: [
|
|
8279
|
+
{
|
|
8280
|
+
status: NaN,
|
|
8281
|
+
description: `Retrieved collection`,
|
|
8282
|
+
schema: microsoft_graph_userCollectionResponse
|
|
8283
|
+
},
|
|
8284
|
+
{
|
|
8285
|
+
status: NaN,
|
|
8286
|
+
description: `error`,
|
|
8287
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
8288
|
+
},
|
|
8289
|
+
{
|
|
8290
|
+
status: NaN,
|
|
8291
|
+
description: `error`,
|
|
8292
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
8293
|
+
}
|
|
8294
|
+
]
|
|
8295
|
+
},
|
|
8296
|
+
{
|
|
8297
|
+
method: "get",
|
|
8298
|
+
path: "/users/:userId/mailFolders/:mailFolderId/messages",
|
|
8299
|
+
alias: "list-shared-mailbox-folder-messages",
|
|
8300
|
+
description: `The collection of messages in the mailFolder.`,
|
|
8301
|
+
requestFormat: "json",
|
|
8302
|
+
parameters: [
|
|
8303
|
+
{
|
|
8304
|
+
name: "$top",
|
|
8305
|
+
type: "Query",
|
|
8306
|
+
schema: z.number().int().gte(0).describe("Show only the first n items").optional()
|
|
8307
|
+
},
|
|
8308
|
+
{
|
|
8309
|
+
name: "$skip",
|
|
8310
|
+
type: "Query",
|
|
8311
|
+
schema: z.number().int().gte(0).describe("Skip the first n items").optional()
|
|
8312
|
+
},
|
|
8313
|
+
{
|
|
8314
|
+
name: "$search",
|
|
8315
|
+
type: "Query",
|
|
8316
|
+
schema: z.string().describe("Search items by search phrases").optional()
|
|
8317
|
+
},
|
|
8318
|
+
{
|
|
8319
|
+
name: "$filter",
|
|
8320
|
+
type: "Query",
|
|
8321
|
+
schema: z.string().describe("Filter items by property values").optional()
|
|
8322
|
+
},
|
|
8323
|
+
{
|
|
8324
|
+
name: "$count",
|
|
8325
|
+
type: "Query",
|
|
8326
|
+
schema: z.boolean().describe("Include count of items").optional()
|
|
8327
|
+
},
|
|
8328
|
+
{
|
|
8329
|
+
name: "$orderby",
|
|
8330
|
+
type: "Query",
|
|
8331
|
+
schema: z.array(z.string()).describe("Order items by property values").optional()
|
|
8332
|
+
},
|
|
8333
|
+
{
|
|
8334
|
+
name: "$select",
|
|
8335
|
+
type: "Query",
|
|
8336
|
+
schema: z.array(z.string()).describe("Select properties to be returned").optional()
|
|
8337
|
+
},
|
|
8338
|
+
{
|
|
8339
|
+
name: "$expand",
|
|
8340
|
+
type: "Query",
|
|
8341
|
+
schema: z.array(z.string()).describe("Expand related entities").optional()
|
|
8342
|
+
}
|
|
8343
|
+
],
|
|
8344
|
+
response: z.void(),
|
|
8345
|
+
errors: [
|
|
8346
|
+
{
|
|
8347
|
+
status: NaN,
|
|
8348
|
+
description: `Retrieved collection`,
|
|
8349
|
+
schema: microsoft_graph_messageCollectionResponse
|
|
8350
|
+
},
|
|
8351
|
+
{
|
|
8352
|
+
status: NaN,
|
|
8353
|
+
description: `error`,
|
|
8354
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
8355
|
+
},
|
|
8356
|
+
{
|
|
8357
|
+
status: NaN,
|
|
8358
|
+
description: `error`,
|
|
8359
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
8360
|
+
}
|
|
8361
|
+
]
|
|
8362
|
+
},
|
|
8363
|
+
{
|
|
8364
|
+
method: "get",
|
|
8365
|
+
path: "/users/:userId/messages",
|
|
8366
|
+
alias: "list-shared-mailbox-messages",
|
|
8367
|
+
description: `The messages in a mailbox or folder. Read-only. Nullable.`,
|
|
8368
|
+
requestFormat: "json",
|
|
8369
|
+
parameters: [
|
|
8370
|
+
{
|
|
8371
|
+
name: "includeHiddenMessages",
|
|
8372
|
+
type: "Query",
|
|
8373
|
+
schema: z.string().describe("Include Hidden Messages").optional()
|
|
8374
|
+
},
|
|
8375
|
+
{
|
|
8376
|
+
name: "$top",
|
|
8377
|
+
type: "Query",
|
|
8378
|
+
schema: z.number().int().gte(0).describe("Show only the first n items").optional()
|
|
8379
|
+
},
|
|
8380
|
+
{
|
|
8381
|
+
name: "$skip",
|
|
8382
|
+
type: "Query",
|
|
8383
|
+
schema: z.number().int().gte(0).describe("Skip the first n items").optional()
|
|
8384
|
+
},
|
|
8385
|
+
{
|
|
8386
|
+
name: "$search",
|
|
8387
|
+
type: "Query",
|
|
8388
|
+
schema: z.string().describe("Search items by search phrases").optional()
|
|
8389
|
+
},
|
|
8390
|
+
{
|
|
8391
|
+
name: "$filter",
|
|
8392
|
+
type: "Query",
|
|
8393
|
+
schema: z.string().describe("Filter items by property values").optional()
|
|
8394
|
+
},
|
|
8395
|
+
{
|
|
8396
|
+
name: "$count",
|
|
8397
|
+
type: "Query",
|
|
8398
|
+
schema: z.boolean().describe("Include count of items").optional()
|
|
8399
|
+
},
|
|
8400
|
+
{
|
|
8401
|
+
name: "$orderby",
|
|
8402
|
+
type: "Query",
|
|
8403
|
+
schema: z.array(z.string()).describe("Order items by property values").optional()
|
|
8404
|
+
},
|
|
8405
|
+
{
|
|
8406
|
+
name: "$select",
|
|
8407
|
+
type: "Query",
|
|
8408
|
+
schema: z.array(z.string()).describe("Select properties to be returned").optional()
|
|
8409
|
+
},
|
|
8410
|
+
{
|
|
8411
|
+
name: "$expand",
|
|
8412
|
+
type: "Query",
|
|
8413
|
+
schema: z.array(z.string()).describe("Expand related entities").optional()
|
|
8414
|
+
}
|
|
8415
|
+
],
|
|
8416
|
+
response: z.void(),
|
|
8417
|
+
errors: [
|
|
8418
|
+
{
|
|
8419
|
+
status: NaN,
|
|
8420
|
+
description: `Retrieved collection`,
|
|
8421
|
+
schema: microsoft_graph_messageCollectionResponse
|
|
8422
|
+
},
|
|
8423
|
+
{
|
|
8424
|
+
status: NaN,
|
|
8425
|
+
description: `error`,
|
|
8426
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
8427
|
+
},
|
|
8428
|
+
{
|
|
8429
|
+
status: NaN,
|
|
8430
|
+
description: `error`,
|
|
8431
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
8432
|
+
}
|
|
8433
|
+
]
|
|
8434
|
+
},
|
|
8435
|
+
{
|
|
8436
|
+
method: "get",
|
|
8437
|
+
path: "/users/:userId/messages/:messageId",
|
|
8438
|
+
alias: "get-shared-mailbox-message",
|
|
8439
|
+
description: `The messages in a mailbox or folder. Read-only. Nullable.`,
|
|
8440
|
+
requestFormat: "json",
|
|
8441
|
+
parameters: [
|
|
8442
|
+
{
|
|
8443
|
+
name: "includeHiddenMessages",
|
|
8444
|
+
type: "Query",
|
|
8445
|
+
schema: z.string().describe("Include Hidden Messages").optional()
|
|
8446
|
+
},
|
|
8447
|
+
{
|
|
8448
|
+
name: "$select",
|
|
8449
|
+
type: "Query",
|
|
8450
|
+
schema: z.array(z.string()).describe("Select properties to be returned").optional()
|
|
8451
|
+
},
|
|
8452
|
+
{
|
|
8453
|
+
name: "$expand",
|
|
8454
|
+
type: "Query",
|
|
8455
|
+
schema: z.array(z.string()).describe("Expand related entities").optional()
|
|
8456
|
+
}
|
|
8457
|
+
],
|
|
8458
|
+
response: z.void(),
|
|
8459
|
+
errors: [
|
|
8460
|
+
{
|
|
8461
|
+
status: NaN,
|
|
8462
|
+
description: `Retrieved navigation property`,
|
|
8463
|
+
schema: z.object({
|
|
8464
|
+
body: microsoft_graph_itemBody.optional(),
|
|
8465
|
+
subject: z.string().describe("The subject of the message.").nullish(),
|
|
8466
|
+
bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
|
|
8467
|
+
bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
|
|
8468
|
+
ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
|
|
8469
|
+
conversationId: z.string().describe("The ID of the conversation the email belongs to.").nullish(),
|
|
8470
|
+
conversationIndex: z.string().describe("Indicates the position of the message within the conversation.").nullish(),
|
|
8471
|
+
flag: microsoft_graph_followupFlag.optional(),
|
|
8472
|
+
from: microsoft_graph_recipient.optional(),
|
|
8473
|
+
hasAttachments: z.boolean().describe(
|
|
8474
|
+
"Indicates whether the message has attachments. This property doesn't include inline attachments, so if a message contains only inline attachments, this property is false. To verify the existence of inline attachments, parse the body property to look for a src attribute, such as <IMG src='cid:image001.jpg@01D26CD8.6C05F070'>."
|
|
8475
|
+
).nullish(),
|
|
8476
|
+
importance: microsoft_graph_importance.optional(),
|
|
8477
|
+
inferenceClassification: microsoft_graph_inferenceClassificationType.optional(),
|
|
8478
|
+
internetMessageHeaders: z.array(microsoft_graph_internetMessageHeader).describe(
|
|
8479
|
+
"A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message. Returned only on applying a $select query option. Read-only."
|
|
8480
|
+
).optional(),
|
|
8481
|
+
internetMessageId: z.string().describe("The message ID in the format specified by RFC2822.").nullish(),
|
|
8482
|
+
isDeliveryReceiptRequested: z.boolean().describe("Indicates whether a read receipt is requested for the message.").nullish(),
|
|
8483
|
+
isDraft: z.boolean().describe(
|
|
8484
|
+
"Indicates whether the message is a draft. A message is a draft if it hasn't been sent yet."
|
|
8485
|
+
).nullish(),
|
|
8486
|
+
isRead: z.boolean().describe("Indicates whether the message has been read.").nullish(),
|
|
8487
|
+
isReadReceiptRequested: z.boolean().describe("Indicates whether a read receipt is requested for the message.").nullish(),
|
|
8488
|
+
parentFolderId: z.string().describe("The unique identifier for the message's parent mailFolder.").nullish(),
|
|
8489
|
+
receivedDateTime: z.string().regex(
|
|
8490
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
8491
|
+
).datetime({ offset: true }).describe(
|
|
8492
|
+
"The date and time the message was received. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z."
|
|
8493
|
+
).nullish(),
|
|
8494
|
+
replyTo: z.array(microsoft_graph_recipient).describe("The email addresses to use when replying.").optional(),
|
|
8495
|
+
sender: microsoft_graph_recipient.optional(),
|
|
8496
|
+
sentDateTime: z.string().regex(
|
|
8497
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
8498
|
+
).datetime({ offset: true }).describe(
|
|
8499
|
+
"The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z."
|
|
8500
|
+
).nullish(),
|
|
8501
|
+
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional(),
|
|
8502
|
+
uniqueBody: microsoft_graph_itemBody.optional()
|
|
8503
|
+
}).strict().passthrough()
|
|
8504
|
+
},
|
|
8505
|
+
{
|
|
8506
|
+
status: NaN,
|
|
8507
|
+
description: `error`,
|
|
8508
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
8509
|
+
},
|
|
8510
|
+
{
|
|
8511
|
+
status: NaN,
|
|
8512
|
+
description: `error`,
|
|
8513
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
8514
|
+
}
|
|
8515
|
+
]
|
|
8516
|
+
},
|
|
8517
|
+
{
|
|
8518
|
+
method: "post",
|
|
8519
|
+
path: "/users/:userId/sendMail",
|
|
8520
|
+
alias: "send-shared-mailbox-mail",
|
|
8521
|
+
description: `Send the message specified in the request body using either JSON or MIME format. When using JSON format, you can include a file attachment in the same sendMail action call. When using MIME format: This method saves the message in the Sent Items folder. Alternatively, create a draft message to send later. To learn more about the steps involved in the backend before a mail is delivered to recipients, see here.`,
|
|
8522
|
+
requestFormat: "json",
|
|
8523
|
+
parameters: [
|
|
8524
|
+
{
|
|
8525
|
+
name: "body",
|
|
8526
|
+
description: `Action parameters`,
|
|
8527
|
+
type: "Body",
|
|
8528
|
+
schema: send_mail_Body
|
|
8529
|
+
}
|
|
8530
|
+
],
|
|
8531
|
+
response: z.void(),
|
|
8532
|
+
errors: [
|
|
8533
|
+
{
|
|
8534
|
+
status: NaN,
|
|
8535
|
+
description: `error`,
|
|
8536
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
8537
|
+
},
|
|
8538
|
+
{
|
|
8539
|
+
status: NaN,
|
|
8540
|
+
description: `error`,
|
|
8541
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
8542
|
+
}
|
|
8543
|
+
]
|
|
8222
8544
|
}
|
|
8223
8545
|
]);
|
|
8224
8546
|
const api = new Zodios(endpoints);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softeria/ms-365-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.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
|
@@ -29,6 +29,36 @@
|
|
|
29
29
|
"toolName": "send-mail",
|
|
30
30
|
"scopes": ["Mail.Send"]
|
|
31
31
|
},
|
|
32
|
+
{
|
|
33
|
+
"pathPattern": "/users/{user-id}/messages",
|
|
34
|
+
"method": "get",
|
|
35
|
+
"toolName": "list-shared-mailbox-messages",
|
|
36
|
+
"workScopes": ["Mail.Read.Shared"]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"pathPattern": "/users/{user-id}/mailFolders/{mailFolder-id}/messages",
|
|
40
|
+
"method": "get",
|
|
41
|
+
"toolName": "list-shared-mailbox-folder-messages",
|
|
42
|
+
"workScopes": ["Mail.Read.Shared"]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"pathPattern": "/users/{user-id}/messages/{message-id}",
|
|
46
|
+
"method": "get",
|
|
47
|
+
"toolName": "get-shared-mailbox-message",
|
|
48
|
+
"workScopes": ["Mail.Read.Shared"]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"pathPattern": "/users/{user-id}/sendMail",
|
|
52
|
+
"method": "post",
|
|
53
|
+
"toolName": "send-shared-mailbox-mail",
|
|
54
|
+
"workScopes": ["Mail.Send.Shared"]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"pathPattern": "/users",
|
|
58
|
+
"method": "get",
|
|
59
|
+
"toolName": "list-users",
|
|
60
|
+
"workScopes": ["User.Read.All"]
|
|
61
|
+
},
|
|
32
62
|
{
|
|
33
63
|
"pathPattern": "/me/messages",
|
|
34
64
|
"method": "post",
|