ms365-mcp-server 2.0.0 → 2.1.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.
@@ -37,10 +37,12 @@ export function getConfigDir() {
37
37
  */
38
38
  export function hasConfigFiles(dirPath) {
39
39
  const credentialsFile = path.join(dirPath, 'credentials.json');
40
- const tokenFile = path.join(dirPath, 'token.json');
40
+ const tokenFile = path.join(dirPath, 'token_ms365-user.json');
41
+ const legacyTokenFile = path.join(dirPath, 'token.json');
41
42
  const msalCacheFile = path.join(dirPath, 'msal-cache.json');
42
43
  return fs.existsSync(credentialsFile) ||
43
44
  fs.existsSync(tokenFile) ||
45
+ fs.existsSync(legacyTokenFile) ||
44
46
  fs.existsSync(msalCacheFile);
45
47
  }
46
48
  /**
@@ -19,7 +19,7 @@ const SCOPES = [
19
19
  // Configuration directory and file paths
20
20
  const CONFIG_DIR = getConfigDirWithFallback();
21
21
  const CREDENTIALS_FILE = path.join(CONFIG_DIR, 'credentials.json');
22
- const TOKEN_FILE = path.join(CONFIG_DIR, 'token.json');
22
+ const TOKEN_FILE = path.join(CONFIG_DIR, 'token_ms365-user.json');
23
23
  /**
24
24
  * Microsoft 365 authentication manager class
25
25
  */
@@ -15,7 +15,7 @@ const DEFAULT_TENANT_ID = 'common';
15
15
  // Use existing config directory (~/.ms365-mcp/)
16
16
  const CONFIG_DIR = getConfigDirWithFallback();
17
17
  const CREDENTIALS_FILE = path.join(CONFIG_DIR, 'credentials.json');
18
- const TOKEN_FILE = path.join(CONFIG_DIR, 'token.json');
18
+ const TOKEN_FILE = path.join(CONFIG_DIR, 'token_ms365-user.json');
19
19
  const MSAL_CACHE_FILE = path.join(CONFIG_DIR, 'msal-cache.json');
20
20
  // Required scopes for Outlook operations
21
21
  const OUTLOOK_SCOPES = [
@@ -324,7 +324,7 @@ export class OutlookAuth {
324
324
  return tokenResponse;
325
325
  }
326
326
  /**
327
- * Save tokens to existing storage location (~/.ms365-mcp/token.json)
327
+ * Save tokens to existing storage location (~/.ms365-mcp/token_ms365-user.json)
328
328
  */
329
329
  async saveTokens(tokenResponse) {
330
330
  const tokens = {
@@ -351,7 +351,7 @@ export class OutlookAuth {
351
351
  }
352
352
  }
353
353
  /**
354
- * Load tokens from existing storage location (~/.ms365-mcp/token.json)
354
+ * Load tokens from existing storage location (~/.ms365-mcp/token_ms365-user.json)
355
355
  */
356
356
  async loadStoredTokens() {
357
357
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms365-mcp-server",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
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",
@@ -11,6 +11,9 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/syia-ai/ms365-mcp-server"
13
13
  },
14
+ "publishConfig": {
15
+ "registry": "https://registry.npmjs.org"
16
+ },
14
17
  "scripts": {
15
18
  "test": "npx @modelcontextprotocol/inspector node dist/index.js",
16
19
  "build": "tsc",