@softeria/ms-365-mcp-server 0.40.0 → 0.41.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/endpoints.json +6 -0
- package/dist/generated/client.js +16 -0
- package/dist/server.js +24 -12
- package/logs/mcp-server.log +10 -10
- package/package.json +1 -1
- package/src/endpoints.json +6 -0
package/dist/endpoints.json
CHANGED
|
@@ -580,6 +580,12 @@
|
|
|
580
580
|
"toolName": "send-channel-message",
|
|
581
581
|
"workScopes": ["ChannelMessage.Send"]
|
|
582
582
|
},
|
|
583
|
+
{
|
|
584
|
+
"pathPattern": "/teams/{team-id}/channels/{channel-id}/messages/{chatMessage-id}/replies",
|
|
585
|
+
"method": "post",
|
|
586
|
+
"toolName": "reply-to-channel-message",
|
|
587
|
+
"workScopes": ["ChannelMessage.Send"]
|
|
588
|
+
},
|
|
583
589
|
{
|
|
584
590
|
"pathPattern": "/teams/{team-id}/members",
|
|
585
591
|
"method": "get",
|
package/dist/generated/client.js
CHANGED
|
@@ -7239,6 +7239,22 @@ To monitor future changes, call the delta API by using the @odata.deltaLink in t
|
|
|
7239
7239
|
],
|
|
7240
7240
|
response: z.void()
|
|
7241
7241
|
},
|
|
7242
|
+
{
|
|
7243
|
+
method: "post",
|
|
7244
|
+
path: "/teams/:teamId/channels/:channelId/messages/:chatMessageId/replies",
|
|
7245
|
+
alias: "reply-to-channel-message",
|
|
7246
|
+
description: `Create a new reply to a chatMessage in a specified channel.`,
|
|
7247
|
+
requestFormat: "json",
|
|
7248
|
+
parameters: [
|
|
7249
|
+
{
|
|
7250
|
+
name: "body",
|
|
7251
|
+
description: `New navigation property`,
|
|
7252
|
+
type: "Body",
|
|
7253
|
+
schema: microsoft_graph_chatMessage
|
|
7254
|
+
}
|
|
7255
|
+
],
|
|
7256
|
+
response: z.void()
|
|
7257
|
+
},
|
|
7242
7258
|
{
|
|
7243
7259
|
method: "get",
|
|
7244
7260
|
path: "/teams/:teamId/members",
|
package/dist/server.js
CHANGED
|
@@ -33,41 +33,51 @@ function parseHttpOption(httpOption) {
|
|
|
33
33
|
}
|
|
34
34
|
class MicrosoftGraphServer {
|
|
35
35
|
constructor(authManager, options = {}) {
|
|
36
|
+
this.version = "0.0.0";
|
|
36
37
|
this.authManager = authManager;
|
|
37
38
|
this.options = options;
|
|
38
39
|
this.graphClient = null;
|
|
39
40
|
this.server = null;
|
|
40
41
|
this.secrets = null;
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const outputFormat = this.options.toon ? "toon" : "json";
|
|
45
|
-
this.graphClient = new GraphClient(this.authManager, this.secrets, outputFormat);
|
|
46
|
-
this.server = new McpServer({
|
|
43
|
+
createMcpServer() {
|
|
44
|
+
const server = new McpServer({
|
|
47
45
|
name: "Microsoft365MCP",
|
|
48
|
-
version
|
|
46
|
+
version: this.version
|
|
49
47
|
});
|
|
50
48
|
const shouldRegisterAuthTools = !this.options.http || this.options.enableAuthTools;
|
|
51
49
|
if (shouldRegisterAuthTools) {
|
|
52
|
-
registerAuthTools(
|
|
50
|
+
registerAuthTools(server, this.authManager);
|
|
53
51
|
}
|
|
54
52
|
if (this.options.discovery) {
|
|
55
|
-
logger.info("Discovery mode enabled (experimental) - registering discovery tool only");
|
|
56
53
|
registerDiscoveryTools(
|
|
57
|
-
|
|
54
|
+
server,
|
|
58
55
|
this.graphClient,
|
|
59
56
|
this.options.readOnly,
|
|
60
57
|
this.options.orgMode
|
|
61
58
|
);
|
|
62
59
|
} else {
|
|
63
60
|
registerGraphTools(
|
|
64
|
-
|
|
61
|
+
server,
|
|
65
62
|
this.graphClient,
|
|
66
63
|
this.options.readOnly,
|
|
67
64
|
this.options.enabledTools,
|
|
68
65
|
this.options.orgMode
|
|
69
66
|
);
|
|
70
67
|
}
|
|
68
|
+
return server;
|
|
69
|
+
}
|
|
70
|
+
async initialize(version) {
|
|
71
|
+
this.secrets = await getSecrets();
|
|
72
|
+
this.version = version;
|
|
73
|
+
const outputFormat = this.options.toon ? "toon" : "json";
|
|
74
|
+
this.graphClient = new GraphClient(this.authManager, this.secrets, outputFormat);
|
|
75
|
+
if (!this.options.http) {
|
|
76
|
+
this.server = this.createMcpServer();
|
|
77
|
+
}
|
|
78
|
+
if (this.options.discovery) {
|
|
79
|
+
logger.info("Discovery mode enabled (experimental) - registering discovery tool only");
|
|
80
|
+
}
|
|
71
81
|
}
|
|
72
82
|
async start() {
|
|
73
83
|
if (this.options.v) {
|
|
@@ -273,6 +283,7 @@ class MicrosoftGraphServer {
|
|
|
273
283
|
microsoftBearerTokenAuthMiddleware,
|
|
274
284
|
async (req, res) => {
|
|
275
285
|
const handler = async () => {
|
|
286
|
+
const server = this.createMcpServer();
|
|
276
287
|
const transport = new StreamableHTTPServerTransport({
|
|
277
288
|
sessionIdGenerator: void 0
|
|
278
289
|
// Stateless mode
|
|
@@ -280,7 +291,7 @@ class MicrosoftGraphServer {
|
|
|
280
291
|
res.on("close", () => {
|
|
281
292
|
transport.close();
|
|
282
293
|
});
|
|
283
|
-
await
|
|
294
|
+
await server.connect(transport);
|
|
284
295
|
await transport.handleRequest(req, res, void 0);
|
|
285
296
|
};
|
|
286
297
|
try {
|
|
@@ -315,6 +326,7 @@ class MicrosoftGraphServer {
|
|
|
315
326
|
microsoftBearerTokenAuthMiddleware,
|
|
316
327
|
async (req, res) => {
|
|
317
328
|
const handler = async () => {
|
|
329
|
+
const server = this.createMcpServer();
|
|
318
330
|
const transport = new StreamableHTTPServerTransport({
|
|
319
331
|
sessionIdGenerator: void 0
|
|
320
332
|
// Stateless mode
|
|
@@ -322,7 +334,7 @@ class MicrosoftGraphServer {
|
|
|
322
334
|
res.on("close", () => {
|
|
323
335
|
transport.close();
|
|
324
336
|
});
|
|
325
|
-
await
|
|
337
|
+
await server.connect(transport);
|
|
326
338
|
await transport.handleRequest(req, res, req.body);
|
|
327
339
|
};
|
|
328
340
|
try {
|
package/logs/mcp-server.log
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
2026-02-
|
|
2
|
-
2026-02-
|
|
3
|
-
2026-02-
|
|
4
|
-
2026-02-
|
|
5
|
-
2026-02-
|
|
6
|
-
2026-02-
|
|
7
|
-
2026-02-
|
|
8
|
-
2026-02-
|
|
9
|
-
2026-02-
|
|
10
|
-
2026-02-
|
|
1
|
+
2026-02-15 08:15:07 INFO: [GRAPH CLIENT] Final URL being sent to Microsoft: https://graph.microsoft.com/v1.0/me
|
|
2
|
+
2026-02-15 08:15:07 INFO: [GRAPH CLIENT] Final URL being sent to Microsoft: https://graph.microsoft.com/v1.0/me
|
|
3
|
+
2026-02-15 08:15:07 INFO: [GRAPH CLIENT] Final URL being sent to Microsoft: https://graph.microsoft.com/v1.0/me
|
|
4
|
+
2026-02-15 08:15:07 INFO: [GRAPH CLIENT] Final URL being sent to Microsoft: https://graph.microsoft.com/v1.0/me/messages
|
|
5
|
+
2026-02-15 08:15:07 INFO: [GRAPH CLIENT] Final URL being sent to Microsoft: https://graph.microsoft.com/v1.0/me/calendar
|
|
6
|
+
2026-02-15 08:15:08 INFO: Using environment variables for secrets
|
|
7
|
+
2026-02-15 08:15:08 INFO: Using environment variables for secrets
|
|
8
|
+
2026-02-15 08:15:08 INFO: Using environment variables for secrets
|
|
9
|
+
2026-02-15 08:15:08 INFO: Using environment variables for secrets
|
|
10
|
+
2026-02-15 08:15:08 INFO: Using environment variables for secrets
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softeria/ms-365-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.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
|
@@ -580,6 +580,12 @@
|
|
|
580
580
|
"toolName": "send-channel-message",
|
|
581
581
|
"workScopes": ["ChannelMessage.Send"]
|
|
582
582
|
},
|
|
583
|
+
{
|
|
584
|
+
"pathPattern": "/teams/{team-id}/channels/{channel-id}/messages/{chatMessage-id}/replies",
|
|
585
|
+
"method": "post",
|
|
586
|
+
"toolName": "reply-to-channel-message",
|
|
587
|
+
"workScopes": ["ChannelMessage.Send"]
|
|
588
|
+
},
|
|
583
589
|
{
|
|
584
590
|
"pathPattern": "/teams/{team-id}/members",
|
|
585
591
|
"method": "get",
|