@softeria/ms-365-mcp-server 0.15.0 → 0.16.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/dist/generated/client.js +22 -43
- package/dist/server.js +66 -27
- package/package.json +1 -1
package/dist/generated/client.js
CHANGED
|
@@ -870,39 +870,17 @@ const microsoft_graph_workbookPivotTable = z.lazy(
|
|
|
870
870
|
}).strict()
|
|
871
871
|
);
|
|
872
872
|
const microsoft_graph_workbookWorksheetProtectionOptions = z.object({
|
|
873
|
-
allowAutoFilter: z.boolean().describe(
|
|
874
|
-
|
|
875
|
-
).optional(),
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
).optional(),
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
).optional(),
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
).optional(),
|
|
885
|
-
allowFormatColumns: z.boolean().describe(
|
|
886
|
-
"Indicates whether the worksheet protection option to allow formatting columns is enabled."
|
|
887
|
-
).optional(),
|
|
888
|
-
allowFormatRows: z.boolean().describe(
|
|
889
|
-
"Indicates whether the worksheet protection option to allow formatting rows is enabled."
|
|
890
|
-
).optional(),
|
|
891
|
-
allowInsertColumns: z.boolean().describe(
|
|
892
|
-
"Indicates whether the worksheet protection option to allow inserting columns is enabled."
|
|
893
|
-
).optional(),
|
|
894
|
-
allowInsertHyperlinks: z.boolean().describe(
|
|
895
|
-
"Indicates whether the worksheet protection option to allow inserting hyperlinks is enabled."
|
|
896
|
-
).optional(),
|
|
897
|
-
allowInsertRows: z.boolean().describe(
|
|
898
|
-
"Indicates whether the worksheet protection option to allow inserting rows is enabled."
|
|
899
|
-
).optional(),
|
|
900
|
-
allowPivotTables: z.boolean().describe(
|
|
901
|
-
"Indicates whether the worksheet protection option to allow the use of the pivot table feature is enabled."
|
|
902
|
-
).optional(),
|
|
903
|
-
allowSort: z.boolean().describe(
|
|
904
|
-
"Indicates whether the worksheet protection option to allow the use of the sort feature is enabled."
|
|
905
|
-
).optional()
|
|
873
|
+
allowAutoFilter: z.boolean().describe("Represents the worksheet protection option of allowing using auto filter feature.").optional(),
|
|
874
|
+
allowDeleteColumns: z.boolean().describe("Represents the worksheet protection option of allowing deleting columns.").optional(),
|
|
875
|
+
allowDeleteRows: z.boolean().describe("Represents the worksheet protection option of allowing deleting rows.").optional(),
|
|
876
|
+
allowFormatCells: z.boolean().describe("Represents the worksheet protection option of allowing formatting cells.").optional(),
|
|
877
|
+
allowFormatColumns: z.boolean().describe("Represents the worksheet protection option of allowing formatting columns.").optional(),
|
|
878
|
+
allowFormatRows: z.boolean().describe("Represents the worksheet protection option of allowing formatting rows.").optional(),
|
|
879
|
+
allowInsertColumns: z.boolean().describe("Represents the worksheet protection option of allowing inserting columns.").optional(),
|
|
880
|
+
allowInsertHyperlinks: z.boolean().describe("Represents the worksheet protection option of allowing inserting hyperlinks.").optional(),
|
|
881
|
+
allowInsertRows: z.boolean().describe("Represents the worksheet protection option of allowing inserting rows.").optional(),
|
|
882
|
+
allowPivotTables: z.boolean().describe("Represents the worksheet protection option of allowing using pivot table feature.").optional(),
|
|
883
|
+
allowSort: z.boolean().describe("Represents the worksheet protection option of allowing using sort feature.").optional()
|
|
906
884
|
}).strict();
|
|
907
885
|
const microsoft_graph_workbookWorksheetProtection = z.object({
|
|
908
886
|
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
@@ -3331,7 +3309,7 @@ const endpoints = makeApi([
|
|
|
3331
3309
|
method: "post",
|
|
3332
3310
|
path: "/chats/:chatId/messages",
|
|
3333
3311
|
alias: "send-chat-message",
|
|
3334
|
-
description: `Send a new chatMessage in the specified
|
|
3312
|
+
description: `Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.`,
|
|
3335
3313
|
requestFormat: "json",
|
|
3336
3314
|
parameters: [
|
|
3337
3315
|
{
|
|
@@ -4793,8 +4771,13 @@ get the instances of an event. Currently, this operation returns event bodies in
|
|
|
4793
4771
|
method: "post",
|
|
4794
4772
|
path: "/me/events",
|
|
4795
4773
|
alias: "create-calendar-event",
|
|
4796
|
-
description: `Create
|
|
4797
|
-
|
|
4774
|
+
description: `Create an event in the user's default calendar or specified calendar. By default, the allowNewTimeProposals property is set to true when an event is created, which means invitees can propose a different date/time for the event. See Propose new meeting times for more information on how to propose a time, and how to receive and accept a new time proposal. You can specify the time zone for each of the start and end times of the event as part of their values, because the
|
|
4775
|
+
start and end properties are of dateTimeTimeZone type. First find the supported time zones to make sure you set only time zones that have been configured for the user's mailbox server. When an event is sent, the server sends invitations to all the attendees. Setting the location in an event An Exchange administrator can set up a mailbox and an email address for a resource such as a meeting room, or equipment
|
|
4776
|
+
like a projector. Users can then invite the resource as an attendee to a meeting. On behalf of the resource, the server accepts or rejects
|
|
4777
|
+
the meeting request based on the free/busy schedule of the resource.
|
|
4778
|
+
If the server accepts a meeting for the resource, it creates an event for the meeting in the resource's calendar. If the meeting is rescheduled,
|
|
4779
|
+
the server automatically updates the event in the resource's calendar. Another advantage of setting up a mailbox for a resource is to control scheduling of the resource, for example, only executives
|
|
4780
|
+
or their delegates can book a private meeting room. If you're organizing an event that involves a meeting location: Additionally, if the meeting location has been set up as a resource, or if the event involves some equipment that has been set up as a resource:`,
|
|
4798
4781
|
requestFormat: "json",
|
|
4799
4782
|
parameters: [
|
|
4800
4783
|
{
|
|
@@ -5452,11 +5435,7 @@ open extensions or extended properties, and how to specify extended properties.`
|
|
|
5452
5435
|
method: "post",
|
|
5453
5436
|
path: "/me/messages",
|
|
5454
5437
|
alias: "create-draft-email",
|
|
5455
|
-
description: `Create a
|
|
5456
|
-
- Include an attachment to the message.
|
|
5457
|
-
- Update the draft later to add content to the body or change other message properties. When using MIME format:
|
|
5458
|
-
- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.
|
|
5459
|
-
- /* 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.`,
|
|
5438
|
+
description: `Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions.`,
|
|
5460
5439
|
requestFormat: "json",
|
|
5461
5440
|
parameters: [
|
|
5462
5441
|
{
|
|
@@ -5652,7 +5631,7 @@ open extensions or extended properties, and how to specify extended properties.`
|
|
|
5652
5631
|
method: "delete",
|
|
5653
5632
|
path: "/me/messages/:messageId",
|
|
5654
5633
|
alias: "delete-mail-message",
|
|
5655
|
-
description: `Delete
|
|
5634
|
+
description: `Delete eventMessage.`,
|
|
5656
5635
|
requestFormat: "json",
|
|
5657
5636
|
parameters: [
|
|
5658
5637
|
{
|
|
@@ -7881,7 +7860,7 @@ To monitor future changes, call the delta API by using the @odata.deltaLink in t
|
|
|
7881
7860
|
method: "post",
|
|
7882
7861
|
path: "/teams/:teamId/channels/:channelId/messages",
|
|
7883
7862
|
alias: "send-channel-message",
|
|
7884
|
-
description: `Send a new chatMessage in the specified channel
|
|
7863
|
+
description: `Send a new chatMessage in the specified channel.`,
|
|
7885
7864
|
requestFormat: "json",
|
|
7886
7865
|
parameters: [
|
|
7887
7866
|
{
|
package/dist/server.js
CHANGED
|
@@ -239,37 +239,76 @@ class MicrosoftGraphServer {
|
|
|
239
239
|
issuerUrl: new URL(`http://localhost:${port}`)
|
|
240
240
|
})
|
|
241
241
|
);
|
|
242
|
-
app.
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
242
|
+
app.get(
|
|
243
|
+
"/mcp",
|
|
244
|
+
microsoftBearerTokenAuthMiddleware,
|
|
245
|
+
async (req, res) => {
|
|
246
|
+
try {
|
|
247
|
+
if (req.microsoftAuth) {
|
|
248
|
+
this.graphClient.setOAuthTokens(
|
|
249
|
+
req.microsoftAuth.accessToken,
|
|
250
|
+
req.microsoftAuth.refreshToken
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
const transport = new StreamableHTTPServerTransport({
|
|
254
|
+
sessionIdGenerator: void 0
|
|
255
|
+
// Stateless mode
|
|
256
|
+
});
|
|
257
|
+
res.on("close", () => {
|
|
258
|
+
transport.close();
|
|
259
|
+
});
|
|
260
|
+
await this.server.connect(transport);
|
|
261
|
+
await transport.handleRequest(req, res, void 0);
|
|
262
|
+
} catch (error) {
|
|
263
|
+
logger.error("Error handling MCP GET request:", error);
|
|
264
|
+
if (!res.headersSent) {
|
|
265
|
+
res.status(500).json({
|
|
266
|
+
jsonrpc: "2.0",
|
|
267
|
+
error: {
|
|
268
|
+
code: -32603,
|
|
269
|
+
message: "Internal server error"
|
|
270
|
+
},
|
|
271
|
+
id: null
|
|
272
|
+
});
|
|
273
|
+
}
|
|
249
274
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
275
|
+
}
|
|
276
|
+
);
|
|
277
|
+
app.post(
|
|
278
|
+
"/mcp",
|
|
279
|
+
microsoftBearerTokenAuthMiddleware,
|
|
280
|
+
async (req, res) => {
|
|
281
|
+
try {
|
|
282
|
+
if (req.microsoftAuth) {
|
|
283
|
+
this.graphClient.setOAuthTokens(
|
|
284
|
+
req.microsoftAuth.accessToken,
|
|
285
|
+
req.microsoftAuth.refreshToken
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
const transport = new StreamableHTTPServerTransport({
|
|
289
|
+
sessionIdGenerator: void 0
|
|
290
|
+
// Stateless mode
|
|
291
|
+
});
|
|
292
|
+
res.on("close", () => {
|
|
293
|
+
transport.close();
|
|
269
294
|
});
|
|
295
|
+
await this.server.connect(transport);
|
|
296
|
+
await transport.handleRequest(req, res, req.body);
|
|
297
|
+
} catch (error) {
|
|
298
|
+
logger.error("Error handling MCP POST request:", error);
|
|
299
|
+
if (!res.headersSent) {
|
|
300
|
+
res.status(500).json({
|
|
301
|
+
jsonrpc: "2.0",
|
|
302
|
+
error: {
|
|
303
|
+
code: -32603,
|
|
304
|
+
message: "Internal server error"
|
|
305
|
+
},
|
|
306
|
+
id: null
|
|
307
|
+
});
|
|
308
|
+
}
|
|
270
309
|
}
|
|
271
310
|
}
|
|
272
|
-
|
|
311
|
+
);
|
|
273
312
|
app.get("/", (req, res) => {
|
|
274
313
|
res.send("Microsoft 365 MCP Server is running");
|
|
275
314
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softeria/ms-365-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.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",
|