@softeria/ms-365-mcp-server 0.26.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/generated/client.js +124 -2728
- package/dist/graph-tools.js +311 -207
- package/dist/server.js +18 -8
- package/dist/tool-categories.js +93 -0
- package/package.json +1 -1
|
@@ -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",
|