@mcp-z/mcp-outlook
    Preparing search index...

    Function parseConfig

    • Parse Outlook server configuration from CLI arguments and environment.

      CLI Arguments (all optional):

      • --auth= Authentication mode (default: loopback-oauth) Modes: loopback-oauth, device-code, dcr
      • --headless Disable browser auto-open, return auth URL instead
      • --redirect-uri= OAuth redirect URI (default: ephemeral loopback)
      • --tenant-id= Microsoft tenant ID (overrides MS_TENANT_ID env var)
      • --dcr-mode= DCR mode (self-hosted or external, default: self-hosted)
      • --dcr-verify-url= External verification endpoint (required for external mode)
      • --dcr-store-uri= DCR client storage URI (required for self-hosted mode)
      • --port= Enable HTTP transport on specified port
      • --stdio Enable stdio transport (default if no port)
      • --log-level= Logging level (default: info)
      • --storage-dir= Directory for CSV file storage (default: .mcp-z/files)
      • --base-url= Base URL for HTTP file serving (default: http://localhost for HTTP transports)

      Environment Variables:

      • MS_CLIENT_ID OAuth client ID (REQUIRED)
      • MS_TENANT_ID Microsoft tenant ID (REQUIRED)
      • MS_CLIENT_SECRET OAuth client secret (optional)
      • AUTH_MODE Default authentication mode (optional)
      • HEADLESS Disable browser auto-open (optional)
      • DCR_MODE DCR mode (optional, same format as --dcr-mode)
      • DCR_VERIFY_URL External verification URL (optional, same as --dcr-verify-url)
      • DCR_STORE_URI DCR storage URI (optional, same as --dcr-store-uri)
      • PORT Default HTTP port (optional)
      • LOG_LEVEL Default logging level (optional)
      • STORAGE_DIR Directory for CSV file storage (optional)
      • BASE_URL Base URL for HTTP file serving (optional)

      OAuth Scopes (from constants.ts): openid profile offline_access https://graph.microsoft.com/User.Read https://graph.microsoft.com/Mail.ReadWrite https://graph.microsoft.com/Mail.Send https://graph.microsoft.com/MailboxSettings.ReadWrite

      Parameters

      • args: string[]
      • env: Record<string, string | undefined>

      Returns ServerConfig