outlook-mcp/config.js
Seton Carmichael ba45f57b39 v1.0.1: Fix accept-event registration, edit-rule-sequence import, timezone config
Bug fixes (non-breaking):
- Register accept-event tool in calendar module (was dead code)
- Add missing callGraphAPI + ensureAuthenticated imports to rules/index.js
  (edit-rule-sequence would throw ReferenceError at runtime)
- Make calendar event timezone configurable via MS_TIMEZONE env var
  (was hardcoded to UTC; default is now Eastern Standard Time)

Version bump: 1.0.0 → 1.0.1
README updated: 21 tools, MS_TIMEZONE in config table, known issues pruned
2026-06-21 19:43:54 -04:00

51 lines
2.3 KiB
JavaScript

/**
* Configuration for Outlook MCP Server
*/
const path = require('path');
const os = require('os');
// Ensure we have a home directory path even if process.env.HOME is undefined
const homeDir = process.env.HOME || process.env.USERPROFILE || os.homedir() || '/tmp';
module.exports = {
// Server information
SERVER_NAME: "outlook-assistant-main",
SERVER_VERSION: "1.0.1",
// Test mode setting
USE_TEST_MODE: process.env.USE_TEST_MODE === 'true',
// Debug mode setting
DEBUG_MODE: process.env.DEBUG_MODE === 'true',
// Authentication configuration
AUTH_CONFIG: {
clientId: process.env.MS_CLIENT_ID || '',
// Optional: set MS_CLIENT_SECRET for confidential client app registrations.
// Public client apps (Allow public client flows enabled, no secret) leave this blank.
clientSecret: process.env.MS_CLIENT_SECRET || '',
scopes: ['Mail.Read', 'Mail.ReadWrite', 'Mail.Send', 'User.Read', 'Calendars.Read', 'Calendars.ReadWrite', 'MailboxSettings.ReadWrite', 'offline_access'],
tokenStorePath: process.env.OUTLOOK_TOKEN_STORE_PATH || path.join(homeDir, '.outlook-mcp-tokens.json'),
// Device code flow: polling interval in seconds (Microsoft returns the recommended interval)
deviceCodePollingInterval: 5
},
// Microsoft Graph API
GRAPH_API_ENDPOINT: 'https://graph.microsoft.com/v1.0/',
// Calendar constants
CALENDAR_SELECT_FIELDS: 'id,subject,start,end,location,bodyPreview,isAllDay,recurrence,attendees',
// Email constants
EMAIL_SELECT_FIELDS: 'id,subject,from,toRecipients,ccRecipients,receivedDateTime,bodyPreview,hasAttachments,importance,isRead,conversationId',
EMAIL_DETAIL_FIELDS: 'id,subject,from,toRecipients,ccRecipients,bccRecipients,receivedDateTime,bodyPreview,body,hasAttachments,importance,isRead,internetMessageHeaders',
// Calendar constants
CALENDAR_SELECT_FIELDS: 'id,subject,bodyPreview,start,end,location,organizer,attendees,isAllDay,isCancelled',
// Default timezone for calendar event creation (IANA tz name, e.g. 'America/New_York').
// Override via MS_TIMEZONE env var. Graph API accepts IANA timezone identifiers.
DEFAULT_TIMEZONE: process.env.MS_TIMEZONE || 'Eastern Standard Time',
DEFAULT_PAGE_SIZE: 25,
MAX_RESULT_COUNT: 500
};