# ===========================================
# Lerian MCP Server - Documentation Mode
# ===========================================
# This MCP server provides documentation and learning resources only.
# It does NOT connect to Lerian backend APIs.
# For live API access, use Lerian SDKs in your application.
#
# Copy this file to .env and configure your values
# SECURITY: Never commit .env files to version control
# ===========================================
# SECURITY CONFIGURATION
# ===========================================
# ⚠️ CRITICAL: Pagination Cursor Signing Secret (REQUIRED for production)
# Used to cryptographically sign pagination cursors (MED-005 fix)
# Generate with: openssl rand -hex 32
# OR: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
#
# IMPORTANT:
# - Must be 64 characters (32 bytes hex-encoded)
# - Must be the same across ALL server instances (load balancer, replicas)
# - Changing this value invalidates all existing pagination cursors
# - Without this, pagination breaks on every restart
#
# Example: 7f4e9c8a2b1d6f3e5a8c9d2b4f7e1a3c5b8d9e2f4a7c1b6d3e8f5a9c2d4b7e1a
CURSOR_SECRET=
# ⚠️ CRITICAL: Cache Encryption Key (REQUIRED if caching enabled)
# Used to encrypt cached OAuth tokens and API responses
# Generate with: openssl rand -hex 32
# OR: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
#
# IMPORTANT:
# - Must be 64 characters (32 bytes hex-encoded)
# - Changing this value invalidates all cached data
# - Server will generate random key if not set (breaks cache on restart)
#
# Example: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b
CACHE_ENCRYPTION_KEY=
# ===========================================
# DOCUMENTATION CONFIGURATION
# ===========================================
# Documentation service URL
LERIAN_DOCS_URL=https://docs.lerian.studio
# Legacy alias (backward compatibility)
MIDAZ_DOCS_URL=https://docs.lerian.studio
# ===========================================
# SERVER CONFIGURATION
# ===========================================
# Logging verbosity (error, warn, info, debug)
LOG_LEVEL=info
# Enable detailed request/response logging
DETAILED_LOGS=false
# Enable console output for logs
CONSOLE_LOGS=true
# ===========================================
# DEVELOPMENT & DEBUGGING
# ===========================================
# Node.js environment
NODE_ENV=development
# Enable debug logging for specific modules
# DEBUG=lerian:*
# DEBUG=midaz:*
# ===========================================
# LOGGING & METRICS CONFIGURATION
# ===========================================
# Error logging to files (opt-in, disabled by default)
ERROR_LOGGING=false
# Performance tracking (opt-in, disabled by default)
PERFORMANCE_TRACKING=false
# Audit logging (opt-in, disabled by default)
AUDIT_LOGGING=false
# Metrics flushing to file (opt-in, disabled by default)
# When enabled, metrics are saved to ./logs/metrics-snapshot.json every 5 minutes
METRICS_FLUSH_ENABLED=false
# ===========================================
# MONITORING & OBSERVABILITY
# ===========================================
# Health check settings for MCP server
HEALTH_CHECK_INTERVAL=30000
HEALTH_CHECK_TIMEOUT=5000
# Optional: External monitoring services
# SENTRY_DSN=your_sentry_dsn_here
# DATADOG_API_KEY=your_datadog_api_key_here