Environment Variables
Configure your S3 Documentation MCP server using environment variables in your .env file.
Quick Setup
Section titled “Quick Setup”cp env.example .envThen edit .env with your specific configuration.
Essential Variables
Section titled “Essential Variables”S3 Configuration
Section titled “S3 Configuration”# Your S3 bucket nameS3_BUCKET_NAME=your-bucket-name
# S3 access credentialsS3_ACCESS_KEY_ID=your-access-keyS3_SECRET_ACCESS_KEY=your-secret-key
# AWS region (e.g., us-east-1, eu-west-1)S3_REGION=us-east-1
# Optional: Custom S3 endpoint for non-AWS providers# Leave empty for AWS S3S3_ENDPOINT=Examples for Different Providers
Section titled “Examples for Different Providers”AWS S3:
S3_ENDPOINT=S3_REGION=us-east-1MinIO:
S3_ENDPOINT=https://minio.example.comS3_REGION=us-east-1 # Can be any valueScaleway:
S3_ENDPOINT=https://s3.fr-par.scw.cloudS3_REGION=fr-parCloudflare R2:
S3_ENDPOINT=https://<account-id>.r2.cloudflarestorage.comS3_REGION=autoEmbedding Provider
Section titled “Embedding Provider”Choose your embedding provider:
# ollama (default) or openaiEMBEDDING_PROVIDER=ollamaFor Ollama (Local):
OLLAMA_BASE_URL=http://localhost:11434OLLAMA_EMBEDDING_MODEL=nomic-embed-textFor OpenAI (Cloud):
OPENAI_API_KEY=sk-...your-key...OPENAI_EMBEDDING_MODEL=text-embedding-3-small # or text-embedding-3-largeSee Embedding Providers for detailed comparison.
Optional Variables
Section titled “Optional Variables”Server Configuration
Section titled “Server Configuration”# Server port (default: 3000)PORT=3000
# Server host (default: 0.0.0.0)HOST=0.0.0.0RAG Configuration
Section titled “RAG Configuration”# Number of results returned by search (default: 4)RAG_MAX_RESULTS=4
# Chunk size for document splitting (default: 1000)RAG_CHUNK_SIZE=1000
# Overlap between chunks (default: 200)RAG_CHUNK_OVERLAP=200Synchronization
Section titled “Synchronization”# Sync mode: startup (default), periodic, or manualSYNC_MODE=startup
# For periodic mode: interval in minutes (default: 60)SYNC_INTERVAL_MINUTES=60See Synchronization Modes for details.
Security
Section titled “Security”# Enable API key authentication (default: false)ENABLE_AUTH=false
# API key for authentication (required if ENABLE_AUTH=true)MCP_API_KEY=your-secret-key-hereSee Security & Authentication for details.
Vector Store
Section titled “Vector Store”# Path to store vector indices (default: ./data/hnswlib-store)VECTOR_STORE_PATH=./data/hnswlib-storeComplete Example
Section titled “Complete Example”Here’s a complete .env file example:
# S3 ConfigurationS3_BUCKET_NAME=my-docs-bucketS3_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLES3_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEYS3_REGION=us-east-1S3_ENDPOINT=
# Embedding Provider (Ollama - Local)EMBEDDING_PROVIDER=ollamaOLLAMA_BASE_URL=http://localhost:11434OLLAMA_EMBEDDING_MODEL=nomic-embed-text
# ServerPORT=3000HOST=0.0.0.0
# RAG ConfigurationRAG_MAX_RESULTS=4RAG_CHUNK_SIZE=1000RAG_CHUNK_OVERLAP=200
# SynchronizationSYNC_MODE=startupSYNC_INTERVAL_MINUTES=60
# Security (disabled by default)ENABLE_AUTH=false# MCP_API_KEY=
# Vector StoreVECTOR_STORE_PATH=./data/hnswlib-storeEnvironment-Specific Configuration
Section titled “Environment-Specific Configuration”Development
Section titled “Development”EMBEDDING_PROVIDER=ollamaSYNC_MODE=manualENABLE_AUTH=falseProduction
Section titled “Production”EMBEDDING_PROVIDER=openaiSYNC_MODE=periodicSYNC_INTERVAL_MINUTES=30ENABLE_AUTH=trueMCP_API_KEY=<strong-random-key>Validation
Section titled “Validation”The server validates your configuration on startup and will:
- ✅ Show clear error messages for missing required variables
- ✅ Warn about invalid values
- ✅ Fall back to safe defaults where possible
- ✅ Test S3 connectivity on startup