Configuration Reference

Complete environment variable reference for all MCP Hub Platform services, organized by component.

This page documents every environment variable used across the MCP Hub Platform. Variables are organized by the service they configure. All services read configuration from environment variables; there are no separate configuration files for the server-side components.

Hub Web Server

The hub web server (mcp-hub web) serves the dashboard, REST API, and handles authentication.

Server

VariableRequiredDefaultDescription
SERVER_HOSTNo0.0.0.0HTTP listen address
SERVER_PORTNo8080HTTP listen port
APP_ENVNoproductionEnvironment: development or production
ENVNoproductionAlias for APP_ENV
LOG_LEVELNoinfoLog verbosity: debug, info, warn, error
TRUSTED_ORIGINSNoComma-separated list of trusted origins for CORS/CSRF

Database

VariableRequiredDefaultDescription
DATABASE_URLYes*Full PostgreSQL connection string (preferred)
DB_HOSTYes*localhostPostgreSQL host
DB_PORTYes*5432PostgreSQL port
DB_USERYes*mcphubPostgreSQL user
DB_PASSWORDYes*PostgreSQL password
DB_NAMEYes*mcphubDatabase name
DB_SSLMODENodisableSSL mode: disable, require, verify-full

*Either DATABASE_URL or the individual DB_* variables must be set.

Redis

VariableRequiredDefaultDescription
REDIS_URLYes*Full Redis connection string (preferred)
REDIS_HOSTYes*localhostRedis host
REDIS_PORTYes*6379Redis port
REDIS_PASSWORDNoRedis password
REDIS_DBNo0Redis database number

S3 / Object Storage

VariableRequiredDefaultDescription
S3_ENDPOINTYesS3 endpoint URL (e.g., http://minio:9000)
S3_ACCESS_KEY_IDYesS3 access key
S3_SECRET_ACCESS_KEYYesS3 secret key
S3_REGIONNous-east-1S3 region
S3_BUCKETNomcp-hub-sourcesBucket for source code uploads
S3_BUCKET_SOURCESNomcp-hub-sourcesBucket for source tarballs
S3_BUCKET_ANALYSISNomcp-hub-analysisBucket for analysis results
S3_USE_PATH_STYLENofalseUse path-style URLs (required for MinIO)

AMQP / Message Queue

VariableRequiredDefaultDescription
AMQP_URLYesAMQP connection string (e.g., amqp://guest:guest@lavinmq:5672/)
AMQP_EXCHANGENomcp.jobsAMQP exchange name for job distribution

Authentication (Auth0)

VariableRequiredDefaultDescription
AUTH0_DOMAINYesAuth0 tenant domain (e.g., your-tenant.auth0.com)
AUTH0_CLIENT_IDYesAuth0 application client ID
AUTH0_CLIENT_SECRETYesAuth0 application client secret
AUTH0_CALLBACK_URLYesOAuth callback URL (e.g., https://hub.example.com/auth/callback)
AUTH0_AUDIENCENoAuth0 API audience
SESSION_SECRETYesSession encryption key (minimum 32 characters)

Billing (Stripe)

VariableRequiredDefaultDescription
STRIPE_SECRET_KEYNoStripe API secret key
STRIPE_PUBLISHABLE_KEYNoStripe publishable key (for frontend)
STRIPE_WEBHOOK_SECRETNoStripe webhook signing secret
STRIPE_PRICE_PRO_MONTHLYNoStripe Price ID for PRO monthly plan
STRIPE_PRICE_PRO_YEARLYNoStripe Price ID for PRO yearly plan

Registry Integration

VariableRequiredDefaultDescription
REGISTRY_URLYesInternal registry URL (e.g., http://registry:8081)
REGISTRY_SERVICE_TOKENYesService token for hub-to-registry API calls
REGISTRY_TIMEOUTNo60sTimeout for registry API calls

Git OAuth (Optional)

VariableRequiredDefaultDescription
GITHUB_OAUTH_CLIENT_IDNoGitHub OAuth app client ID
GITHUB_OAUTH_CLIENT_SECRETNoGitHub OAuth app client secret
GITHUB_TOKENNoGitHub PAT for repository ingestion
GITLAB_OAUTH_CLIENT_IDNoGitLab OAuth app client ID
GITLAB_OAUTH_CLIENT_SECRETNoGitLab OAuth app client secret

Administration

VariableRequiredDefaultDescription
ADMIN_USERSNoComma-separated email addresses of platform administrators
SKIP_MIGRATIONSNofalseSkip database migrations on startup

Hub Workers

Hub workers (ingest-worker and results-worker) share the same image as the web server and use the same database, Redis, S3, and AMQP variables listed above. Additional worker-specific variables:

Ingestion Worker

VariableRequiredDefaultDescription
WORKER_WORKSPACENo/workspaceDirectory for temporary code processing
WORKER_MAX_CONCURRENTNo10Maximum concurrent ingestion jobs
WORKER_POLL_INTERVALNo10sPolling interval for new jobs
WORKER_CONCURRENCYNo2Number of concurrent worker goroutines
WORKER_PREFETCHNo1AMQP prefetch count

Results Worker

The results worker uses the same base configuration as the web server. It has no additional variables beyond the standard database, Redis, S3, AMQP, and registry settings.


Scan Worker

The scan worker (mcp-scan worker) processes security analysis jobs.

VariableAliasRequiredDefaultDescription
AMQP_URLMCP_SCAN_WORKER_AMQP_URLYesAMQP connection string
S3_ENDPOINTMCP_SCAN_WORKER_S3_ENDPOINTYesS3 endpoint URL
S3_ACCESS_KEY_IDMCP_SCAN_WORKER_S3_ACCESS_KEYYesS3 access key
S3_SECRET_ACCESS_KEYMCP_SCAN_WORKER_S3_SECRET_KEYYesS3 secret key
S3_BUCKET_SOURCESMCP_SCAN_WORKER_S3_BUCKET_SOURCESNomcp-hub-sourcesBucket for source tarballs
S3_BUCKET_ANALYSISMCP_SCAN_WORKER_S3_BUCKET_ANALYSISNomcp-hub-analysisBucket for analysis results
S3_REGIONMCP_SCAN_WORKER_S3_REGIONNous-east-1S3 region
SCAN_MODEMCP_SCAN_WORKER_SCAN_MODENodeepAnalysis mode: fast or deep
SCAN_TIMEOUTMCP_SCAN_WORKER_SCAN_TIMEOUTNo30mMaximum time per analysis
MAX_CONCURRENTMCP_SCAN_WORKER_MAX_CONCURRENTNo5Maximum concurrent analyses
LOG_LEVELMCP_SCAN_WORKER_LOG_LEVELNoinfoLog verbosity
MCP_SCAN_WORKER_HEALTH_PORTNo8083Health check endpoint port

The scan worker accepts both standard environment variable names and MCP_SCAN_WORKER_ prefixed names. Standard names take precedence when both are set.


Registry

The registry (mcp-registry) handles artifact storage and distribution.

Server

VariableRequiredDefaultDescription
MCP_REGISTRY_SERVER_LISTENNo:8081Listen address and port
MCP_REGISTRY_LOGGING_JSONNofalseEnable JSON structured logging

Database

VariableRequiredDefaultDescription
MCP_REGISTRY_DB_DSNYesPostgreSQL connection string for the mcp_registry database

Storage

VariableRequiredDefaultDescription
MCP_REGISTRY_STORAGE_TYPENos3Storage backend: s3 or filesystem
MCP_REGISTRY_STORAGE_S3_BUCKETYesS3 bucket for artifact storage
MCP_REGISTRY_STORAGE_S3_REGIONNous-east-1S3 region
MCP_REGISTRY_STORAGE_S3_ENDPOINTYesS3 endpoint URL
MCP_REGISTRY_STORAGE_S3_ACCESS_KEYYesS3 access key
MCP_REGISTRY_STORAGE_S3_SECRET_KEYYesS3 secret key

Authentication

VariableRequiredDefaultDescription
MCP_REGISTRY_AUTH_MODENoossAuth mode: oss (self-contained JWT) or enterprise (external OIDC)
MCP_REGISTRY_AUTH_OSS_ISSUERNomcp-registry-ossJWT issuer for OSS mode
MCP_REGISTRY_AUTH_OSS_AUDIENCENomcp-registryJWT audience for OSS mode
MCP_REGISTRY_AUTH_OSS_ISSUER_SECRETYes*JWT signing secret for OSS mode
MCP_REGISTRY_AUTH_OSS_ENABLE_BASICNofalseEnable HTTP Basic auth (OSS mode)

*Required when MCP_REGISTRY_AUTH_MODE is oss.

Access Control

VariableRequiredDefaultDescription
MCP_REGISTRY_PUBLIC_READ_CATALOGNofalseAllow unauthenticated catalog browsing
MCP_REGISTRY_PUBLIC_DOWNLOAD_ARTIFACTSNofalseAllow unauthenticated artifact downloads
MCP_REGISTRY_REPO_POLICY_ALLOW_DOMAINSNoAllowed publisher domains (* for all)

Infrastructure Defaults

PostgreSQL

VariableDefault in Docker ComposeDescription
POSTGRES_USERmcphubDatabase superuser
POSTGRES_PASSWORD(see compose file)Superuser password
POSTGRES_DBmcphubDefault database

The PostgreSQL init scripts (in postgres-init/) create two databases: mcphub (for the hub) and mcp_registry (for the registry).

MinIO

VariableDefault in Docker ComposeDescription
MINIO_ROOT_USERminioadminMinIO admin username
MINIO_ROOT_PASSWORDminioadminMinIO admin password

Three buckets are created by the minio-init container: mcp-hub-sources, mcp-hub-analysis, and mcp-registry.

Redis

Redis is configured via command-line arguments in the Docker Compose file:

command: ["redis-server", "--port", "6390"]

No environment variables are needed for the Redis server itself.

LavinMQ

VariableDefault in Docker ComposeDescription
LAVINMQ_DEFAULT_USERguestDefault AMQP user
LAVINMQ_DEFAULT_PASSguestDefault AMQP password

Environment Variable Precedence

When the same setting can be configured through multiple variables (e.g., the scan worker’s aliases), the precedence order is:

  1. Standard name (e.g., AMQP_URL)
  2. Prefixed name (e.g., MCP_SCAN_WORKER_AMQP_URL)
  3. Default value

For the hub services, DATABASE_URL takes precedence over individual DB_* variables.

Security Notes

  • Never commit .env files containing real credentials to version control
  • Use Docker Compose .env files only for local development
  • In production (Kubernetes), use Secrets or an external secrets manager
  • Rotate tokens and passwords periodically, especially the REGISTRY_SERVICE_TOKEN and SESSION_SECRET
  • Set DB_SSLMODE=require or verify-full when connecting to remote databases
  • The AUTH0_CALLBACK_URL must match exactly what is configured in your Auth0 application settings