# Weather MCP Server Environment Variables # # This server uses: # - NOAA Weather API (for US forecasts and current conditions) - No API key required # - Open-Meteo API (for international forecasts, historical data, air quality, marine) - No API key required # - NOAA NCEI (optional, for official US climate normals) - Free API token available # # All environment variables are OPTIONAL with sensible defaults. # Copy this file to .env and customize as needed. # ============================================================================ # TOOL CONFIGURATION (v1.5.0) # ============================================================================ # Control which MCP tools are exposed to reduce context overhead # Default: 'basic' (5 core tools) # # Available Presets: # basic - Essential tools: forecast, current_conditions, alerts, search_location, check_service_status # standard - Basic + historical_weather # full - Standard + air_quality # all - All 10 tools including marine_conditions, weather_imagery, lightning_activity # # Syntax Options: # ENABLED_TOOLS=full # Use preset # ENABLED_TOOLS=forecast,current,alerts # Specific tools only # ENABLED_TOOLS=basic,+historical,+air_quality # Add to preset # ENABLED_TOOLS=all,-marine # Remove from preset # ENABLED_TOOLS=standard,+imagery,+lightning # Complex combinations # # Tool Aliases (short names): # forecast, current, conditions, alerts, warnings, historical, history, # status, location, search, air_quality, aqi, marine, ocean, waves, # imagery, radar, satellite, lightning, strikes, thunderstorm # ENABLED_TOOLS=basic # ============================================================================ # CACHE CONFIGURATION # ============================================================================ # Enable/disable in-memory caching (default: true) # Caching reduces API calls by 50-80% and improves response times CACHE_ENABLED=true # Maximum number of entries in cache before LRU eviction (default: 1000) # Range: 100-10000 # Higher values = more memory usage but better cache hit rates CACHE_MAX_SIZE=1000 # ============================================================================ # API CONFIGURATION # ============================================================================ # API request timeout in milliseconds (default: 30000 = 30 seconds) # Range: 5000-120000 (5 seconds to 2 minutes) # Increase if you experience timeout errors on slow connections API_TIMEOUT_MS=30000 # ============================================================================ # LIGHTNING DETECTION (v1.5.0) # ============================================================================ # MQTT broker URL for Blitzortung lightning detection # Default: mqtt://blitzortung.ha.sed.pl:1883 (public community broker, unencrypted) # # SECURITY NOTE: The default broker uses unencrypted MQTT (port 1883) as the public # Blitzortung community broker does not currently support TLS connections. Lightning # strike data is public information, and your location privacy is protected via geohash # subscriptions (precision ~4-40km, not exact coordinates). # # For enhanced security, you can configure an alternative MQTT broker with TLS support: # BLITZORTUNG_MQTT_URL=mqtts://your-secure-broker:8883 # BLITZORTUNG_MQTT_URL=wss://your-secure-broker:443/mqtt # # BLITZORTUNG_MQTT_URL=mqtt://blitzortung.ha.sed.pl:1883 # ============================================================================ # API TOKENS (Optional) # ============================================================================ # NOAA NCEI API Token (v1.2.0) # Optional token for official US climate normals data # Without this token, the server uses Open-Meteo computed normals (completely free, global coverage) # Get a free token at: https://www.ncdc.noaa.gov/cdo-web/token # If configured but unavailable, automatically falls back to Open-Meteo # # NCEI_API_TOKEN=your_token_here # ============================================================================ # LOGGING # ============================================================================ # Log level: 0=DEBUG, 1=INFO, 2=WARN, 3=ERROR (default: 1) # Lower values = more verbose logging LOG_LEVEL=1 # ============================================================================ # ANALYTICS (v1.7.0) - Privacy-First Usage Tracking # ============================================================================ # Anonymous, privacy-first analytics to help improve the Weather MCP Server # Default: DISABLED (opt-in only) # # PRIVACY GUARANTEE: # - NO personal information collected (no coordinates, locations, or user input) # - NO IP addresses or identifying data # - All data anonymized before leaving your machine # - Full transparency: https://github.com/weather-mcp/weather-mcp/blob/main/docs/ANALYTICS_MCP_PLAN.md # # To enable analytics (help improve the project): # ANALYTICS_ENABLED=true ANALYTICS_ENABLED=false # Analytics detail level: minimal, standard, detailed (default: minimal) # # minimal - Tool name, success/error, hourly timestamp only # standard - Adds: response time, service used, cache hits, region (US/CA/EU/etc) # detailed - Adds: anonymized parameters, workflow sequences (helps identify common patterns) # # All levels maintain strict privacy - NO PII, coordinates, or location names ANALYTICS_LEVEL=minimal # Analytics server endpoint (default: https://analytics.weather-mcp.com/v1/events) # Only change if self-hosting or for testing # NOTE: Must use HTTPS for security (HTTP endpoints will be rejected) # ANALYTICS_ENDPOINT=https://your-analytics-server.com/v1/events # Session ID salt (optional, for detailed level) # Used to create one-way hash of session IDs - cannot be reversed # Default: automatic random salt per session # ANALYTICS_SALT=your-custom-salt-here # ============================================================================ # NOTES # ============================================================================ # - No API keys are required for basic functionality # - NOAA and Open-Meteo APIs are completely free with no authentication # - NCEI token is only needed if you want official US climate normals # - All settings have sensible defaults and can be omitted # - Environment variables can also be set in your MCP client configuration