@softeria/ms-365-mcp-server 0.18.0 → 0.19.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/README.md +32 -0
- package/bin/modules/simplified-openapi.mjs +1 -0
- package/dist/auth-tools.js +4 -1
- package/dist/endpoints.json +24 -0
- package/dist/generated/client.js +221 -36
- package/package.json +1 -2
- package/src/endpoints.json +24 -0
package/README.md
CHANGED
|
@@ -148,6 +148,30 @@ claude mcp add ms365 -- npx -y @softeria/ms-365-mcp-server
|
|
|
148
148
|
For other interfaces that support MCPs, please refer to their respective documentation for the correct
|
|
149
149
|
integration method.
|
|
150
150
|
|
|
151
|
+
### Local Development
|
|
152
|
+
|
|
153
|
+
For local development or testing:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# From the project directory
|
|
157
|
+
claude mcp add ms -- npx tsx src/index.ts --org-mode
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Or configure Claude Desktop manually:
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"mcpServers": {
|
|
165
|
+
"ms365": {
|
|
166
|
+
"command": "node",
|
|
167
|
+
"args": ["/absolute/path/to/ms-365-mcp-server/dist/index.js", "--org-mode"]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
> **Note**: Run `npm run build` after code changes to update the `dist/` folder.
|
|
174
|
+
|
|
151
175
|
### Authentication
|
|
152
176
|
|
|
153
177
|
> ⚠️ You must authenticate before using tools.
|
|
@@ -289,6 +313,14 @@ Run the verification script to check all code quality requirements:
|
|
|
289
313
|
npm run verify
|
|
290
314
|
```
|
|
291
315
|
|
|
316
|
+
### For Developers
|
|
317
|
+
|
|
318
|
+
After cloning the repository, you may need to generate the client code from the Microsoft Graph OpenAPI specification:
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
npm run generate
|
|
322
|
+
```
|
|
323
|
+
|
|
292
324
|
## Support
|
|
293
325
|
|
|
294
326
|
If you're having problems or need help:
|
package/dist/auth-tools.js
CHANGED
package/dist/endpoints.json
CHANGED
|
@@ -77,6 +77,30 @@
|
|
|
77
77
|
"toolName": "move-mail-message",
|
|
78
78
|
"scopes": ["Mail.ReadWrite"]
|
|
79
79
|
},
|
|
80
|
+
{
|
|
81
|
+
"pathPattern": "/me/messages/{message-id}/attachments",
|
|
82
|
+
"method": "post",
|
|
83
|
+
"toolName": "add-mail-attachment",
|
|
84
|
+
"scopes": ["Mail.ReadWrite"]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"pathPattern": "/me/messages/{message-id}/attachments",
|
|
88
|
+
"method": "get",
|
|
89
|
+
"toolName": "list-mail-attachments",
|
|
90
|
+
"scopes": ["Mail.Read"]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"pathPattern": "/me/messages/{message-id}/attachments/{attachment-id}",
|
|
94
|
+
"method": "get",
|
|
95
|
+
"toolName": "get-mail-attachment",
|
|
96
|
+
"scopes": ["Mail.Read"]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"pathPattern": "/me/messages/{message-id}/attachments/{attachment-id}",
|
|
100
|
+
"method": "delete",
|
|
101
|
+
"toolName": "delete-mail-attachment",
|
|
102
|
+
"scopes": ["Mail.ReadWrite"]
|
|
103
|
+
},
|
|
80
104
|
{
|
|
81
105
|
"pathPattern": "/me/events",
|
|
82
106
|
"method": "get",
|
package/dist/generated/client.js
CHANGED
|
@@ -1161,6 +1161,18 @@ const microsoft_graph_eventType = z.enum([
|
|
|
1161
1161
|
"exception",
|
|
1162
1162
|
"seriesMaster"
|
|
1163
1163
|
]);
|
|
1164
|
+
const microsoft_graph_attachment = z.object({
|
|
1165
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
1166
|
+
contentType: z.string().describe("The MIME type.").nullish(),
|
|
1167
|
+
isInline: z.boolean().describe("true if the attachment is an inline attachment; otherwise, false.").optional(),
|
|
1168
|
+
lastModifiedDateTime: z.string().regex(
|
|
1169
|
+
/^[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])$/
|
|
1170
|
+
).datetime({ offset: true }).describe(
|
|
1171
|
+
"The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z"
|
|
1172
|
+
).nullish(),
|
|
1173
|
+
name: z.string().describe("The attachment's file name.").nullish(),
|
|
1174
|
+
size: z.number().gte(-2147483648).lte(2147483647).describe("The length of the attachment in bytes.").optional()
|
|
1175
|
+
}).strict();
|
|
1164
1176
|
const microsoft_graph_dateTimeTimeZone = z.object({
|
|
1165
1177
|
dateTime: z.string().describe(
|
|
1166
1178
|
"A single point of time in a combined date and time representation ({date}T{time}; for example, 2017-08-29T04:00:00.0000000)."
|
|
@@ -1274,6 +1286,9 @@ const microsoft_graph_event = z.object({
|
|
|
1274
1286
|
type: microsoft_graph_eventType.optional(),
|
|
1275
1287
|
body: microsoft_graph_itemBody.optional(),
|
|
1276
1288
|
subject: z.string().describe("The text of the event's subject line.").nullish(),
|
|
1289
|
+
attachments: z.array(microsoft_graph_attachment).describe(
|
|
1290
|
+
"The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
|
|
1291
|
+
).optional(),
|
|
1277
1292
|
allowNewTimeProposals: z.boolean().describe(
|
|
1278
1293
|
"true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
|
|
1279
1294
|
).nullish(),
|
|
@@ -1314,10 +1329,7 @@ const microsoft_graph_event = z.object({
|
|
|
1314
1329
|
onlineMeetingUrl: z.string().describe(
|
|
1315
1330
|
"A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future."
|
|
1316
1331
|
).nullish(),
|
|
1317
|
-
organizer: microsoft_graph_recipient.optional()
|
|
1318
|
-
originalEndTimeZone: z.string().describe(
|
|
1319
|
-
"The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook."
|
|
1320
|
-
).nullish()
|
|
1332
|
+
organizer: microsoft_graph_recipient.optional()
|
|
1321
1333
|
}).strict().passthrough();
|
|
1322
1334
|
const microsoft_graph_multiValueLegacyExtendedProperty = z.object({
|
|
1323
1335
|
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
@@ -2291,6 +2303,7 @@ const microsoft_graph_internetMessageHeader = z.object({
|
|
|
2291
2303
|
const microsoft_graph_message = z.object({
|
|
2292
2304
|
body: microsoft_graph_itemBody.optional(),
|
|
2293
2305
|
subject: z.string().describe("The subject of the message.").nullish(),
|
|
2306
|
+
attachments: z.array(microsoft_graph_attachment).describe("The fileAttachment and itemAttachment attachments for the message.").optional(),
|
|
2294
2307
|
bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
|
|
2295
2308
|
bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
|
|
2296
2309
|
ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
|
|
@@ -2326,8 +2339,7 @@ const microsoft_graph_message = z.object({
|
|
|
2326
2339
|
).datetime({ offset: true }).describe(
|
|
2327
2340
|
"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."
|
|
2328
2341
|
).nullish(),
|
|
2329
|
-
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
|
|
2330
|
-
uniqueBody: microsoft_graph_itemBody.optional()
|
|
2342
|
+
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
|
|
2331
2343
|
}).strict().passthrough();
|
|
2332
2344
|
const microsoft_graph_mailFolder = z.lazy(
|
|
2333
2345
|
() => z.object({
|
|
@@ -2361,6 +2373,11 @@ const microsoft_graph_messageCollectionResponse = z.object({
|
|
|
2361
2373
|
"@odata.nextLink": z.string().nullable(),
|
|
2362
2374
|
value: z.array(microsoft_graph_message)
|
|
2363
2375
|
}).partial().strict();
|
|
2376
|
+
const microsoft_graph_attachmentCollectionResponse = z.object({
|
|
2377
|
+
"@odata.count": z.number().int().nullable(),
|
|
2378
|
+
"@odata.nextLink": z.string().nullable(),
|
|
2379
|
+
value: z.array(microsoft_graph_attachment)
|
|
2380
|
+
}).partial().strict();
|
|
2364
2381
|
const send_mail_Body = z.object({
|
|
2365
2382
|
Message: microsoft_graph_message.describe(
|
|
2366
2383
|
"[Note: Simplified from 30 properties to 25 most common ones]"
|
|
@@ -3236,6 +3253,7 @@ const schemas = {
|
|
|
3236
3253
|
microsoft_graph_calendarRoleType,
|
|
3237
3254
|
microsoft_graph_calendarPermission,
|
|
3238
3255
|
microsoft_graph_eventType,
|
|
3256
|
+
microsoft_graph_attachment,
|
|
3239
3257
|
microsoft_graph_dateTimeTimeZone,
|
|
3240
3258
|
microsoft_graph_timeSlot,
|
|
3241
3259
|
microsoft_graph_responseType,
|
|
@@ -3339,6 +3357,7 @@ const schemas = {
|
|
|
3339
3357
|
microsoft_graph_mailFolder,
|
|
3340
3358
|
microsoft_graph_mailFolderCollectionResponse,
|
|
3341
3359
|
microsoft_graph_messageCollectionResponse,
|
|
3360
|
+
microsoft_graph_attachmentCollectionResponse,
|
|
3342
3361
|
send_mail_Body,
|
|
3343
3362
|
microsoft_graph_externalLink,
|
|
3344
3363
|
microsoft_graph_notebookLinks,
|
|
@@ -5017,6 +5036,9 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5017
5036
|
type: microsoft_graph_eventType.optional(),
|
|
5018
5037
|
body: microsoft_graph_itemBody.optional(),
|
|
5019
5038
|
subject: z.string().describe("The text of the event's subject line.").nullish(),
|
|
5039
|
+
attachments: z.array(microsoft_graph_attachment).describe(
|
|
5040
|
+
"The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
|
|
5041
|
+
).optional(),
|
|
5020
5042
|
allowNewTimeProposals: z.boolean().describe(
|
|
5021
5043
|
"true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
|
|
5022
5044
|
).nullish(),
|
|
@@ -5059,10 +5081,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5059
5081
|
onlineMeetingUrl: z.string().describe(
|
|
5060
5082
|
"A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future."
|
|
5061
5083
|
).nullish(),
|
|
5062
|
-
organizer: microsoft_graph_recipient.optional()
|
|
5063
|
-
originalEndTimeZone: z.string().describe(
|
|
5064
|
-
"The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook."
|
|
5065
|
-
).nullish()
|
|
5084
|
+
organizer: microsoft_graph_recipient.optional()
|
|
5066
5085
|
}).strict().passthrough()
|
|
5067
5086
|
}
|
|
5068
5087
|
],
|
|
@@ -5075,6 +5094,9 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5075
5094
|
type: microsoft_graph_eventType.optional(),
|
|
5076
5095
|
body: microsoft_graph_itemBody.optional(),
|
|
5077
5096
|
subject: z.string().describe("The text of the event's subject line.").nullish(),
|
|
5097
|
+
attachments: z.array(microsoft_graph_attachment).describe(
|
|
5098
|
+
"The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
|
|
5099
|
+
).optional(),
|
|
5078
5100
|
allowNewTimeProposals: z.boolean().describe(
|
|
5079
5101
|
"true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
|
|
5080
5102
|
).nullish(),
|
|
@@ -5117,10 +5139,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5117
5139
|
onlineMeetingUrl: z.string().describe(
|
|
5118
5140
|
"A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future."
|
|
5119
5141
|
).nullish(),
|
|
5120
|
-
organizer: microsoft_graph_recipient.optional()
|
|
5121
|
-
originalEndTimeZone: z.string().describe(
|
|
5122
|
-
"The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook."
|
|
5123
|
-
).nullish()
|
|
5142
|
+
organizer: microsoft_graph_recipient.optional()
|
|
5124
5143
|
}).strict().passthrough()
|
|
5125
5144
|
},
|
|
5126
5145
|
{
|
|
@@ -5162,6 +5181,9 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5162
5181
|
type: microsoft_graph_eventType.optional(),
|
|
5163
5182
|
body: microsoft_graph_itemBody.optional(),
|
|
5164
5183
|
subject: z.string().describe("The text of the event's subject line.").nullish(),
|
|
5184
|
+
attachments: z.array(microsoft_graph_attachment).describe(
|
|
5185
|
+
"The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
|
|
5186
|
+
).optional(),
|
|
5165
5187
|
allowNewTimeProposals: z.boolean().describe(
|
|
5166
5188
|
"true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
|
|
5167
5189
|
).nullish(),
|
|
@@ -5204,10 +5226,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5204
5226
|
onlineMeetingUrl: z.string().describe(
|
|
5205
5227
|
"A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future."
|
|
5206
5228
|
).nullish(),
|
|
5207
|
-
organizer: microsoft_graph_recipient.optional()
|
|
5208
|
-
originalEndTimeZone: z.string().describe(
|
|
5209
|
-
"The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook."
|
|
5210
|
-
).nullish()
|
|
5229
|
+
organizer: microsoft_graph_recipient.optional()
|
|
5211
5230
|
}).strict().passthrough()
|
|
5212
5231
|
},
|
|
5213
5232
|
{
|
|
@@ -5237,6 +5256,9 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5237
5256
|
type: microsoft_graph_eventType.optional(),
|
|
5238
5257
|
body: microsoft_graph_itemBody.optional(),
|
|
5239
5258
|
subject: z.string().describe("The text of the event's subject line.").nullish(),
|
|
5259
|
+
attachments: z.array(microsoft_graph_attachment).describe(
|
|
5260
|
+
"The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
|
|
5261
|
+
).optional(),
|
|
5240
5262
|
allowNewTimeProposals: z.boolean().describe(
|
|
5241
5263
|
"true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
|
|
5242
5264
|
).nullish(),
|
|
@@ -5279,10 +5301,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5279
5301
|
onlineMeetingUrl: z.string().describe(
|
|
5280
5302
|
"A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future."
|
|
5281
5303
|
).nullish(),
|
|
5282
|
-
organizer: microsoft_graph_recipient.optional()
|
|
5283
|
-
originalEndTimeZone: z.string().describe(
|
|
5284
|
-
"The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook."
|
|
5285
|
-
).nullish()
|
|
5304
|
+
organizer: microsoft_graph_recipient.optional()
|
|
5286
5305
|
}).strict().passthrough()
|
|
5287
5306
|
}
|
|
5288
5307
|
],
|
|
@@ -5295,6 +5314,9 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5295
5314
|
type: microsoft_graph_eventType.optional(),
|
|
5296
5315
|
body: microsoft_graph_itemBody.optional(),
|
|
5297
5316
|
subject: z.string().describe("The text of the event's subject line.").nullish(),
|
|
5317
|
+
attachments: z.array(microsoft_graph_attachment).describe(
|
|
5318
|
+
"The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
|
|
5319
|
+
).optional(),
|
|
5298
5320
|
allowNewTimeProposals: z.boolean().describe(
|
|
5299
5321
|
"true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
|
|
5300
5322
|
).nullish(),
|
|
@@ -5337,10 +5359,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5337
5359
|
onlineMeetingUrl: z.string().describe(
|
|
5338
5360
|
"A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future."
|
|
5339
5361
|
).nullish(),
|
|
5340
|
-
organizer: microsoft_graph_recipient.optional()
|
|
5341
|
-
originalEndTimeZone: z.string().describe(
|
|
5342
|
-
"The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook."
|
|
5343
|
-
).nullish()
|
|
5362
|
+
organizer: microsoft_graph_recipient.optional()
|
|
5344
5363
|
}).strict().passthrough()
|
|
5345
5364
|
},
|
|
5346
5365
|
{
|
|
@@ -5678,6 +5697,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5678
5697
|
schema: z.object({
|
|
5679
5698
|
body: microsoft_graph_itemBody.optional(),
|
|
5680
5699
|
subject: z.string().describe("The subject of the message.").nullish(),
|
|
5700
|
+
attachments: z.array(microsoft_graph_attachment).describe("The fileAttachment and itemAttachment attachments for the message.").optional(),
|
|
5681
5701
|
bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
|
|
5682
5702
|
bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
|
|
5683
5703
|
ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
|
|
@@ -5713,8 +5733,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5713
5733
|
).datetime({ offset: true }).describe(
|
|
5714
5734
|
"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."
|
|
5715
5735
|
).nullish(),
|
|
5716
|
-
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
|
|
5717
|
-
uniqueBody: microsoft_graph_itemBody.optional()
|
|
5736
|
+
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
|
|
5718
5737
|
}).strict().passthrough()
|
|
5719
5738
|
}
|
|
5720
5739
|
],
|
|
@@ -5726,6 +5745,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5726
5745
|
schema: z.object({
|
|
5727
5746
|
body: microsoft_graph_itemBody.optional(),
|
|
5728
5747
|
subject: z.string().describe("The subject of the message.").nullish(),
|
|
5748
|
+
attachments: z.array(microsoft_graph_attachment).describe("The fileAttachment and itemAttachment attachments for the message.").optional(),
|
|
5729
5749
|
bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
|
|
5730
5750
|
bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
|
|
5731
5751
|
ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
|
|
@@ -5761,8 +5781,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5761
5781
|
).datetime({ offset: true }).describe(
|
|
5762
5782
|
"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."
|
|
5763
5783
|
).nullish(),
|
|
5764
|
-
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
|
|
5765
|
-
uniqueBody: microsoft_graph_itemBody.optional()
|
|
5784
|
+
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
|
|
5766
5785
|
}).strict().passthrough()
|
|
5767
5786
|
},
|
|
5768
5787
|
{
|
|
@@ -5803,6 +5822,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5803
5822
|
schema: z.object({
|
|
5804
5823
|
body: microsoft_graph_itemBody.optional(),
|
|
5805
5824
|
subject: z.string().describe("The subject of the message.").nullish(),
|
|
5825
|
+
attachments: z.array(microsoft_graph_attachment).describe("The fileAttachment and itemAttachment attachments for the message.").optional(),
|
|
5806
5826
|
bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
|
|
5807
5827
|
bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
|
|
5808
5828
|
ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
|
|
@@ -5838,8 +5858,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5838
5858
|
).datetime({ offset: true }).describe(
|
|
5839
5859
|
"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."
|
|
5840
5860
|
).nullish(),
|
|
5841
|
-
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
|
|
5842
|
-
uniqueBody: microsoft_graph_itemBody.optional()
|
|
5861
|
+
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
|
|
5843
5862
|
}).strict().passthrough()
|
|
5844
5863
|
},
|
|
5845
5864
|
{
|
|
@@ -5881,6 +5900,172 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5881
5900
|
}
|
|
5882
5901
|
]
|
|
5883
5902
|
},
|
|
5903
|
+
{
|
|
5904
|
+
method: "get",
|
|
5905
|
+
path: "/me/messages/:messageId/attachments",
|
|
5906
|
+
alias: "list-mail-attachments",
|
|
5907
|
+
description: `Retrieve a list of attachment objects attached to a message.`,
|
|
5908
|
+
requestFormat: "json",
|
|
5909
|
+
parameters: [
|
|
5910
|
+
{
|
|
5911
|
+
name: "$top",
|
|
5912
|
+
type: "Query",
|
|
5913
|
+
schema: z.number().int().gte(0).describe("Show only the first n items").optional()
|
|
5914
|
+
},
|
|
5915
|
+
{
|
|
5916
|
+
name: "$skip",
|
|
5917
|
+
type: "Query",
|
|
5918
|
+
schema: z.number().int().gte(0).describe("Skip the first n items").optional()
|
|
5919
|
+
},
|
|
5920
|
+
{
|
|
5921
|
+
name: "$search",
|
|
5922
|
+
type: "Query",
|
|
5923
|
+
schema: z.string().describe("Search items by search phrases").optional()
|
|
5924
|
+
},
|
|
5925
|
+
{
|
|
5926
|
+
name: "$filter",
|
|
5927
|
+
type: "Query",
|
|
5928
|
+
schema: z.string().describe("Filter items by property values").optional()
|
|
5929
|
+
},
|
|
5930
|
+
{
|
|
5931
|
+
name: "$count",
|
|
5932
|
+
type: "Query",
|
|
5933
|
+
schema: z.boolean().describe("Include count of items").optional()
|
|
5934
|
+
},
|
|
5935
|
+
{
|
|
5936
|
+
name: "$orderby",
|
|
5937
|
+
type: "Query",
|
|
5938
|
+
schema: z.array(z.string()).describe("Order items by property values").optional()
|
|
5939
|
+
},
|
|
5940
|
+
{
|
|
5941
|
+
name: "$select",
|
|
5942
|
+
type: "Query",
|
|
5943
|
+
schema: z.array(z.string()).describe("Select properties to be returned").optional()
|
|
5944
|
+
},
|
|
5945
|
+
{
|
|
5946
|
+
name: "$expand",
|
|
5947
|
+
type: "Query",
|
|
5948
|
+
schema: z.array(z.string()).describe("Expand related entities").optional()
|
|
5949
|
+
}
|
|
5950
|
+
],
|
|
5951
|
+
response: z.void(),
|
|
5952
|
+
errors: [
|
|
5953
|
+
{
|
|
5954
|
+
status: NaN,
|
|
5955
|
+
description: `Retrieved collection`,
|
|
5956
|
+
schema: microsoft_graph_attachmentCollectionResponse
|
|
5957
|
+
},
|
|
5958
|
+
{
|
|
5959
|
+
status: NaN,
|
|
5960
|
+
description: `error`,
|
|
5961
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
5962
|
+
},
|
|
5963
|
+
{
|
|
5964
|
+
status: NaN,
|
|
5965
|
+
description: `error`,
|
|
5966
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
5967
|
+
}
|
|
5968
|
+
]
|
|
5969
|
+
},
|
|
5970
|
+
{
|
|
5971
|
+
method: "post",
|
|
5972
|
+
path: "/me/messages/:messageId/attachments",
|
|
5973
|
+
alias: "add-mail-attachment",
|
|
5974
|
+
description: `Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachment
|
|
5975
|
+
resource. You can add an attachment to an existing message by posting to its attachments collection, or you can
|
|
5976
|
+
add an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB.`,
|
|
5977
|
+
requestFormat: "json",
|
|
5978
|
+
parameters: [
|
|
5979
|
+
{
|
|
5980
|
+
name: "body",
|
|
5981
|
+
description: `New navigation property`,
|
|
5982
|
+
type: "Body",
|
|
5983
|
+
schema: microsoft_graph_attachment
|
|
5984
|
+
}
|
|
5985
|
+
],
|
|
5986
|
+
response: z.void(),
|
|
5987
|
+
errors: [
|
|
5988
|
+
{
|
|
5989
|
+
status: NaN,
|
|
5990
|
+
description: `Created navigation property.`,
|
|
5991
|
+
schema: microsoft_graph_attachment
|
|
5992
|
+
},
|
|
5993
|
+
{
|
|
5994
|
+
status: NaN,
|
|
5995
|
+
description: `error`,
|
|
5996
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
5997
|
+
},
|
|
5998
|
+
{
|
|
5999
|
+
status: NaN,
|
|
6000
|
+
description: `error`,
|
|
6001
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
6002
|
+
}
|
|
6003
|
+
]
|
|
6004
|
+
},
|
|
6005
|
+
{
|
|
6006
|
+
method: "get",
|
|
6007
|
+
path: "/me/messages/:messageId/attachments/:attachmentId",
|
|
6008
|
+
alias: "get-mail-attachment",
|
|
6009
|
+
description: `Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource.`,
|
|
6010
|
+
requestFormat: "json",
|
|
6011
|
+
parameters: [
|
|
6012
|
+
{
|
|
6013
|
+
name: "$select",
|
|
6014
|
+
type: "Query",
|
|
6015
|
+
schema: z.array(z.string()).describe("Select properties to be returned").optional()
|
|
6016
|
+
},
|
|
6017
|
+
{
|
|
6018
|
+
name: "$expand",
|
|
6019
|
+
type: "Query",
|
|
6020
|
+
schema: z.array(z.string()).describe("Expand related entities").optional()
|
|
6021
|
+
}
|
|
6022
|
+
],
|
|
6023
|
+
response: z.void(),
|
|
6024
|
+
errors: [
|
|
6025
|
+
{
|
|
6026
|
+
status: NaN,
|
|
6027
|
+
description: `Retrieved navigation property`,
|
|
6028
|
+
schema: microsoft_graph_attachment
|
|
6029
|
+
},
|
|
6030
|
+
{
|
|
6031
|
+
status: NaN,
|
|
6032
|
+
description: `error`,
|
|
6033
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
6034
|
+
},
|
|
6035
|
+
{
|
|
6036
|
+
status: NaN,
|
|
6037
|
+
description: `error`,
|
|
6038
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
6039
|
+
}
|
|
6040
|
+
]
|
|
6041
|
+
},
|
|
6042
|
+
{
|
|
6043
|
+
method: "delete",
|
|
6044
|
+
path: "/me/messages/:messageId/attachments/:attachmentId",
|
|
6045
|
+
alias: "delete-mail-attachment",
|
|
6046
|
+
description: `Delete navigation property attachments for me`,
|
|
6047
|
+
requestFormat: "json",
|
|
6048
|
+
parameters: [
|
|
6049
|
+
{
|
|
6050
|
+
name: "If-Match",
|
|
6051
|
+
type: "Header",
|
|
6052
|
+
schema: z.string().describe("ETag").optional()
|
|
6053
|
+
}
|
|
6054
|
+
],
|
|
6055
|
+
response: z.void(),
|
|
6056
|
+
errors: [
|
|
6057
|
+
{
|
|
6058
|
+
status: NaN,
|
|
6059
|
+
description: `error`,
|
|
6060
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
6061
|
+
},
|
|
6062
|
+
{
|
|
6063
|
+
status: NaN,
|
|
6064
|
+
description: `error`,
|
|
6065
|
+
schema: microsoft_graph_ODataErrors_ODataError
|
|
6066
|
+
}
|
|
6067
|
+
]
|
|
6068
|
+
},
|
|
5884
6069
|
{
|
|
5885
6070
|
method: "post",
|
|
5886
6071
|
path: "/me/messages/:messageId/move",
|
|
@@ -5903,6 +6088,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5903
6088
|
schema: z.object({
|
|
5904
6089
|
body: microsoft_graph_itemBody.optional(),
|
|
5905
6090
|
subject: z.string().describe("The subject of the message.").nullish(),
|
|
6091
|
+
attachments: z.array(microsoft_graph_attachment).describe("The fileAttachment and itemAttachment attachments for the message.").optional(),
|
|
5906
6092
|
bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
|
|
5907
6093
|
bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
|
|
5908
6094
|
ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
|
|
@@ -5938,8 +6124,7 @@ or their delegates can book a private meeting room. If you're organizing an
|
|
|
5938
6124
|
).datetime({ offset: true }).describe(
|
|
5939
6125
|
"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."
|
|
5940
6126
|
).nullish(),
|
|
5941
|
-
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
|
|
5942
|
-
uniqueBody: microsoft_graph_itemBody.optional()
|
|
6127
|
+
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
|
|
5943
6128
|
}).strict().passthrough()
|
|
5944
6129
|
},
|
|
5945
6130
|
{
|
|
@@ -8463,6 +8648,7 @@ To monitor future changes, call the delta API by using the @odata.deltaLink in t
|
|
|
8463
8648
|
schema: z.object({
|
|
8464
8649
|
body: microsoft_graph_itemBody.optional(),
|
|
8465
8650
|
subject: z.string().describe("The subject of the message.").nullish(),
|
|
8651
|
+
attachments: z.array(microsoft_graph_attachment).describe("The fileAttachment and itemAttachment attachments for the message.").optional(),
|
|
8466
8652
|
bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
|
|
8467
8653
|
bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
|
|
8468
8654
|
ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
|
|
@@ -8498,8 +8684,7 @@ To monitor future changes, call the delta API by using the @odata.deltaLink in t
|
|
|
8498
8684
|
).datetime({ offset: true }).describe(
|
|
8499
8685
|
"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
8686
|
).nullish(),
|
|
8501
|
-
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
|
|
8502
|
-
uniqueBody: microsoft_graph_itemBody.optional()
|
|
8687
|
+
toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
|
|
8503
8688
|
}).strict().passthrough()
|
|
8504
8689
|
},
|
|
8505
8690
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softeria/ms-365-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.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",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"generate": "node bin/generate-graph-client.mjs",
|
|
12
|
-
"postinstall": "npm run generate",
|
|
13
12
|
"build": "tsup",
|
|
14
13
|
"test": "vitest run",
|
|
15
14
|
"test:watch": "vitest",
|
package/src/endpoints.json
CHANGED
|
@@ -77,6 +77,30 @@
|
|
|
77
77
|
"toolName": "move-mail-message",
|
|
78
78
|
"scopes": ["Mail.ReadWrite"]
|
|
79
79
|
},
|
|
80
|
+
{
|
|
81
|
+
"pathPattern": "/me/messages/{message-id}/attachments",
|
|
82
|
+
"method": "post",
|
|
83
|
+
"toolName": "add-mail-attachment",
|
|
84
|
+
"scopes": ["Mail.ReadWrite"]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"pathPattern": "/me/messages/{message-id}/attachments",
|
|
88
|
+
"method": "get",
|
|
89
|
+
"toolName": "list-mail-attachments",
|
|
90
|
+
"scopes": ["Mail.Read"]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"pathPattern": "/me/messages/{message-id}/attachments/{attachment-id}",
|
|
94
|
+
"method": "get",
|
|
95
|
+
"toolName": "get-mail-attachment",
|
|
96
|
+
"scopes": ["Mail.Read"]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"pathPattern": "/me/messages/{message-id}/attachments/{attachment-id}",
|
|
100
|
+
"method": "delete",
|
|
101
|
+
"toolName": "delete-mail-attachment",
|
|
102
|
+
"scopes": ["Mail.ReadWrite"]
|
|
103
|
+
},
|
|
80
104
|
{
|
|
81
105
|
"pathPattern": "/me/events",
|
|
82
106
|
"method": "get",
|