@softeria/ms-365-mcp-server 0.25.0 → 0.27.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 +16 -0
- package/bin/modules/generate-mcp-tools.mjs +4 -0
- package/dist/cli.js +25 -1
- package/dist/endpoints.json +10 -5
- package/dist/generated/client.js +124 -2728
- package/dist/graph-tools.js +316 -203
- package/dist/server.js +18 -8
- package/dist/tool-categories.js +93 -0
- package/package.json +1 -1
- package/src/endpoints.json +10 -5
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
const TOOL_CATEGORIES = {
|
|
2
|
+
mail: {
|
|
3
|
+
name: "mail",
|
|
4
|
+
pattern: /mail|attachment|draft/i,
|
|
5
|
+
description: "Email operations (read, send, manage folders, attachments)"
|
|
6
|
+
},
|
|
7
|
+
calendar: {
|
|
8
|
+
name: "calendar",
|
|
9
|
+
pattern: /calendar|event/i,
|
|
10
|
+
description: "Calendar and event management"
|
|
11
|
+
},
|
|
12
|
+
files: {
|
|
13
|
+
name: "files",
|
|
14
|
+
pattern: /drive|file|upload|download|folder|item/i,
|
|
15
|
+
description: "OneDrive file and folder operations"
|
|
16
|
+
},
|
|
17
|
+
personal: {
|
|
18
|
+
name: "personal",
|
|
19
|
+
pattern: /mail|calendar|drive|contact|todo|onenote|attachment|draft|event|file|folder/i,
|
|
20
|
+
description: "Personal productivity tools (mail, calendar, files, contacts, tasks, notes)"
|
|
21
|
+
},
|
|
22
|
+
work: {
|
|
23
|
+
name: "work",
|
|
24
|
+
pattern: /team|channel|chat|sharepoint|planner|site|list|shared/i,
|
|
25
|
+
description: "Organization/work tools (Teams, SharePoint, shared mailboxes)",
|
|
26
|
+
requiresOrgMode: true
|
|
27
|
+
},
|
|
28
|
+
excel: {
|
|
29
|
+
name: "excel",
|
|
30
|
+
pattern: /excel|worksheet|workbook|range|chart/i,
|
|
31
|
+
description: "Excel spreadsheet operations"
|
|
32
|
+
},
|
|
33
|
+
contacts: {
|
|
34
|
+
name: "contacts",
|
|
35
|
+
pattern: /contact/i,
|
|
36
|
+
description: "Outlook contacts management"
|
|
37
|
+
},
|
|
38
|
+
tasks: {
|
|
39
|
+
name: "tasks",
|
|
40
|
+
pattern: /todo|planner|task/i,
|
|
41
|
+
description: "Task and planning tools (To Do, Planner)"
|
|
42
|
+
},
|
|
43
|
+
onenote: {
|
|
44
|
+
name: "onenote",
|
|
45
|
+
pattern: /onenote|notebook|section|page/i,
|
|
46
|
+
description: "OneNote notebook operations"
|
|
47
|
+
},
|
|
48
|
+
search: {
|
|
49
|
+
name: "search",
|
|
50
|
+
pattern: /search|query/i,
|
|
51
|
+
description: "Microsoft Search capabilities"
|
|
52
|
+
},
|
|
53
|
+
users: {
|
|
54
|
+
name: "users",
|
|
55
|
+
pattern: /user|list-users/i,
|
|
56
|
+
description: "User directory access",
|
|
57
|
+
requiresOrgMode: true
|
|
58
|
+
},
|
|
59
|
+
all: {
|
|
60
|
+
name: "all",
|
|
61
|
+
pattern: /.*/,
|
|
62
|
+
description: "All available tools"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
function getCombinedPresetPattern(presets) {
|
|
66
|
+
const patterns = presets.map((preset) => {
|
|
67
|
+
const category = TOOL_CATEGORIES[preset];
|
|
68
|
+
if (!category) {
|
|
69
|
+
throw new Error(
|
|
70
|
+
`Unknown preset: ${preset}. Available presets: ${Object.keys(TOOL_CATEGORIES).join(", ")}`
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
return category.pattern.source;
|
|
74
|
+
});
|
|
75
|
+
return patterns.join("|");
|
|
76
|
+
}
|
|
77
|
+
function listPresets() {
|
|
78
|
+
return Object.values(TOOL_CATEGORIES).map((category) => ({
|
|
79
|
+
name: category.name,
|
|
80
|
+
description: category.description,
|
|
81
|
+
requiresOrgMode: category.requiresOrgMode
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
function presetRequiresOrgMode(preset) {
|
|
85
|
+
const category = TOOL_CATEGORIES[preset];
|
|
86
|
+
return category?.requiresOrgMode || false;
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
TOOL_CATEGORIES,
|
|
90
|
+
getCombinedPresetPattern,
|
|
91
|
+
listPresets,
|
|
92
|
+
presetRequiresOrgMode
|
|
93
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softeria/ms-365-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.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
|
@@ -112,13 +112,15 @@
|
|
|
112
112
|
"pathPattern": "/me/events",
|
|
113
113
|
"method": "get",
|
|
114
114
|
"toolName": "list-calendar-events",
|
|
115
|
-
"scopes": ["Calendars.Read"]
|
|
115
|
+
"scopes": ["Calendars.Read"],
|
|
116
|
+
"supportsTimezone": true
|
|
116
117
|
},
|
|
117
118
|
{
|
|
118
119
|
"pathPattern": "/me/events/{event-id}",
|
|
119
120
|
"method": "get",
|
|
120
121
|
"toolName": "get-calendar-event",
|
|
121
|
-
"scopes": ["Calendars.Read"]
|
|
122
|
+
"scopes": ["Calendars.Read"],
|
|
123
|
+
"supportsTimezone": true
|
|
122
124
|
},
|
|
123
125
|
{
|
|
124
126
|
"pathPattern": "/me/events",
|
|
@@ -144,13 +146,15 @@
|
|
|
144
146
|
"pathPattern": "/me/calendars/{calendar-id}/events",
|
|
145
147
|
"method": "get",
|
|
146
148
|
"toolName": "list-specific-calendar-events",
|
|
147
|
-
"scopes": ["Calendars.Read"]
|
|
149
|
+
"scopes": ["Calendars.Read"],
|
|
150
|
+
"supportsTimezone": true
|
|
148
151
|
},
|
|
149
152
|
{
|
|
150
153
|
"pathPattern": "/me/calendars/{calendar-id}/events/{event-id}",
|
|
151
154
|
"method": "get",
|
|
152
155
|
"toolName": "get-specific-calendar-event",
|
|
153
|
-
"scopes": ["Calendars.Read"]
|
|
156
|
+
"scopes": ["Calendars.Read"],
|
|
157
|
+
"supportsTimezone": true
|
|
154
158
|
},
|
|
155
159
|
{
|
|
156
160
|
"pathPattern": "/me/calendars/{calendar-id}/events",
|
|
@@ -176,7 +180,8 @@
|
|
|
176
180
|
"pathPattern": "/me/calendarView",
|
|
177
181
|
"method": "get",
|
|
178
182
|
"toolName": "get-calendar-view",
|
|
179
|
-
"scopes": ["Calendars.Read"]
|
|
183
|
+
"scopes": ["Calendars.Read"],
|
|
184
|
+
"supportsTimezone": true
|
|
180
185
|
},
|
|
181
186
|
{
|
|
182
187
|
"pathPattern": "/me/calendars",
|