# YNAB MCP Server Environment Configuration
# Copy this file to .env and fill in your actual values
# Required: Your YNAB Personal Access Token
# Get this from: https://app.youneedabudget.com/settings/developer
YNAB_ACCESS_TOKEN=your_ynab_personal_access_token_here
# Optional: Node.js environment (development, production, test)
NODE_ENV=development
# Optional: Logging level (error, warn, info, debug)
LOG_LEVEL=info
# Export settings
# Directory where exported transaction files are saved
# Default: Windows/Mac = ~/Downloads, Linux/Unix = ~/Documents (or $XDG_DOCUMENTS_DIR)
# Examples: C:\Users\YourName\Desktop, /home/user/exports, ./data, ~/Desktop
YNAB_EXPORT_PATH=
# Cache configuration
# Maximum number of entries in the in-memory cache (default: 1000)
# Set to 0 to disable caching entirely
YNAB_MCP_CACHE_MAX_ENTRIES=1000
# Default time-to-live for cache entries in milliseconds (default: 300000 = 5 minutes)
YNAB_MCP_CACHE_DEFAULT_TTL_MS=300000
# Default stale-while-revalidate window in milliseconds (default: 120000 = 2 minutes)
# Used when stale-while-revalidate is explicitly requested but not specified
YNAB_MCP_CACHE_STALE_MS=120000
# Delta Request Feature Flag (Optional)
# Enable delta requests to reduce API response sizes and improve performance
# When enabled, the server tracks server_knowledge values and requests only
# changes since the last fetch (deltas) instead of full datasets
# Default: false (disabled for safety during initial rollout)
# Set to 'true' to enable delta requests
YNAB_MCP_ENABLE_DELTA=false