# Presearch MCP Server Configuration
# Copy this file to .env and fill in your values
# ===========================
# REQUIRED: Presearch API Key
# ===========================
# Get your free API key at: https://presearch.com/
# The API key is required for all search operations
PRESEARCH_API_KEY=your_presearch_api_key_here
# ===========================
# OPTIONAL: API Configuration
# ===========================
# Presearch API Base URL (default: https://na-us-1.presearch.com)
# Uncomment to use a different Presearch node
# PRESEARCH_BASE_URL=https://na-us-1.presearch.com
# Request timeout in milliseconds (default: 10000, range: 1000-30000)
# Increase for slower connections or complex queries
# PRESEARCH_TIMEOUT=10000
# Number of retry attempts for failed requests (default: 3, range: 0-5)
# Presearch API automatically retries on network errors and rate limits
# PRESEARCH_RETRIES=3
# ===========================
# OPTIONAL: Rate Limiting
# ===========================
# Maximum requests per time window (default: 100 requests per 60 seconds)
# Adjust based on your Presearch API plan limits
# RATE_LIMIT_MAX_REQUESTS=100
# RATE_LIMIT_WINDOW_MS=60000
# ===========================
# OPTIONAL: Caching
# ===========================
# Enable in-memory caching for improved performance (default: true)
# CACHE_ENABLED=true
# Cache TTL in seconds (default: 300, range: 60-86400)
# Higher values reduce API calls but may return stale results
# CACHE_TTL=300
# Maximum number of cached entries (default: 1000, range: 100-10000)
# Increase for high-volume usage
# CACHE_MAX_KEYS=1000
# ===========================
# OPTIONAL: Search Configuration
# ===========================
# Maximum search results per query (default: 50, range: 10-100)
# SEARCH_MAX_RESULTS=50
# Safe search filter level (default: moderate, options: off, moderate, strict)
# PRESEARCH_SAFE_SEARCH=moderate
# Default language for searches (default: en-US, format: en or en-US)
# PRESEARCH_DEFAULT_LANGUAGE=en-US
# ===========================
# OPTIONAL: Logging
# ===========================
# Log level (default: info, options: error, warn, info, debug)
# Use 'debug' for troubleshooting, 'error' for production
# LOG_LEVEL=info
# Pretty print logs for development (default: false)
# Set to true for human-readable logs, false for JSON
# LOG_PRETTY=false
# ===========================
# OPTIONAL: Server Configuration
# ===========================
# Server port (default: 3000, range: 1000-65535)
# PORT=3000
# ===========================
# EXAMPLE: Complete Configuration
# ===========================
# PRESEARCH_API_KEY=your_api_key_here
# PRESEARCH_BASE_URL=https://na-us-1.presearch.com
# PRESEARCH_TIMEOUT=10000
# PRESEARCH_RETRIES=3
# RATE_LIMIT_MAX_REQUESTS=100
# RATE_LIMIT_WINDOW_MS=60000
# CACHE_ENABLED=true
# CACHE_TTL=300
# CACHE_MAX_KEYS=1000
# SEARCH_MAX_RESULTS=50
# PRESEARCH_SAFE_SEARCH=moderate
# PRESEARCH_DEFAULT_LANGUAGE=en-US
# LOG_LEVEL=info
# LOG_PRETTY=false
# PORT=3000