@softeria/ms-365-mcp-server 0.9.11 → 0.9.12

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 CHANGED
@@ -21,19 +21,23 @@ API.
21
21
  ## Supported Services & Tools
22
22
 
23
23
  **Email (Outlook)**
24
- <sub>list-mail-messages, list-mail-folders, list-mail-folder-messages, get-mail-message, send-mail, delete-mail-message</sub>
24
+ <sub>list-mail-messages, list-mail-folders, list-mail-folder-messages, get-mail-message, send-mail,
25
+ delete-mail-message</sub>
25
26
 
26
27
  **Calendar**
27
- <sub>list-calendars, list-calendar-events, get-calendar-event, get-calendar-view, create-calendar-event, update-calendar-event, delete-calendar-event</sub>
28
+ <sub>list-calendars, list-calendar-events, get-calendar-event, get-calendar-view, create-calendar-event,
29
+ update-calendar-event, delete-calendar-event</sub>
28
30
 
29
31
  **OneDrive & SharePoint Files**
30
- <sub>list-drives, get-drive-root-item, list-folder-files, download-onedrive-file-content, upload-file-content, upload-new-file, delete-onedrive-file</sub>
32
+ <sub>list-drives, get-drive-root-item, list-folder-files, download-onedrive-file-content, upload-file-content,
33
+ upload-new-file, delete-onedrive-file</sub>
31
34
 
32
35
  **Excel Operations**
33
36
  <sub>list-excel-worksheets, get-excel-range, create-excel-chart, format-excel-range, sort-excel-range</sub>
34
37
 
35
38
  **OneNote**
36
- <sub>list-onenote-notebooks, list-onenote-notebook-sections, list-onenote-section-pages, get-onenote-page-content, create-onenote-page</sub>
39
+ <sub>list-onenote-notebooks, list-onenote-notebook-sections, list-onenote-section-pages, get-onenote-page-content,
40
+ create-onenote-page</sub>
37
41
 
38
42
  **To Do Tasks**
39
43
  <sub>list-todo-task-lists, list-todo-tasks, get-todo-task, create-todo-task, update-todo-task, delete-todo-task</sub>
@@ -42,13 +46,19 @@ API.
42
46
  <sub>list-planner-tasks, get-planner-plan, list-plan-tasks, get-planner-task, create-planner-task</sub>
43
47
 
44
48
  **Contacts**
45
- <sub>list-outlook-contacts, get-outlook-contact, create-outlook-contact, update-outlook-contact, delete-outlook-contact</sub>
49
+ <sub>list-outlook-contacts, get-outlook-contact, create-outlook-contact, update-outlook-contact,
50
+ delete-outlook-contact</sub>
46
51
 
47
52
  **Teams & Chats** (Work/School accounts only)
48
- <sub>list-chats, get-chat, list-chat-messages, get-chat-message, send-chat-message, list-chat-message-replies, reply-to-chat-message, list-joined-teams, get-team, list-team-channels, get-team-channel, list-channel-messages, get-channel-message, send-channel-message, list-team-members</sub>
53
+ <sub>list-chats, get-chat, list-chat-messages, get-chat-message, send-chat-message, list-chat-message-replies,
54
+ reply-to-chat-message, list-joined-teams, get-team, list-team-channels, get-team-channel, list-channel-messages,
55
+ get-channel-message, send-channel-message, list-team-members</sub>
49
56
 
50
57
  **SharePoint Sites** (Work/School accounts only)
51
- <sub>search-sharepoint-sites, get-sharepoint-site, get-sharepoint-site-by-path, list-sharepoint-site-drives, get-sharepoint-site-drive-by-id, list-sharepoint-site-items, get-sharepoint-site-item, list-sharepoint-site-lists, get-sharepoint-site-list, list-sharepoint-site-list-items, get-sharepoint-site-list-item, get-sharepoint-sites-delta</sub>
58
+ <sub>search-sharepoint-sites, get-sharepoint-site, get-sharepoint-site-by-path, list-sharepoint-site-drives,
59
+ get-sharepoint-site-drive-by-id, list-sharepoint-site-items, get-sharepoint-site-item, list-sharepoint-site-lists,
60
+ get-sharepoint-site-list, list-sharepoint-site-list-items, get-sharepoint-site-list-item,
61
+ get-sharepoint-sites-delta</sub>
52
62
 
53
63
  **User Profile**
54
64
  <sub>get-current-user</sub>
@@ -147,6 +157,7 @@ The following options can be used when running ms-365-mcp-server directly from t
147
157
  --login Login using device code flow
148
158
  --logout Log out and clear saved credentials
149
159
  --verify-login Verify login without starting the server
160
+ --force-work-scopes Force inclusion of work account scopes during login (includes Teams, SharePoint, etc.)
150
161
  ```
151
162
 
152
163
  ### Server Options
@@ -166,8 +177,9 @@ Environment variables:
166
177
 
167
178
  - `READ_ONLY=true|1`: Alternative to --read-only flag
168
179
  - `ENABLED_TOOLS`: Filter tools using regex pattern (alternative to --enabled-tools flag)
180
+ - `MS365_MCP_FORCE_WORK_SCOPES=true|1`: Force inclusion of work account scopes (alternative to --force-work-scopes flag)
169
181
  - `LOG_LEVEL`: Set logging level (default: 'info')
170
- - `SILENT=true`: Disable console output
182
+ - `SILENT=true|1`: Disable console output
171
183
  - `MS365_MCP_CLIENT_ID`: Custom Azure app client ID (defaults to built-in app)
172
184
  - `MS365_MCP_TENANT_ID`: Custom tenant ID (defaults to 'common' for multi-tenant)
173
185
 
package/dist/cli.js CHANGED
@@ -18,7 +18,8 @@ program
18
18
  .option('--read-only', 'Start server in read-only mode, disabling write operations')
19
19
  .option('--http [port]', 'Use Streamable HTTP transport instead of stdio (optionally specify port, default: 3000)')
20
20
  .option('--enable-auth-tools', 'Enable login/logout tools when using HTTP mode (disabled by default in HTTP mode)')
21
- .option('--enabled-tools <pattern>', 'Filter tools using regex pattern (e.g., "excel|contact" to enable Excel and Contact tools)');
21
+ .option('--enabled-tools <pattern>', 'Filter tools using regex pattern (e.g., "excel|contact" to enable Excel and Contact tools)')
22
+ .option('--force-work-scopes', 'Force inclusion of work account scopes during login (includes Teams, SharePoint, etc.)');
22
23
  export function parseArgs() {
23
24
  program.parse();
24
25
  const options = program.opts();
@@ -28,5 +29,9 @@ export function parseArgs() {
28
29
  if (process.env.ENABLED_TOOLS) {
29
30
  options.enabledTools = process.env.ENABLED_TOOLS;
30
31
  }
32
+ if (process.env.MS365_MCP_FORCE_WORK_SCOPES === 'true' ||
33
+ process.env.MS365_MCP_FORCE_WORK_SCOPES === '1') {
34
+ options.forceWorkScopes = true;
35
+ }
31
36
  return options;
32
37
  }
package/dist/index.js CHANGED
@@ -4,10 +4,12 @@ import logger from './logger.js';
4
4
  import AuthManager from './auth.js';
5
5
  import MicrosoftGraphServer from './server.js';
6
6
  import { version } from './version.js';
7
+ import { buildScopesFromEndpoints } from './auth.js';
7
8
  async function main() {
8
9
  try {
9
10
  const args = parseArgs();
10
- const authManager = new AuthManager();
11
+ const scopes = buildScopesFromEndpoints(args.forceWorkScopes);
12
+ const authManager = new AuthManager(undefined, scopes);
11
13
  await authManager.loadTokenCache();
12
14
  if (args.login) {
13
15
  await authManager.acquireTokenByDeviceCode();
package/dist/logger.js CHANGED
@@ -27,7 +27,7 @@ const logger = winston.createLogger({
27
27
  export const enableConsoleLogging = () => {
28
28
  logger.add(new winston.transports.Console({
29
29
  format: winston.format.combine(winston.format.colorize(), winston.format.simple()),
30
- silent: process.env.SILENT === 'true',
30
+ silent: process.env.SILENT === 'true' || process.env.SILENT === '1',
31
31
  }));
32
32
  };
33
33
  export default logger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
- "version": "0.9.11",
3
+ "version": "0.9.12",
4
4
  "description": "Microsoft 365 MCP Server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",