Environment Variables
Pcnaid MCP Hub uses environment variables for configuration. This guide covers all available variables and their usage.Core Application Settings
Server Configuration
Authentication & Security
Admin Password
JWT Configuration
Smart Routing & Embeddings
Embedding Configuration
Configuration Examples
Development Environment
Production Environment
Docker Environment
Environment Variable Loading
Pcnaid MCP Hub loads environment variables in the following order:- System environment variables
.env.local(ignored by git).env.{NODE_ENV}(e.g.,.env.production).env
Using dotenv-expand
Pcnaid MCP Hub supports variable expansion:Security Best Practices
- Never commit secrets to version control
- Use strong, unique secrets for production
- Rotate secrets regularly
- Use environment-specific files
- Validate all environment variables at startup
- Use Docker secrets for container deployments