# Market Sizing MCP Server - Environment Configuration
# Copy this file to .env and configure your environment variables
# ================================
# Server Configuration
# ================================
PORT=3000
HOST=0.0.0.0
NODE_ENV=development
# ================================
# CORS Configuration
# ================================
# Set to specific origins in production, e.g., "https://your-client-app.com"
CORS_ORIGIN=*
# ================================
# Rate Limiting
# ================================
# Rate limit window in milliseconds (15 minutes = 900000)
RATE_LIMIT_WINDOW_MS=900000
# Maximum requests per window
RATE_LIMIT_MAX=100
# ================================
# Caching Configuration
# ================================
# Cache TTL in seconds (5 minutes = 300)
CACHE_TTL=300
# Cache check period in seconds (10 minutes = 600)
CACHE_CHECK_PERIOD=600
# ================================
# Session Configuration
# ================================
# IMPORTANT: Change this secret in production!
SESSION_SECRET=mcp-server-secret-key-change-in-production
# Session max age in milliseconds (1 hour = 3600000)
SESSION_MAX_AGE=3600000
# ================================
# API Keys for Data Providers
# ================================
# Add your market data provider API keys here
# These are used to fetch real market data instead of mock data
# Free/Public Data Sources (Recommended)
BLS_API_KEY=your_bls_api_key_here # Optional - U.S. Bureau of Labor Statistics
CENSUS_API_KEY=your_census_api_key_here # Required - U.S. Census Bureau
FRED_API_KEY=your_fred_api_key_here # Required - Federal Reserve Economic Data
ALPHA_VANTAGE_API_KEY=your_alpha_vantage_api_key_here # Required - Stock market data
# Note: Nasdaq Data Link API currently experiencing access restrictions (403)
# May require subscription update or different authentication method
NASDAQ_DATA_LINK_API_KEY=your_nasdaq_api_key_here # Note: Currently restricted
# Data Sources That Don't Require API Keys
# World Bank: Public access
# OECD: Public access
# IMF: Public access
# Example market data providers (uncomment and configure as needed):
# MARKET_DATA_API_KEY=your_market_data_api_key_here
# INDUSTRY_ANALYSIS_API_KEY=your_industry_analysis_api_key_here
# IBISWorld API (for industry reports)
# IBISWORLD_API_KEY=your_ibisworld_api_key
# Statista API (for market statistics)
# STATISTA_API_KEY=your_statista_api_key
# Grand View Research API (for market reports)
# GRAND_VIEW_RESEARCH_API_KEY=your_grand_view_research_api_key
# Bloomberg API (for financial and market data)
# BLOOMBERG_API_KEY=your_bloomberg_api_key
# PitchBook API (for private market data)
# PITCHBOOK_API_KEY=your_pitchbook_api_key
# ================================
# Logging Configuration
# ================================
# Log level: error, warn, info, debug, verbose
LOG_LEVEL=info
# Log format: json, simple
LOG_FORMAT=json
# ================================
# Monitoring & Metrics
# ================================
# Enable Prometheus metrics collection
PROMETHEUS_ENABLED=true
# Collect default Node.js metrics
COLLECT_DEFAULT_METRICS=true
# ================================
# Database Configuration (Optional)
# ================================
# If you want to use a database for persistent storage instead of in-memory cache
# DATABASE_URL=postgresql://username:password@localhost:5432/market_sizing_mcp
# DATABASE_TYPE=postgresql
# DATABASE_HOST=localhost
# DATABASE_PORT=5432
# DATABASE_NAME=market_sizing_mcp
# DATABASE_USER=username
# DATABASE_PASSWORD=password
# ================================
# Redis Configuration (Optional)
# ================================
# If you want to use Redis for distributed caching
# REDIS_URL=redis://localhost:6379
# REDIS_HOST=localhost
# REDIS_PORT=6379
# REDIS_PASSWORD=your_redis_password
# REDIS_DB=0
# ================================
# External Service URLs (Optional)
# ================================
# Configure external services for real data integration
# EXTERNAL_MARKET_DATA_BASE_URL=https://api.marketdata.com/v1
# EXTERNAL_INDUSTRY_ANALYSIS_BASE_URL=https://api.industryanalysis.com/v2
# ================================
# Development Configuration
# ================================
# Enable detailed request/response logging in development
DEBUG_REQUESTS=false
# Enable performance profiling
ENABLE_PROFILING=false
# Mock data instead of real API calls (useful for development/testing)
USE_MOCK_DATA=true
# ================================
# Security Configuration
# ================================
# Enable additional security headers
ENABLE_SECURITY_HEADERS=true
# Enable request ID tracking
ENABLE_REQUEST_ID=true
# Maximum request body size
MAX_REQUEST_SIZE=10mb
# ================================
# Feature Flags
# ================================
# Enable real-time streaming updates via SSE
ENABLE_SSE_STREAMING=true
# Enable WebSocket support (future feature)
ENABLE_WEBSOCKET=false
# Enable API versioning
ENABLE_API_VERSIONING=true