Skip to main content
Glama
.env.example7.27 kB
# ThoughtMCP Environment Configuration # ============================================================================ # This file is the SINGLE SOURCE OF TRUTH for all configuration values. # Copy this file to .env and configure for your environment. # # Docker Compose files reference these variables via ${VAR_NAME:-default} syntax. # Both Docker Compose and local development use the same configuration values. # # Environment-specific overrides: # - .env.development - Development overrides # - .env.test - Test overrides # - .env.production - Production overrides (see .env.production.example) # ============================================================================ # ============================================================================ # DEVELOPMENT DATABASE (docker-compose.dev.yml) # ============================================================================ # PostgreSQL connection settings for local development # These values are used by docker-compose.dev.yml and local npm run dev # Database host (use 'localhost' for local development) DB_HOST=localhost # Database port (default: 5432) # Change if port 5432 is already in use DB_PORT=5432 # Database name DB_NAME=thoughtmcp_dev # Database user DB_USER=thoughtmcp_dev # Database password (change in production!) DB_PASSWORD=dev_password # Full connection string (constructed from above values) # Used by application code for database connections DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME} # Connection pool size (default: 20) # Adjust based on expected concurrent operations DB_POOL_SIZE=20 # ============================================================================ # DEVELOPMENT OLLAMA (docker-compose.dev.yml) # ============================================================================ # Ollama embedding service settings for local development # Ollama API host URL OLLAMA_HOST=http://localhost:11434 # Ollama port (default: 11434) # Used by docker-compose.dev.yml for port mapping OLLAMA_PORT=11434 # Embedding model to use # Options: nomic-embed-text (768 dims), mxbai-embed-large (1024 dims) EMBEDDING_MODEL=nomic-embed-text # Embedding vector dimension (must match model) # - nomic-embed-text: 768 # - mxbai-embed-large: 1024 EMBEDDING_DIMENSION=768 # Timeout in seconds for pulling embedding model (default: 300 = 5 minutes) # Increase if you have a slow network connection MODEL_PULL_TIMEOUT=300 # ============================================================================ # TEST CONFIGURATION (docker-compose.test.yml) # ============================================================================ # Test-specific settings used by docker-compose.test.yml and TestContainerManager # Tests use separate ports to avoid conflicts with development containers # Test database host TEST_DB_HOST=localhost # Test database port (default: 5433 to avoid conflict with dev on 5432) # TestContainerManager will find an available port if this is occupied TEST_DB_PORT=5433 # Test database name TEST_DB_NAME=thoughtmcp_test # Test database user TEST_DB_USER=thoughtmcp_test # Test database password TEST_DB_PASSWORD=test_password # Test Ollama host URL TEST_OLLAMA_HOST=http://localhost:11435 # Test Ollama port (default: 11435 to avoid conflict with dev on 11434) # TestContainerManager will find an available port if this is occupied TEST_OLLAMA_PORT=11435 # Container name prefix for test containers # Helps identify test containers in docker ps output TEST_CONTAINER_PREFIX=thoughtmcp-test # ============================================================================ # CONTAINER MANAGEMENT (TestContainerManager behavior) # ============================================================================ # These settings control how the TestContainerManager handles Docker containers # during test execution # Automatically start containers when tests begin (default: true) # Set to 'false' if you prefer to manage containers manually AUTO_START_CONTAINERS=true # Timeout in seconds for container health checks (default: 60) # Increase if containers take longer to start on your system CONTAINER_STARTUP_TIMEOUT=60 # Keep containers running after tests complete (default: false) # Set to 'true' to speed up repeated test runs during development KEEP_CONTAINERS_RUNNING=false # Preserve test data volumes after tests (default: false) # Set to 'true' to debug test data after failures PRESERVE_TEST_DATA=false # CI environment flag (auto-detected in most CI systems) # When true, uses CI-optimized container settings # CI=true # ============================================================================ # APPLICATION SETTINGS # ============================================================================ # General application configuration # Environment mode: development, production, test NODE_ENV=development # Log level: DEBUG, INFO, WARN, ERROR # - DEBUG: Verbose logging for development # - INFO: General information # - WARN: Warnings and important events (recommended for production) # - ERROR: Only errors LOG_LEVEL=DEBUG # Log format: text, json # - text: Human-readable format for development # - json: Structured format for production log aggregation LOG_FORMAT=text # ============================================================================ # PERFORMANCE CONFIGURATION # ============================================================================ # Performance tuning settings # Query cache TTL in seconds (default: 300 = 5 minutes) CACHE_TTL=300 # Maximum processing time in milliseconds (default: 30000 = 30 seconds) MAX_PROCESSING_TIME=30000 # Enable query result caching (default: true) ENABLE_CACHE=true # Enable performance monitoring (default: true) ENABLE_MONITORING=true # ============================================================================ # FEATURE FLAGS # ============================================================================ # Enable/disable optional features # Enable bias detection in reasoning (default: true) ENABLE_BIAS_DETECTION=true # Enable emotion detection (default: true) ENABLE_EMOTION_DETECTION=true # Enable metacognitive features (default: true) ENABLE_METACOGNITION=true # ============================================================================ # OPTIONAL: pgAdmin (docker-compose.dev.yml --profile tools) # ============================================================================ # pgAdmin web interface for database management # Start with: docker compose -f docker-compose.dev.yml --profile tools up -d # pgAdmin login email PGADMIN_EMAIL=admin@thoughtmcp.local # pgAdmin login password (change in production!) PGADMIN_PASSWORD=admin # pgAdmin web interface port (default: 5050) PGADMIN_PORT=5050 # ============================================================================ # PRODUCTION DATABASE (docker-compose.prod.yml) # ============================================================================ # Production-specific database settings # These override the development settings when using docker-compose.prod.yml # See .env.production.example for production deployment # POSTGRES_USER=thoughtmcp # POSTGRES_PASSWORD=your_secure_production_password # POSTGRES_DB=thoughtmcp # POSTGRES_PORT=5432

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/keyurgolani/ThoughtMcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server