ms365-mcp-server 1.1.18 → 1.1.19

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
@@ -12,6 +12,12 @@ A powerful **Model Context Protocol (MCP) server** that enables seamless Microso
12
12
  - **📁 Smart Contact Management** - Search and retrieve your Microsoft 365 contacts
13
13
  - **🌐 Cross-Platform** - Works on macOS, Linux, and Windows
14
14
 
15
+ ## 📚 Documentation
16
+
17
+ For detailed technical documentation, enhancement reports, and guides, see the **[docs/](./docs/)** directory:
18
+ - **[Enhancement Reports](./docs/MS365-MCP-Server-Enhancement-Report.md)** - Recent fixes and improvements
19
+ - **[Technical Guides](./docs/)** - Batch operations and Graph API implementation guides
20
+
15
21
  ## 🛠️ Available Tools (6 Total)
16
22
 
17
23
  ### **📧 Email Management**
package/dist/index.js CHANGED
@@ -83,7 +83,7 @@ function parseArgs() {
83
83
  }
84
84
  const server = new Server({
85
85
  name: "ms365-mcp-server",
86
- version: "1.1.18"
86
+ version: "1.1.19"
87
87
  }, {
88
88
  capabilities: {
89
89
  resources: {
@@ -7,7 +7,7 @@ export class MS365Operations {
7
7
  constructor() {
8
8
  this.graphClient = null;
9
9
  this.searchCache = new Map();
10
- this.CACHE_DURATION = 60 * 1000; // 1 minute cache
10
+ this.CACHE_DURATION = 300 * 1000; // 5 minute cache for better performance
11
11
  this.MAX_RETRIES = 3;
12
12
  this.BASE_DELAY = 1000; // 1 second
13
13
  }
@@ -1624,7 +1624,18 @@ ${originalBodyContent}
1624
1624
  // Other filters remain the same but are more robust
1625
1625
  if (criteria.to && !message.toRecipients.some(r => r.address.toLowerCase().includes(criteria.to.toLowerCase())))
1626
1626
  return false;
1627
- if (criteria.cc && (!message.ccRecipients || !message.ccRecipients.some(r => r.address.toLowerCase().includes(criteria.cc.toLowerCase()))))
1627
+ if (criteria.cc && (!message.ccRecipients || !message.ccRecipients.some(r => {
1628
+ const searchTerm = criteria.cc.toLowerCase().trim();
1629
+ const recipientName = r.name.toLowerCase();
1630
+ const recipientAddress = r.address.toLowerCase();
1631
+ // Multiple matching strategies for robust CC filtering
1632
+ return (recipientAddress === searchTerm ||
1633
+ recipientAddress.includes(searchTerm) ||
1634
+ recipientName === searchTerm ||
1635
+ recipientName.includes(searchTerm) ||
1636
+ searchTerm.split(/\s+/).every(part => recipientName.includes(part)) ||
1637
+ new RegExp(`\\b${searchTerm.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`, 'i').test(recipientName));
1638
+ })))
1628
1639
  return false;
1629
1640
  if (criteria.subject && !message.subject.toLowerCase().includes(criteria.subject.toLowerCase()))
1630
1641
  return false;
@@ -2402,8 +2413,26 @@ ${originalBodyContent}
2402
2413
  return false;
2403
2414
  }
2404
2415
  if (criteria.cc) {
2416
+ const searchTerm = criteria.cc.toLowerCase().trim();
2405
2417
  const ccMatch = message.ccRecipients && message.ccRecipients.length > 0 &&
2406
- message.ccRecipients.some(recipient => recipient.address.toLowerCase() === criteria.cc.toLowerCase());
2418
+ message.ccRecipients.some(recipient => {
2419
+ const recipientName = recipient.name.toLowerCase();
2420
+ const recipientAddress = recipient.address.toLowerCase();
2421
+ // Multiple matching strategies for robust CC filtering (same as TO)
2422
+ return (
2423
+ // Exact email match
2424
+ recipientAddress === searchTerm ||
2425
+ // Email contains search term
2426
+ recipientAddress.includes(searchTerm) ||
2427
+ // Full name match
2428
+ recipientName === searchTerm ||
2429
+ // Name contains search term
2430
+ recipientName.includes(searchTerm) ||
2431
+ // Split name matching (for "first last" searches)
2432
+ searchTerm.split(/\s+/).every(part => recipientName.includes(part)) ||
2433
+ // Word boundary matching
2434
+ new RegExp(`\\b${searchTerm.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`, 'i').test(recipientName));
2435
+ });
2407
2436
  if (!ccMatch)
2408
2437
  return false;
2409
2438
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms365-mcp-server",
3
- "version": "1.1.18",
3
+ "version": "1.1.19",
4
4
  "description": "Microsoft 365 MCP Server for managing Microsoft 365 email through natural language interactions with full OAuth2 authentication support",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",