# Crawl4AI MCP Server Environment Configuration # Copy this file to .env and fill in your actual API keys # ============================================================================= # LLM Provider API Keys # ============================================================================= # OpenAI API Key # Get from: https://platform.openai.com/api-keys OPENAI_API_KEY=sk-proj-your-openai-api-key-here # Anthropic API Key # Get from: https://console.anthropic.com/ ANTHROPIC_API_KEY=sk-ant-your-anthropic-api-key-here # Azure OpenAI Configuration # Get from: https://portal.azure.com/ AZURE_OPENAI_API_KEY=your-azure-openai-api-key-here AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com # ============================================================================= # YouTube Transcript Extraction Configuration # ============================================================================= # No configuration required for YouTube transcript extraction! # The youtube-transcript-api v1.1.0+ works out of the box without any API keys or authentication. # Simply use the YouTube transcript extraction tools directly. # ============================================================================= # Search and External API Configuration # ============================================================================= # Google Search API Configuration # ============================================================================= # Option 1: Default (googlesearch-python only) - No configuration needed # Option 2: Custom Search API only - Set GOOGLE_SEARCH_MODE=custom_search_only # Option 3: Hybrid (fallback) - Set GOOGLE_SEARCH_MODE=hybrid (default) # Custom Search API Credentials (Required for custom search functionality) # Get API key from: https://console.cloud.google.com/apis/credentials # Create search engine at: https://cse.google.com/cse/ GOOGLE_SEARCH_API_KEY=your-google-search-api-key-here GOOGLE_SEARCH_ENGINE_ID=your-custom-search-engine-id-here # Search API Mode Configuration # "googlesearch_only": Use only googlesearch-python library (default behavior) # "custom_search_only": Use only Google Custom Search API # "hybrid": Use googlesearch-python with Custom Search API fallback (recommended) GOOGLE_SEARCH_MODE=hybrid # Rate Limiting Configuration # Maximum requests per minute for each search method GOOGLESEARCH_PYTHON_RPM=60 CUSTOM_SEARCH_API_RPM=100 # Retry Configuration # Maximum retries before giving up on a search method GOOGLE_SEARCH_MAX_RETRIES=3 # Fallback delay (seconds) before switching to alternative method GOOGLE_SEARCH_FALLBACK_DELAY=2 # ============================================================================= # Application Configuration # ============================================================================= # MCP Server Configuration FASTMCP_LOG_LEVEL=INFO # Python Path (adjust for your environment) # PYTHONPATH=/path/to/your/venv/lib/python3.10/site-packages # ============================================================================= # Security Notes # ============================================================================= # - Never commit this file with real API keys # - Use environment-specific .env files (.env.development, .env.production) # - Regularly rotate your API keys for security # - Check API usage and quotas regularly