--redirect-uri= OAuth redirect URI (default: ephemeral loopback)
--tenant-id= Microsoft tenant ID (overrides MS_TENANT_ID env var)
--dcr-store-uri= DCR client storage URI (default: .mcp-z/dcr.json)
--port= Enable HTTP transport on specified port
--stdio Enable stdio transport (default if no port)
--log-level= Logging level (default: info)
--resource-store-uri= Resource store URI for CSV file storage (default: .mcp-z/mcp-outlook/files beside the nearest .mcp.json, else ~/.mcp-z/mcp-outlook/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_STORE_URI DCR storage URI (optional, same as --dcr-store-uri)
TOKEN_STORE_URI Token storage URI (optional)
PORT Default HTTP port (optional)
LOG_LEVEL Default logging level (optional)
RESOURCE_STORE_URI Resource store URI (optional, file://)
BASE_URL Base URL for HTTP file serving (optional)
Parse Outlook server configuration from CLI arguments and environment.
CLI Arguments (all optional):
Environment Variables:
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