@softeria/ms-365-mcp-server 0.132.0 → 0.132.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 +5 -4
- package/dist/tool-categories.js +21 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@ This server supports multiple Microsoft cloud environments:
|
|
|
27
27
|
- Comprehensive Microsoft 365 service integration
|
|
28
28
|
- Read-only mode support for safe operations
|
|
29
29
|
- Tool filtering for granular access control
|
|
30
|
+
- [Tool presets](#tool-presets) and [dynamic discovery](#dynamic-tool-discovery) to shrink the tool surface and token usage
|
|
30
31
|
|
|
31
32
|
## Output Format: JSON vs TOON
|
|
32
33
|
|
|
@@ -94,7 +95,7 @@ MS365_MCP_OUTPUT_FORMAT=toon npx @softeria/ms-365-mcp-server
|
|
|
94
95
|
|
|
95
96
|
## Supported Services & Tools
|
|
96
97
|
|
|
97
|
-
The server provides
|
|
98
|
+
The server provides 300+ tools covering most of the Microsoft Graph API surface. Each tool maps 1-to-1 to a Graph API endpoint and is defined declaratively in [`src/endpoints.json`](src/endpoints.json).
|
|
98
99
|
|
|
99
100
|
### Personal Account Tools (Available by default)
|
|
100
101
|
|
|
@@ -509,7 +510,7 @@ Pinning is opt-in and local-MSAL only:
|
|
|
509
510
|
|
|
510
511
|
## Tool Presets
|
|
511
512
|
|
|
512
|
-
To reduce initial connection overhead, use preset tool categories instead of loading
|
|
513
|
+
To reduce initial connection overhead and token usage, use preset tool categories instead of loading the full tool set:
|
|
513
514
|
|
|
514
515
|
```bash
|
|
515
516
|
npx @softeria/ms-365-mcp-server --preset mail
|
|
@@ -518,7 +519,7 @@ npx @softeria/ms-365-mcp-server --list-presets # See all available presets
|
|
|
518
519
|
|
|
519
520
|
Available presets: `mail`, `calendar`, `files`, `personal`, `work`, `excel`, `contacts`, `tasks`, `onenote`, `search`, `users`, `outlook`, `onedrive`, `teams`, `all`
|
|
520
521
|
|
|
521
|
-
Each endpoint in `endpoints.json` declares which presets it belongs to via a `presets` array, so every preset is an exact tool-name allow-list that never over-matches across apps (e.g. `mail` does not include shared-mailbox tools; those are in `work`).
|
|
522
|
+
Each endpoint in `endpoints.json` declares which presets it belongs to via a `presets` array, so every preset is an exact tool-name allow-list that never over-matches across apps (e.g. `mail` does not include shared-mailbox tools; those are in `work`). The universal binary reader `download-bytes` is included in every preset, so whatever an app returns (a file, an attachment, a photo, a recording) can always be fetched; `get-download-url` (a pre-authenticated URL for drive/SharePoint files) rides with the drive-backed presets. So a preset that can find a file can always read its bytes.
|
|
522
523
|
|
|
523
524
|
The `outlook`, `onedrive` and `teams` presets are app-scoped: they expose exactly one Microsoft app. Use these for "expose exactly one app" deployments:
|
|
524
525
|
|
|
@@ -532,7 +533,7 @@ npx @softeria/ms-365-mcp-server --org-mode --preset teams
|
|
|
532
533
|
|
|
533
534
|
## Dynamic Tool Discovery
|
|
534
535
|
|
|
535
|
-
Instead of loading
|
|
536
|
+
Instead of loading every tool upfront, use dynamic discovery so the LLM finds and loads tools only when it needs them:
|
|
536
537
|
|
|
537
538
|
```bash
|
|
538
539
|
npx @softeria/ms-365-mcp-server --discovery
|
package/dist/tool-categories.js
CHANGED
|
@@ -53,13 +53,32 @@ const PRESET_META = {
|
|
|
53
53
|
requiresOrgMode: true
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
+
const UNIVERSAL_UTILITY_TOOLS = ["download-bytes"];
|
|
57
|
+
const SCOPED_UTILITY_TOOLS = {
|
|
58
|
+
"get-download-url": ["files", "onedrive", "personal", "work", "search"],
|
|
59
|
+
"parse-teams-url": ["teams", "work"]
|
|
60
|
+
};
|
|
61
|
+
for (const [tool, presets] of Object.entries(SCOPED_UTILITY_TOOLS)) {
|
|
62
|
+
for (const preset of presets) {
|
|
63
|
+
if (!Object.prototype.hasOwnProperty.call(PRESET_META, preset)) {
|
|
64
|
+
throw new Error(
|
|
65
|
+
`SCOPED_UTILITY_TOOLS["${tool}"] references unknown preset "${preset}" (not in PRESET_META)`
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
56
70
|
function presetPattern(preset) {
|
|
57
|
-
const
|
|
71
|
+
const endpointNames = [
|
|
58
72
|
...new Set(endpointEntries.filter((e) => e.presets?.includes(preset)).map((e) => e.toolName))
|
|
59
73
|
];
|
|
60
|
-
if (
|
|
74
|
+
if (endpointNames.length === 0) {
|
|
61
75
|
throw new Error(`Preset "${preset}" matches no endpoints in endpoints.json`);
|
|
62
76
|
}
|
|
77
|
+
const names = [
|
|
78
|
+
...endpointNames,
|
|
79
|
+
...UNIVERSAL_UTILITY_TOOLS,
|
|
80
|
+
...Object.entries(SCOPED_UTILITY_TOOLS).filter(([, presets]) => presets.includes(preset)).map(([name]) => name)
|
|
81
|
+
];
|
|
63
82
|
return new RegExp(`^(?:${names.join("|")})$`);
|
|
64
83
|
}
|
|
65
84
|
const TOOL_CATEGORIES = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softeria/ms-365-mcp-server",
|
|
3
|
-
"version": "0.132.
|
|
3
|
+
"version": "0.132.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",
|