@softeria/ms-365-mcp-server 0.176.1 → 0.178.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/cli.js CHANGED
@@ -59,7 +59,10 @@ program.name("ms-365-mcp-server").description("Microsoft 365 MCP Server").versio
59
59
  ).option("--list-presets", "List all available presets and exit").option("--list-permissions", "List all required Graph API permissions and exit").option(
60
60
  "--org-mode",
61
61
  "Enable organization/work mode from start (includes Teams, SharePoint, etc.)"
62
- ).option("--work-mode", "Alias for --org-mode").option("--force-work-scopes", "Backwards compatibility alias for --org-mode (deprecated)").option("--toon", "(experimental) Enable TOON output format for 30-60% token reduction").option(
62
+ ).option("--work-mode", "Alias for --org-mode").option(
63
+ "--app-mode",
64
+ "Use application permissions with no signed-in user. stdio only. Needs one credential: MS365_MCP_CLIENT_SECRET, MS365_MCP_CLIENT_CERTIFICATE_PATH or MS365_MCP_FEDERATED_TOKEN_FILE (with your own app registration and MS365_MCP_TENANT_ID), or MS365_MCP_MANAGED_IDENTITY on an Azure host. Only tools that work with application permissions are offered."
65
+ ).option("--force-work-scopes", "Backwards compatibility alias for --org-mode (deprecated)").option("--toon", "(experimental) Enable TOON output format for 30-60% token reduction").option(
63
66
  "--eager-tools <names>",
64
67
  "With --discovery, also expose these comma-separated exact Graph or utility tool names directly. All enabled tools remain discoverable. Env: MS365_MCP_EAGER_TOOLS."
65
68
  ).option("--discovery", "Enable runtime tool discovery and loading (experimental feature)").option(
@@ -138,6 +141,12 @@ function parseArgs() {
138
141
  throw new Error("--eager-tools requires non-empty exact tool names");
139
142
  options.eagerTools = [...new Set(names)];
140
143
  }
144
+ if (process.env.MS365_MCP_APP_MODE === "true" || process.env.MS365_MCP_APP_MODE === "1") {
145
+ options.appMode = true;
146
+ }
147
+ if (options.appMode) {
148
+ options.orgMode = true;
149
+ }
141
150
  if (options.preset) {
142
151
  const presetNames = options.preset.split(",").map((p) => p.trim());
143
152
  try {