# ═══════════════════════════════════════════════════════════════════════════
# Domain Search MCP - Environment Configuration
# ═══════════════════════════════════════════════════════════════════════════
# Copy this file to .env and fill in your API keys.
# All API keys are OPTIONAL - the server works without them using RDAP/WHOIS.
# ═══════════════════════════════════════════════════════════════════════════
# ─────────────────────────────────────────────────────────────────────────────
# PRICING BACKEND (Recommended)
# This MCP never ships registrar secrets. Pricing is retrieved from your backend.
# Example: https://domain-search-web-zeta.vercel.app
# ─────────────────────────────────────────────────────────────────────────────
PRICING_API_BASE_URL=
# Optional: bearer token if your backend is protected
PRICING_API_TOKEN=
PRICING_API_TIMEOUT_MS=2500
PRICING_API_MAX_QUOTES_SEARCH=5
PRICING_API_MAX_QUOTES_BULK=10
PRICING_API_CONCURRENCY=4
# ─────────────────────────────────────────────────────────────────────────────
# AI-POWERED SUGGESTIONS - ZERO-CONFIG!
# Works out of the box with our public VPS running fine-tuned Qwen 7B-DPO.
# No API key needed - just install and use!
#
# Optional: Override the default inference endpoint for custom setups:
# ─────────────────────────────────────────────────────────────────────────────
# QWEN_INFERENCE_ENDPOINT=http://your-server:8000
# Optional: API key if you secure your inference server
# QWEN_API_KEY=
# Timeout for inference requests (15 seconds default for CPU inference)
QWEN_TIMEOUT_MS=15000
# Number of retries on 5xx errors or timeouts
QWEN_MAX_RETRIES=2
# ─────────────────────────────────────────────────────────────────────────────
# AI-POWERED SUGGESTIONS - DEPRECATED: Together.ai (BYOK only)
# Legacy support for users who have their own API key.
# Not required for normal usage - VPS inference is the default.
# Get API key: https://api.together.xyz
# ─────────────────────────────────────────────────────────────────────────────
TOGETHER_API_KEY=
# Timeout for inference requests (30 seconds)
TOGETHER_TIMEOUT_MS=30000
# Number of retries on 5xx errors or timeouts
TOGETHER_MAX_RETRIES=2
# Model to use (options: qwen3-14b-instruct, qwen2.5-72b)
TOGETHER_DEFAULT_MODEL=qwen3-14b-instruct
# ─────────────────────────────────────────────────────────────────────────────
# OPTIONAL BYOK (Local) - not required for zero-config usage
# These are used only if PRICING_API_BASE_URL is not set.
# ─────────────────────────────────────────────────────────────────────────────
PORKBUN_API_KEY=your_api_key_here
PORKBUN_API_SECRET=your_api_secret_here
NAMECHEAP_API_KEY=your_api_key_here
NAMECHEAP_API_USER=your_username_here
NAMECHEAP_CLIENT_IP=your_whitelisted_ip_here
# ─────────────────────────────────────────────────────────────────────────────
# LOGGING & DEBUG
# ─────────────────────────────────────────────────────────────────────────────
LOG_LEVEL=info # debug | info | warn | error
# ─────────────────────────────────────────────────────────────────────────────
# CACHE SETTINGS (in seconds)
# ─────────────────────────────────────────────────────────────────────────────
CACHE_TTL_AVAILABILITY=300 # 5 minutes - availability can change
CACHE_TTL_PRICING=3600 # 1 hour - pricing rarely changes
CACHE_TTL_SEDO=3600 # 1 hour - Sedo auctions feed cache
CACHE_TTL_AFTERMARKET_NS=300 # 5 minutes - nameserver lookup cache
# ─────────────────────────────────────────────────────────────────────────────
# REDIS DISTRIBUTED CACHE (Optional)
# Enable shared caching across multiple MCP instances for horizontal scaling.
# Without Redis, uses in-memory cache (works fine for single instances).
# ─────────────────────────────────────────────────────────────────────────────
# REDIS_URL=redis://:password@host:6379 # Format: redis://[:password@]host:port
# ─────────────────────────────────────────────────────────────────────────────
# RATE LIMITING
# ─────────────────────────────────────────────────────────────────────────────
RATE_LIMIT_PER_MINUTE=60 # Max requests per minute
# ─────────────────────────────────────────────────────────────────────────────
# TLD RESTRICTIONS (comma-separated, no spaces)
# ─────────────────────────────────────────────────────────────────────────────
ALLOWED_TLDS=com,io,dev,app,co,net,org,xyz,ai,sh,me,cc
DENY_TLDS=localhost,internal,test,local
# ─────────────────────────────────────────────────────────────────────────────
# AFTERMARKET (Sedo public feed)
# ─────────────────────────────────────────────────────────────────────────────
SEDO_FEED_ENABLED=true
SEDO_FEED_URL=https://sedo.com/txt/auctions_us.txt
AFTERMARKET_NS_ENABLED=true
AFTERMARKET_NS_TIMEOUT_MS=1500
# ─────────────────────────────────────────────────────────────────────────────
# FEDERATED NEGATIVE CACHE (Optional)
# Pre-filter taken domains to reduce availability API calls.
# Reports taken domains to a central cache shared across all MCP users.
# ─────────────────────────────────────────────────────────────────────────────
NEGATIVE_CACHE_ENABLED=false # Enable federated negative cache
NEGATIVE_CACHE_URL= # Backend API URL (e.g., https://your-vps.com/api/v1)
NEGATIVE_CACHE_TOKEN= # Optional: bearer token for authentication
NEGATIVE_CACHE_TIMEOUT_MS=2000 # Request timeout
NEGATIVE_CACHE_BATCH_SIZE=50 # Batch size for reporting taken domains
NEGATIVE_CACHE_DEBOUNCE_MS=5000 # Debounce time for batch reporting
NEGATIVE_CACHE_LOCAL_TTL=3600 # Local query cache TTL (1 hour)
NEGATIVE_CACHE_CONCURRENCY=2 # Max concurrent API requests
# ─────────────────────────────────────────────────────────────────────────────
# HTTP TRANSPORT (for ChatGPT, web clients, LM Studio)
# By default, the server uses stdio for Claude Desktop/Cursor/VS Code.
# Use --http flag or set MCP_TRANSPORT=http to enable HTTP mode.
# ─────────────────────────────────────────────────────────────────────────────
# MCP_TRANSPORT=http # 'stdio' (default) | 'http'
# MCP_PORT=3000 # HTTP server port
# MCP_HOST=0.0.0.0 # HTTP server host (0.0.0.0 = all interfaces)
# CORS_ORIGINS=* # Comma-separated allowed origins (default: *)
# ─────────────────────────────────────────────────────────────────────────────
# DEVELOPMENT ONLY
# ─────────────────────────────────────────────────────────────────────────────
DRY_RUN=false # If true, no actual API calls made