# =============================================================================
# Dolibarr MCP Server - Environment Configuration
# Version 2.1.0
# =============================================================================
# Copy this file to .env and configure your settings
# -----------------------------------------------------------------------------
# Dolibarr API Configuration (Required)
# -----------------------------------------------------------------------------
DOLIBARR_URL=https://your-dolibarr-instance.com/api/index.php
DOLIBARR_API_KEY=your_api_key_here
# -----------------------------------------------------------------------------
# Cache Configuration (DragonflyDB/Redis)
# -----------------------------------------------------------------------------
# Enable/disable caching (default: true)
CACHE_ENABLED=true
# DragonflyDB connection settings (used when running outside Docker)
# Inside Docker, these are automatically set to connect to the dragonfly service
DRAGONFLY_HOST=localhost
DRAGONFLY_PORT=6379
DRAGONFLY_PASSWORD=
# -----------------------------------------------------------------------------
# Output Format Configuration
# -----------------------------------------------------------------------------
# Output format: toon (default, ~60% token savings) or json
OUTPUT_FORMAT=toon
# -----------------------------------------------------------------------------
# Logging Configuration
# -----------------------------------------------------------------------------
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL=INFO
# -----------------------------------------------------------------------------
# MCP Server Configuration
# -----------------------------------------------------------------------------
# Transport mode: stdio (for CLI) or http (for web/API)
MCP_TRANSPORT=http
# HTTP server settings
MCP_HTTP_PORT=8080
MCP_HTTP_HOST=0.0.0.0
# External port mapping (for Docker)
MCP_EXTERNAL_PORT=18004
# -----------------------------------------------------------------------------
# MCP Authentication (API Key Security)
# -----------------------------------------------------------------------------
# Enable/disable API key authentication (default: true)
MCP_AUTH_ENABLED=true
# Single API key for authentication
# Generate a secure key with: python -c "import secrets; print(secrets.token_hex(32))"
MCP_API_KEY=your_secure_api_key_here
# Multiple API keys (comma-separated) - alternative to MCP_API_KEY
# MCP_API_KEYS=key1,key2,key3
# Rate limiting: requests per minute per key (default: 100)
# MCP_RATE_LIMIT=100
# -----------------------------------------------------------------------------
# Optional: Redis Commander UI
# -----------------------------------------------------------------------------
# Port for Redis Commander web UI (used with --profile monitoring)
REDIS_COMMANDER_PORT=8081
# -----------------------------------------------------------------------------
# Docker Resource Limits (adjust based on your needs)
# -----------------------------------------------------------------------------
# These are configured in docker-compose.yml but can be overridden
# MCP_MEMORY_LIMIT=512M
# MCP_CPU_LIMIT=1.0
# CACHE_MEMORY_LIMIT=300M
# CACHE_CPU_LIMIT=0.5