# Outlook OAuth MCP Server Configuration
# Required: Azure AD Application (client) ID
MS365_MCP_CLIENT_ID=your-azure-ad-client-id
# Required for remote deployment: Azure AD client secret
MS365_MCP_CLIENT_SECRET=your-client-secret
# Optional: Azure AD tenant ID (default: 'common' for multi-tenant)
# MS365_MCP_TENANT_ID=your-tenant-id
# Optional: Server port (default: 3000)
# MS365_MCP_PORT=3000
# Optional: Server bind address (default: 0.0.0.0)
# MS365_MCP_HOST=0.0.0.0
# Optional: Log level (debug, info, warn, error) (default: info)
# MS365_MCP_LOG_LEVEL=info
# Optional: CORS allowed origins (default: *)
# MS365_MCP_CORS_ORIGIN=https://your-app.com
# Optional: Rate limiting - max requests per window per user (default: 30)
# MS365_MCP_RATE_LIMIT_REQUESTS=30
# Optional: Rate limiting - window size in milliseconds (default: 60000 = 1 minute)
# MS365_MCP_RATE_LIMIT_WINDOW_MS=60000
# Optional: Allowed tenant IDs (comma-separated). If not set, all tenants are allowed.
# MS365_MCP_ALLOWED_TENANTS=tenant-id-1,tenant-id-2
# Optional: TONL encoding for token savings (default: true)
# TONL reduces token usage by 32-50% compared to JSON. Set to 'false' for standard JSON.
# MS365_MCP_USE_TONL=false
# Optional: Read-only mode - disable all write tools (send, delete, create, update, move)
# MS365_MCP_READ_ONLY_MODE=true
# Optional: Enabled tools - comma-separated list of tool names to enable (empty = all tools)
# Available mail tools: list-mail-folders, list-mail-messages, search-mail, get-mail-message,
# send-mail, create-draft-mail, reply-mail, reply-all-mail,
# create-reply-draft, create-reply-all-draft, delete-mail-message,
# move-mail-message
# Available calendar tools: list-calendars, list-calendar-events, search-calendar-events,
# find-meeting-times, get-calendar-event, get-calendar-view,
# create-calendar-event, update-calendar-event, delete-calendar-event,
# create-draft-calendar-event
# Available people tools: lookup-contact-email
# MS365_MCP_ENABLED_TOOLS=list-mail-messages,search-mail,list-calendar-events,find-meeting-times