.env.exampleā¢3.77 kB
# MySQL MCP WebUI - Environment Configuration Example
# Copy this file to .env and configure for your environment
# =============================================================================
# TRANSPORT MODE
# =============================================================================
# Transport mode: 'stdio' or 'http'
# - stdio: For Claude Desktop integration (direct IPC)
# - http: For remote access via HTTP/HTTPS API
TRANSPORT=http
# =============================================================================
# HTTP SERVER CONFIGURATION
# =============================================================================
# Port for HTTP server
HTTP_PORT=9274
# =============================================================================
# HTTPS/TLS CONFIGURATION (Optional)
# =============================================================================
# Enable HTTPS
ENABLE_HTTPS=false
# Paths to SSL certificate and key files
# For Let's Encrypt certificates:
# SSL_CERT_PATH=/etc/letsencrypt/live/yourdomain.com/fullchain.pem
# SSL_KEY_PATH=/etc/letsencrypt/live/yourdomain.com/privkey.pem
# For self-signed certificates (development):
# SSL_CERT_PATH=/path/to/cert.pem
# SSL_KEY_PATH=/path/to/key.pem
SSL_CERT_PATH=
SSL_KEY_PATH=
# =============================================================================
# RATE LIMITING
# =============================================================================
# Enable rate limiting (recommended for production)
RATE_LIMIT_ENABLED=true
# Rate limit window in milliseconds (default: 15 minutes)
RATE_LIMIT_WINDOW_MS=900000
# Maximum requests per window (default: 100)
RATE_LIMIT_MAX_REQUESTS=1000
# =============================================================================
# ENVIRONMENT
# =============================================================================
# Node environment: 'development' or 'production'
NODE_ENV=production
# =============================================================================
# AUTHENTICATION
# =============================================================================
# Two authentication systems:
# 1. JWT (for WebUI users) - username/password login
# 2. API Keys (for MCP tools and programmatic access)
# --- JWT Authentication (WebUI only) ---
# JWT Secret for signing tokens (minimum 32 characters)
# Generate: openssl rand -base64 32
# Used for username/password authentication in the WebUI
# Optional in development HTTP mode (auto-generates default with warning)
# REQUIRED in production HTTP mode
# NOT used in stdio mode (MCP uses API keys instead)
JWT_SECRET=
# JWT token expiration time (default: 7d)
# Examples: 1h, 24h, 7d, 30d
JWT_EXPIRES_IN=30d
# --- API Key Authentication (MCP stdio mode only) ---
# API key for MCP authentication when running in stdio mode
# Only required if TRANSPORT=stdio (for Claude Desktop integration)
# Generate: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# Add this to your Claude Desktop config's mcpServers section
# Not used in HTTP mode (HTTP mode uses JWT for WebUI, API keys managed in WebUI)
AUTH_TOKEN=
# =============================================================================
# DOCKER-SPECIFIC (for docker-compose)
# =============================================================================
# Directory containing SSL certificates
SSL_CERT_DIR=./certs
# =============================================================================
# NOTES
# =============================================================================
# Default WebUI Credentials (first login):
# Username: admin
# Password: admin
# You will be forced to change the password on first login for security
#
# Authentication always required (no localhost bypass for security)