/** * 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.0", // 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', // Pagination DEFAULT_PAGE_SIZE: 25, MAX_RESULT_COUNT: 500 };