# n8n Documentation MCP Server Configuration # ==================== # COMMON CONFIGURATION # ==================== # Database Configuration # For local development: ./data/nodes.db # For Docker: /app/data/nodes.db NODE_DB_PATH=./data/nodes.db # Logging Level (debug, info, warn, error) MCP_LOG_LEVEL=info # Node Environment (development, production) NODE_ENV=development # Rebuild database on startup (true/false) REBUILD_ON_START=false # ========================= # LOCAL MODE CONFIGURATION # ========================= # Used when running: npm run start:v2 or npm run dev:v2 # Local MCP Server Configuration MCP_SERVER_PORT=3000 MCP_SERVER_HOST=localhost # MCP_AUTH_TOKEN=optional-for-local-development # ========================= # HTTP MODE CONFIGURATION # ========================= # Used when running: npm run start:http or npm run dev:http # HTTP Server Configuration MCP_PORT=3000 MCP_HOST=0.0.0.0 MCP_DOMAIN=localhost # Authentication (REQUIRED for production HTTP mode) # Generate a secure token: openssl rand -hex 32 # MCP_AUTH_TOKEN=your-secure-auth-token-here # CORS - Enable for browser-based access MCP_CORS=false # TLS Configuration (optional for HTTPS) # MCP_TLS_CERT=/path/to/cert.pem # MCP_TLS_KEY=/path/to/key.pem