{"owner":"IBM","repo":"mcp-context-forge","hasDocker":true,"hasCompose":true,"hasDockerfile":false,"composePath":"docker-compose.yml","servicesCount":40,"services":[{"name":"nginx","image":"mcpgateway/nginx-cache:latest","build":{"context":"./infra/nginx","dockerfile":"Dockerfile"},"restart":"unless-stopped","ports":["${NGINX_PORT:-8080}:80"],"volumes":["./infra/nginx/nginx.conf:/etc/nginx/nginx.conf:ro"],"depends_on":["gateway"]},{"name":"gateway","image":"${IMAGE_LOCAL:-mcpgateway/mcpgateway:latest}","build":{"context":".","dockerfile":"Containerfile"},"restart":"unless-stopped","environment":["APP_DOMAIN=${APP_DOMAIN:-http://localhost:8080}","HOST=${GATEWAY_HOST:-0.0.0.0}","TRANSPORT_TYPE=streamablehttp","GATEWAY_TOOL_NAME_SEPARATOR=${GATEWAY_TOOL_NAME_SEPARATOR:--}","MCPGATEWAY_MCP_APPS_ENABLED=${MCPGATEWAY_MCP_APPS_ENABLED:-false}","MCP_INBOUND_PROTOCOL_MODE=${MCP_INBOUND_PROTOCOL_MODE:-auto}","MCPGATEWAY_WS_RELAY_ENABLED=${MCPGATEWAY_WS_RELAY_ENABLED:-false}","MCPGATEWAY_REVERSE_PROXY_ENABLED=${MCPGATEWAY_REVERSE_PROXY_ENABLED:-false}","ENABLE_METRICS=${ENABLE_METRICS:-true}","SSRF_ALLOW_LOCALHOST=${SSRF_ALLOW_LOCALHOST:-true}","SSRF_ALLOW_PRIVATE_NETWORKS=${SSRF_ALLOW_PRIVATE_NETWORKS:-true}","SSRF_DNS_FAIL_CLOSED=${SSRF_DNS_FAIL_CLOSED:-false}","DATABASE_URL=${DATABASE_URL:-postgresql+psycopg://postgres:${POSTGRES_PASSWORD:-mysecretpassword}@pgbouncer:6432/mcp}","MCPGATEWAY_SKIP_MIGRATIONS=${MCPGATEWAY_SKIP_MIGRATIONS:-true}","SQLALCHEMY_ECHO=false","CACHE_TYPE=redis","REDIS_URL=redis://redis:6379/0","REDIS_PARSER=hiredis","REDIS_MAX_CONNECTIONS=50","REDIS_SOCKET_TIMEOUT=5.0","REDIS_SOCKET_CONNECT_TIMEOUT=5.0","REDIS_HEALTH_CHECK_INTERVAL=30","REDIS_MAX_RETRIES=30","REDIS_RETRY_INTERVAL_MS=2000","REDIS_MAX_BACKOFF_SECONDS=30","AUTH_CACHE_ENABLED=${AUTH_CACHE_ENABLED:-true}","AUTH_CACHE_USER_TTL=300","AUTH_CACHE_REVOCATION_TTL=120","AUTH_CACHE_TEAM_TTL=300","AUTH_CACHE_ROLE_TTL=300","AUTH_CACHE_BATCH_QUERIES=true","AUTH_CACHE_TEAMS_TTL=300","REGISTRY_CACHE_ENABLED=true","REGISTRY_CACHE_TOOLS_TTL=300","REGISTRY_CACHE_PROMPTS_TTL=300","REGISTRY_CACHE_RESOURCES_TTL=300","REGISTRY_CACHE_AGENTS_TTL=300","REGISTRY_CACHE_SERVERS_TTL=300","REGISTRY_CACHE_GATEWAYS_TTL=300","REGISTRY_CACHE_CATALOG_TTL=300","ADMIN_STATS_CACHE_ENABLED=true","ADMIN_STATS_CACHE_SYSTEM_TTL=60","ADMIN_STATS_CACHE_OBSERVABILITY_TTL=30","ADMIN_STATS_CACHE_TAGS_TTL=120","ADMIN_STATS_CACHE_PLUGINS_TTL=120","ADMIN_STATS_CACHE_PERFORMANCE_TTL=60","TEAM_MEMBER_COUNT_CACHE_ENABLED=true","TEAM_MEMBER_COUNT_CACHE_TTL=300","METRICS_CACHE_ENABLED=true","METRICS_CACHE_TTL_SECONDS=120","HEALTH_CHECK_INTERVAL=300","HEALTH_CHECK_TIMEOUT=5","UNHEALTHY_THRESHOLD=3","GATEWAY_VALIDATION_TIMEOUT=5","MAX_CONCURRENT_HEALTH_CHECKS=10","AUTO_REFRESH_SERVERS=true","GATEWAY_AUTO_REFRESH_INTERVAL=300","HOT_COLD_CLASSIFICATION_ENABLED=true","JWT_ALGORITHM=HS256","JWT_SECRET_KEY=${JWT_SECRET_KEY:?JWT_SECRET_KEY is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","JWT_AUDIENCE=mcpgateway-api","JWT_ISSUER=mcpgateway","AUTH_ENCRYPTION_SECRET=${AUTH_ENCRYPTION_SECRET:?AUTH_ENCRYPTION_SECRET is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","MCP_LIST_PAGE_SIZE=${MCP_LIST_PAGE_SIZE:-100}","MCP_LIST_CURSOR_TTL_SECONDS=${MCP_LIST_CURSOR_TTL_SECONDS:-900}","MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES=${MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES:-67108864}","MCP_PROXY_LIST_MAX_TOTAL_BYTES=${MCP_PROXY_LIST_MAX_TOTAL_BYTES:-134217728}","MCP_PROXY_LIST_MAX_COLLECTORS=${MCP_PROXY_LIST_MAX_COLLECTORS:-32}","MCP_PROXY_LIST_MAX_SNAPSHOTS=${MCP_PROXY_LIST_MAX_SNAPSHOTS:-64}","DEFAULT_USER_PASSWORD=${DEFAULT_USER_PASSWORD:?DEFAULT_USER_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","EMAIL_AUTH_ENABLED=true","PROTECT_ALL_ADMINS=${PROTECT_ALL_ADMINS:-true}","PLATFORM_ADMIN_EMAIL=${PLATFORM_ADMIN_EMAIL:-admin@example.com}","PLATFORM_ADMIN_PASSWORD=${PLATFORM_ADMIN_PASSWORD:?PLATFORM_ADMIN_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","PASSWORD_CHANGE_ENFORCEMENT_ENABLED=${PASSWORD_CHANGE_ENFORCEMENT_ENABLED:-true}","ACCOUNT_LOCKOUT_NOTIFICATION_ENABLED=${ACCOUNT_LOCKOUT_NOTIFICATION_ENABLED:-true}","PASSWORD_RESET_ENABLED=${PASSWORD_RESET_ENABLED:-true}","PASSWORD_RESET_TOKEN_EXPIRY_MINUTES=${PASSWORD_RESET_TOKEN_EXPIRY_MINUTES:-60}","PASSWORD_RESET_RATE_LIMIT=${PASSWORD_RESET_RATE_LIMIT:-5}","PASSWORD_RESET_RATE_WINDOW_MINUTES=${PASSWORD_RESET_RATE_WINDOW_MINUTES:-15}","PASSWORD_RESET_INVALIDATE_SESSIONS=${PASSWORD_RESET_INVALIDATE_SESSIONS:-true}","PASSWORD_RESET_MIN_RESPONSE_MS=${PASSWORD_RESET_MIN_RESPONSE_MS:-250}","SMTP_ENABLED=${SMTP_ENABLED:-false}","SMTP_HOST=${SMTP_HOST:-}","SMTP_PORT=${SMTP_PORT:-587}","SMTP_USER=${SMTP_USER:-}","SMTP_PASSWORD=${SMTP_PASSWORD:-}","SMTP_FROM_EMAIL=${SMTP_FROM_EMAIL:-}","SMTP_FROM_NAME=${SMTP_FROM_NAME:-ContextForge}","SMTP_USE_TLS=${SMTP_USE_TLS:-true}","SMTP_USE_SSL=${SMTP_USE_SSL:-false}","SMTP_TIMEOUT_SECONDS=${SMTP_TIMEOUT_SECONDS:-15}","SSO_ENABLED=${SSO_ENABLED:-false}","SSO_KEYCLOAK_ENABLED=${SSO_KEYCLOAK_ENABLED:-false}","SSO_KEYCLOAK_BASE_URL=${SSO_KEYCLOAK_BASE_URL:-http://keycloak:8080}","SSO_KEYCLOAK_PUBLIC_BASE_URL=${SSO_KEYCLOAK_PUBLIC_BASE_URL:-}","SSO_KEYCLOAK_REALM=${SSO_KEYCLOAK_REALM:-mcp-gateway}","SSO_KEYCLOAK_CLIENT_ID=${SSO_KEYCLOAK_CLIENT_ID:-mcp-gateway}","SSO_KEYCLOAK_CLIENT_SECRET=${SSO_KEYCLOAK_CLIENT_SECRET:-keycloak-dev-secret}","SSO_KEYCLOAK_MAP_REALM_ROLES=${SSO_KEYCLOAK_MAP_REALM_ROLES:-true}","SSO_KEYCLOAK_MAP_CLIENT_ROLES=${SSO_KEYCLOAK_MAP_CLIENT_ROLES:-false}","SSO_KEYCLOAK_GROUPS_CLAIM=${SSO_KEYCLOAK_GROUPS_CLAIM:-groups}","SSO_KEYCLOAK_ROLE_MAPPINGS=${SSO_KEYCLOAK_ROLE_MAPPINGS:-{}}","SSO_KEYCLOAK_DEFAULT_ROLE=${SSO_KEYCLOAK_DEFAULT_ROLE:-}","SSO_KEYCLOAK_RESOLVE_TEAM_SCOPE_TO_PERSONAL_TEAM=${SSO_KEYCLOAK_RESOLVE_TEAM_SCOPE_TO_PERSONAL_TEAM:-false}","SSO_API_TOKEN_AUTH_ENABLED=${SSO_API_TOKEN_AUTH_ENABLED:-false}","SSO_AUTO_CREATE_USERS=${SSO_AUTO_CREATE_USERS:-true}","SSO_PRESERVE_ADMIN_AUTH=${SSO_PRESERVE_ADMIN_AUTH:-true}","REQUIRE_TOKEN_EXPIRATION=${REQUIRE_TOKEN_EXPIRATION:-true}","REQUIRE_JTI=${REQUIRE_JTI:-true}","REQUIRE_USER_IN_DB=${REQUIRE_USER_IN_DB:-false}","MCPGATEWAY_UI_ENABLED=true","MCPGATEWAY_ADMIN_API_ENABLED=true","MCPGATEWAY_UI_EMBEDDED=false","MCPGATEWAY_UI_HIDE_SECTIONS=","MCPGATEWAY_UI_HIDE_HEADER_ITEMS=","MCPGATEWAY_UI_HIDE_SECTIONS_ADMIN=","MCPGATEWAY_UI_HIDE_HEADER_ITEMS_ADMIN=","ENVIRONMENT=${ENVIRONMENT:-development}","SECURITY_HEADERS_ENABLED=true","CORS_ALLOW_CREDENTIALS=true","SECURE_COOKIES=false","USE_STATEFUL_SESSIONS=true","MCPGATEWAY_SESSION_AFFINITY_ENABLED=true","PLUGINS_ENABLED=true","PLUGINS_CONFIG_FILE=${PLUGINS_CONFIG_FILE:-plugins/config.yaml}","PLUGINS_CAN_OVERRIDE_AUTH_HEADERS=${PLUGINS_CAN_OVERRIDE_AUTH_HEADERS:-false}","PRIMARY_WORKER_ELECTION_BACKEND=${PRIMARY_WORKER_ELECTION_BACKEND:-filelock}","PRIMARY_WORKER_REDIS_UNAVAILABLE_POLICY=${PRIMARY_WORKER_REDIS_UNAVAILABLE_POLICY:-fail_closed}","STREAMABLE_HTTP_MAX_EVENTS_PER_STREAM=${STREAMABLE_HTTP_MAX_EVENTS_PER_STREAM:-100}","MCPGATEWAY_CATALOG_ENABLED=true","MCPGATEWAY_CATALOG_FILE=/app/mcp-catalog.yml","AUTH_REQUIRED=true","MCP_CLIENT_AUTH_ENABLED=true","MCP_REQUIRE_AUTH=true","TRUST_PROXY_AUTH=false","FORWARDED_ALLOW_IPS=${FORWARDED_ALLOW_IPS:-127.0.0.1,::1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16}","LOG_LEVEL=${LOG_LEVEL:-ERROR}","DISABLE_ACCESS_LOG=true","TEMPLATES_AUTO_RELOAD=false","STRUCTURED_LOGGING_DATABASE_ENABLED=false","AUDIT_TRAIL_ENABLED=false","SECURITY_LOGGING_ENABLED=false","SECURITY_LOGGING_LEVEL=failures_only","COMPRESSION_ENABLED=false","VALIDATION_MIDDLEWARE_ENABLED=false","JSON_SCHEMA_VALIDATION_STRICT=true","TOOL_DESCRIPTION_FORBIDDEN_PATTERNS_ENABLED=${TOOL_DESCRIPTION_FORBIDDEN_PATTERNS_ENABLED:-true}","TOOL_DESCRIPTION_FORBIDDEN_PATTERNS=${TOOL_DESCRIPTION_FORBIDDEN_PATTERNS:-[\"&&\", \";\", \"||\", \"$(\", \"> \", \"< \"]}","CORRELATION_ID_ENABLED=false","LLMCHAT_ENABLED=true","OBSERVABILITY_ENABLED=false","DB_POOL_CLASS=queue","DB_POOL_PRE_PING=true","DB_POOL_SIZE=20","DB_MAX_OVERFLOW=10","DB_POOL_TIMEOUT=60","DB_POOL_RECYCLE=60","DB_MAX_RETRIES=30","DB_RETRY_INTERVAL_MS=2000","DB_MAX_BACKOFF_SECONDS=30","TOOL_TIMEOUT=60","MAX_TOOL_RETRIES=3","TOOL_RATE_LIMIT=60000","TOOL_CONCURRENT_LIMIT=1000","RATE_LIMITING_ENABLED=${RATE_LIMITING_ENABLED:-false}","FEDERATION_TIMEOUT=30","HTTPX_MAX_CONNECTIONS=${HTTPX_MAX_CONNECTIONS:-500}","HTTPX_MAX_KEEPALIVE_CONNECTIONS=${HTTPX_MAX_KEEPALIVE_CONNECTIONS:-300}","HTTPX_KEEPALIVE_EXPIRY=30.0","HTTPX_CONNECT_TIMEOUT=5.0","HTTPX_READ_TIMEOUT=120.0","HTTPX_WRITE_TIMEOUT=30.0","HTTPX_POOL_TIMEOUT=10.0","HTTPX_HTTP2_ENABLED=false","HTTPX_ADMIN_READ_TIMEOUT=30.0","GUNICORN_WORKERS=${GUNICORN_WORKERS:-17}","GUNICORN_TIMEOUT=${GUNICORN_TIMEOUT:-120}","GUNICORN_GRACEFUL_TIMEOUT=${GUNICORN_GRACEFUL_TIMEOUT:-60}","GUNICORN_KEEP_ALIVE=${GUNICORN_KEEP_ALIVE:-30}","GUNICORN_MAX_REQUESTS=${GUNICORN_MAX_REQUESTS:-1000000}","GUNICORN_MAX_REQUESTS_JITTER=${GUNICORN_MAX_REQUESTS_JITTER:-100000}","GUNICORN_BACKLOG=${GUNICORN_BACKLOG:-4096}","MCP_SESSION_POOL_ENABLED=${MCP_SESSION_POOL_ENABLED:-true}","MCP_SESSION_POOL_MAX_PER_KEY=10","MCP_SESSION_POOL_TTL=300.0","MCP_SESSION_POOL_HEALTH_CHECK_INTERVAL=60.0","MCP_SESSION_POOL_ACQUIRE_TIMEOUT=60.0","MCP_SESSION_POOL_CREATE_TIMEOUT=30.0","MCP_SESSION_POOL_CIRCUIT_BREAKER_THRESHOLD=5","MCP_SESSION_POOL_CIRCUIT_BREAKER_RESET=60.0","MCP_SESSION_POOL_IDLE_EVICTION=600.0","MCP_SESSION_POOL_TRANSPORT_TIMEOUT=30.0","MCP_SESSION_POOL_EXPLICIT_HEALTH_RPC=false","MCP_SESSION_POOL_HEALTH_CHECK_METHODS=[\"ping\", \"skip\"]","MCP_SESSION_POOL_HEALTH_CHECK_TIMEOUT=5.0","MCP_SESSION_POOL_MAX_TOTAL_KEYS=0","MCP_SESSION_POOL_MAX_TOTAL_SESSIONS=0","MCP_SESSION_POOL_JWT_IDENTITY_EXTRACTION=true","SSE_SEND_TIMEOUT=30.0","SSE_RAPID_YIELD_WINDOW_MS=1000","SSE_RAPID_YIELD_MAX=50","DB_METRICS_RECORDING_ENABLED=${DB_METRICS_RECORDING_ENABLED:-true}","LOG_FORMAT=${LOG_FORMAT:-text}","OTEL_ENABLE_OBSERVABILITY=${OTEL_ENABLE_OBSERVABILITY:-false}","OTEL_TRACES_EXPORTER=${OTEL_TRACES_EXPORTER:-otlp}","OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT:-http://tempo:4317}","OTEL_EXPORTER_OTLP_PROTOCOL=${OTEL_EXPORTER_OTLP_PROTOCOL:-grpc}","OTEL_SERVICE_NAME=${OTEL_SERVICE_NAME:-mcp-gateway}","OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-deployment.environment=docker,service.namespace=mcp}","OTEL_SYSTEM_TRACES_ENABLED=${OTEL_SYSTEM_TRACES_ENABLED:-false}","OTEL_HTTPX_INSTRUMENTATION_ENABLED=${OTEL_HTTPX_INSTRUMENTATION_ENABLED:-true}","OTEL_SQLALCHEMY_INSTRUMENTATION_ENABLED=${OTEL_SQLALCHEMY_INSTRUMENTATION_ENABLED:-false}","OTEL_REDIS_INSTRUMENTATION_ENABLED=${OTEL_REDIS_INSTRUMENTATION_ENABLED:-false}"],"volumes":["./mcp-catalog.yml:/app/mcp-catalog.yml:ro","${PLUGINS_DIR:-./plugins}:/app/plugins:ro"],"depends_on":["pgbouncer","redis","migration"]},{"name":"keycloak","image":"quay.io/keycloak/keycloak:26.1","restart":"unless-stopped","command":"start-dev --import-realm","ports":["8180:8080"],"environment":["KEYCLOAK_ADMIN=${KEYCLOAK_ADMIN:-admin}","KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD:-changeme}","KC_HOSTNAME=${KC_HOSTNAME:-localhost}","KC_HOSTNAME_PORT=${KC_HOSTNAME_PORT:-8180}","KC_HOSTNAME_STRICT=${KC_HOSTNAME_STRICT:-false}","KC_HTTP_ENABLED=true","KC_HEALTH_ENABLED=true","KC_METRICS_ENABLED=false"],"volumes":["./infra/keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json:ro","keycloakdata:/opt/keycloak/data"]},{"name":"postgres","image":"postgres:18","command":"postgres -c max_connections=800 -c shared_buffers=512MB -c work_mem=16MB -c effective_cache_size=1536MB -c maintenance_work_mem=128MB -c checkpoint_completion_target=0.9 -c wal_buffers=16MB -c random_page_cost=1.1 -c effective_io_concurrency=200 -c max_worker_processes=8 -c max_parallel_workers_per_gather=4 -c max_parallel_workers=8 -c idle_in_transaction_session_timeout=300s -c statement_timeout=120s -c synchronous_commit=off -c commit_delay=100","ports":["5433:5432"],"environment":["POSTGRES_USER=postgres","POSTGRES_PASSWORD=mysecretpassword","POSTGRES_DB=mcp"],"volumes":["pgdata:/var/lib/postgresql"]},{"name":"pgbouncer","image":"edoburu/pgbouncer:latest","restart":"unless-stopped","ports":["6432:6432"],"environment":["DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD:-mysecretpassword}@postgres:5432/mcp","LISTEN_PORT=6432","POOL_MODE=transaction","MAX_CLIENT_CONN=5000","DEFAULT_POOL_SIZE=600","MIN_POOL_SIZE=100","RESERVE_POOL_SIZE=150","RESERVE_POOL_TIMEOUT=2","MAX_DB_CONNECTIONS=700","MAX_USER_CONNECTIONS=700","SERVER_LIFETIME=3600","SERVER_IDLE_TIMEOUT=600","QUERY_WAIT_TIMEOUT=60","CLIENT_IDLE_TIMEOUT=120","SERVER_CONNECT_TIMEOUT=5","SERVER_RESET_QUERY=DISCARD ALL","SERVER_RESET_QUERY_ALWAYS=1","IDLE_TRANSACTION_TIMEOUT=30","AUTH_TYPE=scram-sha-256"],"depends_on":["postgres"]},{"name":"migration","image":"${IMAGE_LOCAL:-mcpgateway/mcpgateway:latest}","build":{"context":".","dockerfile":"Containerfile"},"restart":"no","command":"python -m mcpgateway.bootstrap_db","environment":["DATABASE_URL=postgresql+psycopg://postgres:${POSTGRES_PASSWORD:-mysecretpassword}@postgres:5432/mcp","GATEWAY_TOOL_NAME_SEPARATOR=${GATEWAY_TOOL_NAME_SEPARATOR:--}","JWT_SECRET_KEY=${JWT_SECRET_KEY:?JWT_SECRET_KEY is not set. Run: make setup (first time) or make init-secrets-patch-env (if .env exists)}","BASIC_AUTH_USER=${BASIC_AUTH_USER:-admin}","PLATFORM_ADMIN_EMAIL=${PLATFORM_ADMIN_EMAIL:-admin@example.com}","PLATFORM_ADMIN_PASSWORD=${PLATFORM_ADMIN_PASSWORD:?PLATFORM_ADMIN_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","DEFAULT_USER_PASSWORD=${DEFAULT_USER_PASSWORD:?DEFAULT_USER_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","AUTH_REQUIRED=${AUTH_REQUIRED:-true}","AUTH_ENCRYPTION_SECRET=${AUTH_ENCRYPTION_SECRET:?AUTH_ENCRYPTION_SECRET is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","MCP_LIST_PAGE_SIZE=${MCP_LIST_PAGE_SIZE:-100}","MCP_LIST_CURSOR_TTL_SECONDS=${MCP_LIST_CURSOR_TTL_SECONDS:-900}","MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES=${MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES:-67108864}","MCP_PROXY_LIST_MAX_TOTAL_BYTES=${MCP_PROXY_LIST_MAX_TOTAL_BYTES:-134217728}","MCP_PROXY_LIST_MAX_COLLECTORS=${MCP_PROXY_LIST_MAX_COLLECTORS:-32}","MCP_PROXY_LIST_MAX_SNAPSHOTS=${MCP_PROXY_LIST_MAX_SNAPSHOTS:-64}","LOG_LEVEL=${LOG_LEVEL:-INFO}"],"depends_on":["postgres"]},{"name":"redis","image":"redis:latest","command":"redis-server --maxmemory 1gb --maxmemory-policy allkeys-lru --tcp-backlog 2048 --timeout 0 --tcp-keepalive 300 --maxclients 15000","ports":["6379:6379"]},{"name":"web_ui_redis","image":"redis:latest","restart":"unless-stopped","command":"redis-server --appendonly yes","volumes":["web_ui_redis_data:/data"]},{"name":"web_ui","image":"${WEB_UI_IMAGE:-ghcr.io/contextforge-org/contextforge-web-ui:0.3.2@sha256:1710facdd8394c26dda1e726d3d4898e178c0ae8305ed3623233718139ad31b1}","restart":"unless-stopped","ports":["${WEB_UI_PORT:-3001}:${WEB_UI_PORT:-3001}"],"environment":["PORT=${WEB_UI_PORT:-3001}","HOST=${WEB_UI_HOST:-0.0.0.0}","CONTEXTFORGE_URL=${WEB_UI_CONTEXTFORGE_URL:-http://gateway:4444}","COOKIE_SECURE=${WEB_UI_COOKIE_SECURE:-false}","REDIS_URL=${WEB_UI_REDIS_URL:-redis://web_ui_redis:6379/0}"],"depends_on":["gateway","web_ui_redis"]},{"name":"postgres_exporter","image":"quay.io/prometheuscommunity/postgres-exporter:latest","restart":"unless-stopped","ports":["${POSTGRES_EXPORTER_PORT:-9187}:9187"],"environment":["DATA_SOURCE_NAME=postgresql://postgres:${POSTGRES_PASSWORD:-mysecretpassword}@postgres:5432/mcp?sslmode=disable","PG_EXPORTER_AUTO_DISCOVER_DATABASES=true"],"depends_on":["postgres"]},{"name":"redis_exporter","image":"oliver006/redis_exporter:latest","restart":"unless-stopped","ports":["${REDIS_EXPORTER_PORT:-9121}:9121"],"environment":["REDIS_ADDR=redis://redis:6379"],"depends_on":["redis"]},{"name":"pgbouncer_exporter","image":"prometheuscommunity/pgbouncer-exporter:latest","restart":"unless-stopped","ports":["${PGBOUNCER_EXPORTER_PORT:-9127}:9127"],"environment":["PGBOUNCER_EXPORTER_CONNECTION_STRING=postgres://postgres:${POSTGRES_PASSWORD:-mysecretpassword}@pgbouncer:6432/pgbouncer?sslmode=disable"],"depends_on":["pgbouncer"]},{"name":"nginx_exporter","image":"nginx/nginx-prometheus-exporter:latest","restart":"unless-stopped","command":"-nginx.scrape-uri=http://nginx:80/nginx_status","ports":["${NGINX_EXPORTER_PORT:-9113}:9113"],"depends_on":["nginx"]},{"name":"cadvisor","image":"gcr.io/cadvisor/cadvisor:latest","restart":"unless-stopped","ports":["${CADVISOR_PORT:-8085}:8080"],"volumes":["/:/rootfs:ro","/var/run:/var/run:ro","/sys:/sys:ro","/var/lib/docker/:/var/lib/docker:ro"]},{"name":"prometheus_token","image":"${IMAGE_LOCAL:-mcpgateway/mcpgateway:latest}","restart":"no","command":"set -eu\nTOKEN=$$(python3 -m mcpgateway.utils.create_jwt_token \\\n  --username prometheus@monitoring --exp 0 \\\n  --secret $$JWT_SECRET_KEY \\\n  --algo HS256 2>/dev/null)\nprintf \"%s\" \"$$TOKEN\" > /tokens/gateway.jwt\necho \"✅ Prometheus scrape token written to /tokens/gateway.jwt\"\n","environment":["JWT_SECRET_KEY=${JWT_SECRET_KEY:?JWT_SECRET_KEY is not set. Run: make setup (first time) or make init-secrets-patch-env (if .env exists)}","AUTH_ENCRYPTION_SECRET=${AUTH_ENCRYPTION_SECRET:?AUTH_ENCRYPTION_SECRET is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","MCP_LIST_PAGE_SIZE=${MCP_LIST_PAGE_SIZE:-100}","MCP_LIST_CURSOR_TTL_SECONDS=${MCP_LIST_CURSOR_TTL_SECONDS:-900}","MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES=${MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES:-67108864}","MCP_PROXY_LIST_MAX_TOTAL_BYTES=${MCP_PROXY_LIST_MAX_TOTAL_BYTES:-134217728}","MCP_PROXY_LIST_MAX_COLLECTORS=${MCP_PROXY_LIST_MAX_COLLECTORS:-32}","MCP_PROXY_LIST_MAX_SNAPSHOTS=${MCP_PROXY_LIST_MAX_SNAPSHOTS:-64}","PLATFORM_ADMIN_PASSWORD=${PLATFORM_ADMIN_PASSWORD:?PLATFORM_ADMIN_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","DEFAULT_USER_PASSWORD=${DEFAULT_USER_PASSWORD:?DEFAULT_USER_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}"],"volumes":["prometheus_token:/tokens"]},{"name":"prometheus","image":"prom/prometheus:latest","restart":"unless-stopped","command":"--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.retention.time=7d --web.enable-lifecycle","ports":["${PROMETHEUS_PORT:-9090}:9090"],"volumes":["./infra/monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro","prometheusdata:/prometheus","prometheus_token:/tokens:ro"],"depends_on":["postgres_exporter","redis_exporter","nginx_exporter","cadvisor","prometheus_token"]},{"name":"loki","image":"grafana/loki:latest","restart":"unless-stopped","command":"-config.file=/etc/loki/local-config.yaml","ports":["${LOKI_PORT:-3101}:3100"],"volumes":["./infra/monitoring/loki/loki-config.yaml:/etc/loki/local-config.yaml:ro","lokidata:/loki"]},{"name":"tempo","image":"grafana/tempo:${TEMPO_IMAGE_TAG:-2.10.0}","restart":"unless-stopped","command":"-config.file=/etc/tempo.yaml","ports":["${TEMPO_PORT:-3200}:3200","${TEMPO_OTLP_GRPC_PORT:-4317}:4317","${TEMPO_OTLP_HTTP_PORT:-4318}:4318"],"volumes":["./infra/monitoring/tempo/tempo.yaml:/etc/tempo.yaml:ro","tempodata:/var/tempo"]},{"name":"promtail","image":"grafana/promtail:latest","restart":"unless-stopped","command":"-config.file=/etc/promtail/config.yaml","volumes":["./infra/monitoring/loki/promtail-config.yaml:/etc/promtail/config.yaml:ro","/var/run/docker.sock:/var/run/docker.sock:ro","/var/lib/docker/containers:/var/lib/docker/containers:ro"],"depends_on":["loki"]},{"name":"grafana","image":"grafana/grafana:latest","restart":"unless-stopped","ports":["${GRAFANA_PORT:-3000}:3000"],"environment":["GF_SECURITY_ADMIN_PASSWORD=changeme","GF_USERS_ALLOW_SIGN_UP=false"],"volumes":["grafanadata:/var/lib/grafana","./infra/monitoring/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:ro","./infra/monitoring/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro"],"depends_on":["prometheus","loki","tempo"]},{"name":"pgadmin","image":"dpage/pgadmin4:9.11.0","ports":["${PGADMIN_PORT:-5050}:80"],"environment":["PGADMIN_DEFAULT_EMAIL=admin@example.com","PGADMIN_DEFAULT_PASSWORD=changeme"],"volumes":["pgadmindata:/var/lib/pgadmin"],"depends_on":["postgres"]},{"name":"redis_commander","image":"rediscommander/redis-commander:latest","restart":"unless-stopped","ports":["${REDIS_COMMANDER_PORT:-8081}:8081"],"environment":["REDIS_HOSTS=local:redis:6379","HTTP_USER=admin","HTTP_PASSWORD=changeme"],"depends_on":["redis"]},{"name":"fast_time_server","image":"${FAST_TIME_IMAGE:-ghcr.io/ibm/cfex-mcp-fast-time-server@sha256:30a1a177aaedec68f3bc1e26807e4dea59afd508366f852aea87f0a703c72b01}","restart":"unless-stopped","ports":["8888:9080"],"environment":["BIND_ADDRESS=0.0.0.0:9080","RUST_LOG=info"]},{"name":"register_fast_time","image":"${IMAGE_LOCAL:-mcpgateway/mcpgateway:latest}","restart":"no","command":"set -e\necho \"Using latest gateway image with current JWT utility...\"\n\necho \"Waiting for services to be ready...\"\n\n# Wait for gateway to be ready using Python\npython3 -c \"\nimport os\nimport ssl\nimport time\nimport urllib.error\nimport urllib.request\n\ngateway_url = os.environ.get('GATEWAY_URL', 'http://gateway:4444').rstrip('/')\nca_cert = os.environ.get('GATEWAY_CA_CERT')\nssl_context = ssl.create_default_context(cafile=ca_cert) if ca_cert else None\nif ssl_context is not None:\n    ssl_context.check_hostname = False\n\nfor i in range(1, 61):\n    try:\n        request_kwargs = {'timeout': 2}\n        if ssl_context is not None:\n            request_kwargs['context'] = ssl_context\n        with urllib.request.urlopen(f'{gateway_url}/health', **request_kwargs) as response:\n            if response.status == 200:\n                print('✅ gateway is healthy')\n                break\n    except:\n        pass\n    print(f'Waiting for gateway... ({i}/60)')\n    time.sleep(2)\nelse:\n    print('❌ Gateway failed to become healthy')\n    exit(1)\n\"\n\n# Wait for fast_time_server to be ready using Python\npython3 -c \"\nimport time\nimport urllib.request\nimport urllib.error\n\nfor i in range(1, 31):\n    try:\n        with urllib.request.urlopen('http://fast_time_server:9080/health', timeout=2) as response:\n            if response.status == 200:\n                print('✅ fast_time_server is healthy')\n                break\n    except:\n        pass\n    print(f'Waiting for fast_time_server... ({i}/30)')\n    time.sleep(2)\nelse:\n    print('❌ Fast time server failed to become healthy')\n    exit(1)\n\"\n\necho \"Generating JWT token...\"\necho \"Environment: JWT_SECRET_KEY=[redacted]\"\necho \"Running: python3 -m mcpgateway.utils.create_jwt_token --username admin@example.com --admin --exp 10080 --secret [redacted] --algo HS256\"\n# Only capture stdout (the token), let warnings go to stderr\nexport MCPGATEWAY_BEARER_TOKEN=$$(python3 -m mcpgateway.utils.create_jwt_token --username admin@example.com --admin --exp 10080 --secret $$JWT_SECRET_KEY --algo HS256 2>/dev/null)\necho \"Generated token: $$MCPGATEWAY_BEARER_TOKEN\"\n\n# Decode the token to verify it has expiration\necho \"Decoding token to verify claims...\"\npython3 -m mcpgateway.utils.create_jwt_token --decode \"$$MCPGATEWAY_BEARER_TOKEN\" 2>/dev/null || echo \"Failed to decode token\"\n\n# Wait for authenticated gateway readiness. /health goes green before the\n# admin/bootstrap path is fully ready for authenticated registration calls.\necho \"Waiting for authenticated gateway readiness...\"\n\n# Use Python to make HTTP requests\npython3 -c \"\nimport json\nimport os\nimport ssl\nimport sys\nimport time\nimport urllib.error\nimport urllib.request\n\ntoken = os.environ.get('MCPGATEWAY_BEARER_TOKEN', '')\ngateway_url = os.environ.get('GATEWAY_URL', 'http://gateway:4444').rstrip('/')\nca_cert = os.environ.get('GATEWAY_CA_CERT')\nssl_context = ssl.create_default_context(cafile=ca_cert) if ca_cert else None\nif ssl_context is not None:\n    ssl_context.check_hostname = False\n\ndef open_url(request, timeout):\n    request_kwargs = {'timeout': timeout}\n    if ssl_context is not None:\n        request_kwargs['context'] = ssl_context\n    return urllib.request.urlopen(request, **request_kwargs)\n\n\ndef api_request(method, path, data=None):\n    '''Helper to make authenticated API requests.'''\n    url = f'{gateway_url}{path}'\n    req = urllib.request.Request(url, method=method)\n    req.add_header('Authorization', f'Bearer {token}')\n    req.add_header('Content-Type', 'application/json')\n    if data:\n        req.data = json.dumps(data).encode('utf-8')\n    with open_url(req, 60) as response:\n        return json.loads(response.read().decode('utf-8'))\n\ndef api_request_with_retry(method, path, data=None, retries=30, delay=2, retry_statuses=(401, 502, 503)):\n    '''Retry authenticated API requests while gateway workers settle.'''\n    for attempt in range(1, retries + 1):\n        try:\n            return api_request(method, path, data)\n        except urllib.error.HTTPError as exc:\n            if exc.code in retry_statuses and attempt < retries:\n                print(f'Retrying {method} {path} after HTTP {exc.code} ({attempt}/{retries})')\n                time.sleep(delay)\n                continue\n            raise\n        except Exception:\n            if attempt < retries:\n                print(f'Retrying {method} {path} after transient error ({attempt}/{retries})')\n                time.sleep(delay)\n                continue\n            raise\n\nprint('Checking authenticated gateway readiness...')\nfor i in range(1, 61):\n    try:\n        gateways = api_request('GET', '/gateways')\n        print(f'✅ Authenticated gateway readiness confirmed ({len(gateways)} gateways visible)')\n        break\n    except urllib.error.HTTPError as exc:\n        print(f'Authenticated readiness not ready yet ({i}/60): HTTP {exc.code}')\n    except Exception as exc:\n        print(f'Authenticated readiness not ready yet ({i}/60): {exc}')\n    time.sleep(2)\nelse:\n    print('❌ Gateway authenticated readiness check failed')\n    sys.exit(1)\n\n# Register fast_time_server with gateway using Streamable HTTP transport\nprint('Registering fast_time_server with gateway (Streamable HTTP)...')\n\n# First check if gateway already exists. Reuse it on reruns so\n# repeated compose up operations stay idempotent.\ngateway_id = None\ntry:\n    gateways = api_request_with_retry('GET', '/gateways')\n    for gw in gateways:\n        if gw.get('name') == 'fast_time':\n            gateway_id = gw['id']\n            print(f'Reusing existing gateway {gateway_id}')\n            break\nexcept Exception as e:\n    print(f'Note: Could not check existing gateway: {e}')\n\n# Delete existing virtual server if present (using fixed ID)\nVIRTUAL_SERVER_ID = '9779b6698cbd4b4995ee04a4fab38737'  # pragma: allowlist secret\ntry:\n    api_request_with_retry('DELETE', f'/servers/{VIRTUAL_SERVER_ID}', retry_statuses=(401, 502, 503))\n    print(f'Deleted existing virtual server {VIRTUAL_SERVER_ID}')\nexcept Exception as e:\n    print(f'Note: No existing virtual server to delete (or error: {e})')\n\n# Register the gateway when it is not already present with synced tools.\nif gateway_id is None:\n    try:\n        result = api_request_with_retry('POST', '/gateways', {\n            'name': 'fast_time',\n            'url': 'http://fast_time_server:9080/mcp',\n            'transport': 'STREAMABLEHTTP'\n        })\n        print(f'Registration response: {result}')\n        if 'id' in result:\n            gateway_id = result['id']\n            print(f'✅ Successfully registered fast_time_server (gateway_id: {gateway_id})')\n        else:\n            print('❌ Registration failed - no ID in response')\n            sys.exit(1)\n    except Exception as e:\n        print(f'❌ Registration failed: {e}')\n        sys.exit(1)\n\n# Force immediate discovery before polling for synced catalog entries.\ntry:\n    refresh_result = api_request_with_retry(\n        'POST',\n        f'/gateways/{gateway_id}/tools/refresh?include_resources=true&include_prompts=true',\n        retries=20,\n        delay=2,\n        retry_statuses=(401, 409, 502, 503),\n    )\n    print(f'Refresh response: {refresh_result}')\nexcept Exception as e:\n    print(f'Note: manual refresh did not complete immediately: {e}')\n\n# Wait for tools to be synced from the gateway\nprint('Waiting for tools/resources/prompts to sync...')\nfor i in range(60):\n    time.sleep(1)\n    try:\n        tools = api_request('GET', '/tools')\n        # Filter tools from fast_time gateway (note: camelCase gatewayId)\n        fast_time_tools = [t for t in tools if t.get('gatewayId') == gateway_id]\n        if fast_time_tools:\n            print(f'Found {len(fast_time_tools)} tools from fast_time gateway')\n            break\n    except Exception as e:\n        pass\n    print(f'Waiting for sync... ({i+1}/60)')\nelse:\n    print('❌ Tools from fast_time gateway did not sync in time')\n    sys.exit(1)\n\n# Fetch all tools, resources, and prompts for the fast_time gateway only.\n# API payloads may expose either gatewayId (camelCase) or gateway_id (snake_case)\n# depending on the serializer path, so accept both.\ntool_ids = []\nresource_ids = []\nprompt_ids = []\n\ntry:\n    tools = api_request('GET', '/tools')\n    # Get tools from the fast_time gateway\n    tool_ids = [t['id'] for t in tools if t.get('gatewayId') == gateway_id]\n    print(f'Found tools: {[t[\\\"name\\\"] for t in tools if t.get(\\\"gatewayId\\\") == gateway_id]}')\nexcept Exception as e:\n    print(f'Failed to fetch tools: {e}')\n\nif not tool_ids:\n    print('❌ fast_time gateway sync completed without any tools; aborting virtual server creation')\n    sys.exit(1)\n\ntry:\n    resources = api_request('GET', '/resources')\n    fast_time_resources = [r for r in resources if r.get('gatewayId') == gateway_id or r.get('gateway_id') == gateway_id]\n    resource_ids = [r['id'] for r in fast_time_resources]\n    print(f'Found resources: {[r[\\\"name\\\"] for r in fast_time_resources]}')\nexcept Exception as e:\n    print(f'Failed to fetch resources: {e}')\n\ntry:\n    prompts = api_request('GET', '/prompts')\n    fast_time_prompts = [p for p in prompts if p.get('gatewayId') == gateway_id or p.get('gateway_id') == gateway_id]\n    prompt_ids = [p['id'] for p in fast_time_prompts]\n    print(f'Found prompts: {[p[\\\"name\\\"] for p in fast_time_prompts]}')\nexcept Exception as e:\n    print(f'Failed to fetch prompts: {e}')\n\n# Create virtual server with all tools, resources, and prompts\nprint('Creating virtual server...')\ntry:\n    # API expects payload wrapped in 'server' key\n    # Use fixed UUID for consistent server ID across restarts\n    server_payload = {\n        'server': {\n            'id': '9779b6698cbd4b4995ee04a4fab38737',  # pragma: allowlist secret\n            'name': 'Fast Time Server',\n            'description': 'Virtual server exposing Fast Time MCP tools, resources, and prompts',\n            'associated_tools': tool_ids,\n            'associated_resources': resource_ids,\n            'associated_prompts': prompt_ids\n        }\n    }\n    result = api_request_with_retry('POST', '/servers', server_payload)\n    print(f'Virtual server created: {result}')\n    print(f'✅ Successfully created virtual server with {len(tool_ids)} tools, {len(resource_ids)} resources, {len(prompt_ids)} prompts')\nexcept Exception as e:\n    print(f'❌ Failed to create virtual server: {e}')\n    sys.exit(1)\n\"\n\n# Write the bearer token to a file for load testing\necho \"Writing bearer token to /tmp/gateway-token.txt...\"\necho \"$$MCPGATEWAY_BEARER_TOKEN\" > /tmp/gateway-token.txt\necho \"Token written to /tmp/gateway-token.txt\"\n\necho \"✅ Setup complete!\"\n","environment":["JWT_SECRET_KEY=${JWT_SECRET_KEY:?JWT_SECRET_KEY is not set. Run: make setup (first time) or make init-secrets-patch-env (if .env exists)}","AUTH_ENCRYPTION_SECRET=${AUTH_ENCRYPTION_SECRET:?AUTH_ENCRYPTION_SECRET is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","MCP_LIST_PAGE_SIZE=${MCP_LIST_PAGE_SIZE:-100}","MCP_LIST_CURSOR_TTL_SECONDS=${MCP_LIST_CURSOR_TTL_SECONDS:-900}","MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES=${MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES:-67108864}","MCP_PROXY_LIST_MAX_TOTAL_BYTES=${MCP_PROXY_LIST_MAX_TOTAL_BYTES:-134217728}","MCP_PROXY_LIST_MAX_COLLECTORS=${MCP_PROXY_LIST_MAX_COLLECTORS:-32}","MCP_PROXY_LIST_MAX_SNAPSHOTS=${MCP_PROXY_LIST_MAX_SNAPSHOTS:-64}","PLATFORM_ADMIN_PASSWORD=${PLATFORM_ADMIN_PASSWORD:?PLATFORM_ADMIN_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","DEFAULT_USER_PASSWORD=${DEFAULT_USER_PASSWORD:?DEFAULT_USER_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","GATEWAY_URL=${GATEWAY_URL:-http://gateway:4444}"],"depends_on":["gateway","fast_time_server"]},{"name":"completion_test_server","build":{"context":"./mcp-servers/python/completion_test_server","dockerfile":"Containerfile"},"restart":"unless-stopped","ports":["9102:9102"],"environment":["COMPLETION_TEST_SERVER_PORT=9102"]},{"name":"completion_test_server_no_completions","build":{"context":"./mcp-servers/python/completion_test_server","dockerfile":"Containerfile"},"restart":"unless-stopped","ports":["9103:9103"],"environment":["COMPLETION_TEST_SERVER_PORT=9103","COMPLETIONS_ENABLED=false"]},{"name":"slow_time_server","image":"ghcr.io/ibm/cfex-mcp-slow-time-server:latest","restart":"unless-stopped","ports":["8889:8081"],"environment":["DEFAULT_LATENCY=${SLOW_TIME_LATENCY:-5s}","FAILURE_RATE=${SLOW_TIME_FAILURE_RATE:-0.0}"]},{"name":"register_slow_time","image":"${IMAGE_LOCAL:-mcpgateway/mcpgateway:latest}","restart":"no","command":"echo \"Registering slow_time_server with gateway...\"\n\n# Generate JWT token\nexport MCPGATEWAY_BEARER_TOKEN=$$(python3 -m mcpgateway.utils.create_jwt_token --username admin@example.com --admin --exp 10080 --secret $$JWT_SECRET_KEY --algo HS256 2>/dev/null)\n\npython3 -c \"\nimport urllib.request\nimport json\nimport os\nimport sys\n\ntoken = os.environ.get('MCPGATEWAY_BEARER_TOKEN', '')\n\ndef api_request(method, path, data=None):\n    url = f'http://gateway:4444{path}'\n    req = urllib.request.Request(url, method=method)\n    req.add_header('Authorization', f'Bearer {token}')\n    req.add_header('Content-Type', 'application/json')\n    if data:\n        req.data = json.dumps(data).encode('utf-8')\n    with urllib.request.urlopen(req, timeout=60) as response:\n        return json.loads(response.read().decode('utf-8'))\n\n# Delete existing gateway if present\ntry:\n    gateways = api_request('GET', '/gateways')\n    for gw in gateways:\n        if gw.get('name') == 'slow_time':\n            print(f'Found existing gateway {gw[\\\"id\\\"]}, deleting...')\n            api_request('DELETE', f'/gateways/{gw[\\\"id\\\"]}')\nexcept Exception as e:\n    print(f'Note: {e}')\n\n# Register the gateway\ntry:\n    result = api_request('POST', '/gateways', {\n        'name': 'slow_time',\n        'url': 'http://slow_time_server:8081/mcp',\n        'transport': 'STREAMABLEHTTP'\n    })\n    gateway_id = result.get('id')\n    print(f'✅ Registered slow_time_server (gateway_id: {gateway_id})')\nexcept Exception as e:\n    print(f'❌ Registration failed: {e}')\n    exit(1)\n\"\necho \"✅ Registration complete!\"\n","environment":["JWT_SECRET_KEY=${JWT_SECRET_KEY:?JWT_SECRET_KEY is not set. Run: make setup (first time) or make init-secrets-patch-env (if .env exists)}","AUTH_ENCRYPTION_SECRET=${AUTH_ENCRYPTION_SECRET:?AUTH_ENCRYPTION_SECRET is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","MCP_LIST_PAGE_SIZE=${MCP_LIST_PAGE_SIZE:-100}","MCP_LIST_CURSOR_TTL_SECONDS=${MCP_LIST_CURSOR_TTL_SECONDS:-900}","MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES=${MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES:-67108864}","MCP_PROXY_LIST_MAX_TOTAL_BYTES=${MCP_PROXY_LIST_MAX_TOTAL_BYTES:-134217728}","MCP_PROXY_LIST_MAX_COLLECTORS=${MCP_PROXY_LIST_MAX_COLLECTORS:-32}","MCP_PROXY_LIST_MAX_SNAPSHOTS=${MCP_PROXY_LIST_MAX_SNAPSHOTS:-64}","PLATFORM_ADMIN_PASSWORD=${PLATFORM_ADMIN_PASSWORD:?PLATFORM_ADMIN_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","DEFAULT_USER_PASSWORD=${DEFAULT_USER_PASSWORD:?DEFAULT_USER_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}"],"depends_on":["gateway","slow_time_server"]},{"name":"a2a_echo_agent","image":"ghcr.io/ibm/cfex-a2a-echo-agent:latest","restart":"unless-stopped","ports":["9100:9100"],"environment":["A2A_ECHO_ADDR=0.0.0.0:9100","A2A_ECHO_NAME=a2a-echo-agent","A2A_ECHO_PROTOCOL_VERSION=1.0.0","A2A_ECHO_PUBLIC_URL=http://127.0.0.1:9100","A2A_ECHO_LOG_LEVEL=info"]},{"name":"a2a_echo_agent_v0_3_0","image":"ghcr.io/ibm/cfex-a2a-echo-agent:latest","restart":"unless-stopped","ports":["9101:9100"],"environment":["A2A_ECHO_ADDR=0.0.0.0:9100","A2A_ECHO_NAME=a2a-echo-agent-v0-3-0","A2A_ECHO_PROTOCOL_VERSION=0.3.0","A2A_ECHO_PUBLIC_URL=http://127.0.0.1:9101","A2A_ECHO_LOG_LEVEL=info"]},{"name":"register_a2a_echo","image":"${IMAGE_LOCAL:-mcpgateway/mcpgateway:latest}","restart":"no","command":"echo \"Registering a2a_echo_agent with gateway...\"\n\n# Generate JWT token (stdout only)\nexport MCPGATEWAY_BEARER_TOKEN=$$(python3 -m mcpgateway.utils.create_jwt_token --username admin@example.com --exp 10080 --secret $$JWT_SECRET_KEY --algo HS256 2>/dev/null)\n\npython3 -c \"\nimport json\nimport os\nimport urllib.request\n\ntoken = os.environ.get('MCPGATEWAY_BEARER_TOKEN', '')\n\ndef api_request(method, path, data=None):\n    url = f'http://gateway:4444{path}'\n    body = json.dumps(data).encode('utf-8') if data is not None else None\n    req = urllib.request.Request(url, data=body, method=method)\n    req.add_header('Authorization', f'Bearer {token}')\n    req.add_header('Content-Type', 'application/json')\n    with urllib.request.urlopen(req, timeout=30) as resp:\n        return json.loads(resp.read().decode('utf-8'))\n\n# Delete existing agent if present\ntry:\n    agents = api_request('GET', '/a2a')\n    items = agents if isinstance(agents, list) else agents.get('agents', agents.get('items', []))\n    for a in items:\n        if a.get('name') == 'a2a-echo-agent':\n            print(f'Deleting existing A2A agent {a.get(\\\"id\\\")}...')\n            api_request('DELETE', f'/a2a/{a.get(\\\"id\\\")}')\nexcept Exception as e:\n    print(f'Note: {e}')\n\n# Register agent (JSON-RPC endpoint at /)\npayload = {\n    'agent': {\n        'name': 'a2a-echo-agent',\n        'description': 'Lightweight A2A echo agent for docker-compose testing',\n        'endpoint_url': 'http://a2a_echo_agent:9100/',\n        'agent_type': 'jsonrpc',\n        'protocol_version': '1.0.0',\n        'capabilities': {'echo': True, 'transport': 'JSONRPC', 'supportsLegacyInterop': True},\n        'tags': ['testing', 'a2a', 'echo']\n    },\n    'visibility': 'public'\n}\n\nresult = api_request('POST', '/a2a', payload)\nprint(f'✅ Registered a2a_echo_agent: {result.get(\\\"id\\\", \\\"unknown\\\")}')\n\"\necho \"✅ Registration complete!\"\n","environment":["JWT_SECRET_KEY=${JWT_SECRET_KEY:?JWT_SECRET_KEY is not set. Run: make setup (first time) or make init-secrets-patch-env (if .env exists)}","AUTH_ENCRYPTION_SECRET=${AUTH_ENCRYPTION_SECRET:?AUTH_ENCRYPTION_SECRET is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","MCP_LIST_PAGE_SIZE=${MCP_LIST_PAGE_SIZE:-100}","MCP_LIST_CURSOR_TTL_SECONDS=${MCP_LIST_CURSOR_TTL_SECONDS:-900}","MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES=${MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES:-67108864}","MCP_PROXY_LIST_MAX_TOTAL_BYTES=${MCP_PROXY_LIST_MAX_TOTAL_BYTES:-134217728}","MCP_PROXY_LIST_MAX_COLLECTORS=${MCP_PROXY_LIST_MAX_COLLECTORS:-32}","MCP_PROXY_LIST_MAX_SNAPSHOTS=${MCP_PROXY_LIST_MAX_SNAPSHOTS:-64}","PLATFORM_ADMIN_PASSWORD=${PLATFORM_ADMIN_PASSWORD:?PLATFORM_ADMIN_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","DEFAULT_USER_PASSWORD=${DEFAULT_USER_PASSWORD:?DEFAULT_USER_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}"],"depends_on":["gateway","a2a_echo_agent"]},{"name":"locust_token","image":"${IMAGE_LOCAL:-mcpgateway/mcpgateway:latest}","restart":"no","command":"set -eu\necho \"Generating JWT token for Locust...\"\nTOKEN=$$(python3 -m mcpgateway.utils.create_jwt_token --username admin@example.com --exp 10080 --secret $$JWT_SECRET_KEY --algo HS256 2>/dev/null)\nprintf \"%s\" \"$$TOKEN\" > /tokens/gateway.jwt\necho \"\"\necho \"✅ Token written to /tokens/gateway.jwt\"\n","environment":["JWT_SECRET_KEY=${JWT_SECRET_KEY:?JWT_SECRET_KEY is not set. Run: make setup (first time) or make init-secrets-patch-env (if .env exists)}","AUTH_ENCRYPTION_SECRET=${AUTH_ENCRYPTION_SECRET:?AUTH_ENCRYPTION_SECRET is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","MCP_LIST_PAGE_SIZE=${MCP_LIST_PAGE_SIZE:-100}","MCP_LIST_CURSOR_TTL_SECONDS=${MCP_LIST_CURSOR_TTL_SECONDS:-900}","MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES=${MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES:-67108864}","MCP_PROXY_LIST_MAX_TOTAL_BYTES=${MCP_PROXY_LIST_MAX_TOTAL_BYTES:-134217728}","MCP_PROXY_LIST_MAX_COLLECTORS=${MCP_PROXY_LIST_MAX_COLLECTORS:-32}","MCP_PROXY_LIST_MAX_SNAPSHOTS=${MCP_PROXY_LIST_MAX_SNAPSHOTS:-64}","PLATFORM_ADMIN_PASSWORD=${PLATFORM_ADMIN_PASSWORD:?PLATFORM_ADMIN_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","DEFAULT_USER_PASSWORD=${DEFAULT_USER_PASSWORD:?DEFAULT_USER_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}"],"volumes":["locust_token:/tokens"]},{"name":"locust","image":"locustio/locust:latest","restart":"unless-stopped","command":"set -eu\nwhile [ ! -s /tokens/gateway.jwt ]; do echo \"Waiting for gateway JWT...\"; sleep 0.5; done\nexport MCPGATEWAY_BEARER_TOKEN=\"$$(cat /tokens/gateway.jwt)\"\nMODE=\"$${LOCUST_MODE:-master}\"\nif [ \"$$MODE\" = \"headless\" ]; then\n  exec locust -f /mnt/locust/$${LOCUST_LOCUSTFILE:-locustfile.py} \\\n    --host=http://nginx:80 \\\n    --users=\"$${LOCUST_USERS:-100}\" \\\n    --spawn-rate=\"$${LOCUST_SPAWN_RATE:-10}\" \\\n    --run-time=\"$${LOCUST_RUN_TIME:-5m}\" \\\n    --headless \\\n    --html=/mnt/reports/locust_report.html \\\n    --csv=/mnt/reports/locust \\\n    --only-summary\nfi\n\nexec locust -f /mnt/locust/$${LOCUST_LOCUSTFILE:-locustfile.py} \\\n  --host=http://nginx:80 \\\n  --web-host=0.0.0.0 --web-port=8089 \\\n  --master --expect-workers=\"$${LOCUST_EXPECT_WORKERS:-1}\" \\\n  --class-picker\n","ports":["8089:8089"],"environment":["HOME=/tmp","LOCUST_EXPECT_WORKERS=${LOCUST_EXPECT_WORKERS:-1}","LOCUST_MODE=${LOCUST_MODE:-master}","LOCUST_LOCUSTFILE=${LOCUST_LOCUSTFILE:-locustfile.py}","LOCUST_USERS=${LOCUST_USERS:-100}","LOCUST_SPAWN_RATE=${LOCUST_SPAWN_RATE:-10}","LOCUST_RUN_TIME=${LOCUST_RUN_TIME:-5m}","LOCUST_WXO_AUTH_ENABLED=${LOCUST_WXO_AUTH_ENABLED:-false}"],"volumes":["./tests/loadtest:/mnt/locust:ro","locust_token:/tokens:ro","./reports:/mnt/reports"],"depends_on":["gateway","nginx","locust_token"]},{"name":"locust_worker","image":"locustio/locust:latest","restart":"unless-stopped","command":"set -eu\nwhile [ ! -s /tokens/gateway.jwt ]; do echo \"Waiting for gateway JWT...\"; sleep 0.5; done\nexport MCPGATEWAY_BEARER_TOKEN=\"$$(cat /tokens/gateway.jwt)\"\nexec locust -f /mnt/locust/$${LOCUST_LOCUSTFILE:-locustfile.py} \\\n  --host=http://nginx:80 \\\n  --worker --master-host=locust\n","environment":["HOME=/tmp","LOCUST_LOCUSTFILE=${LOCUST_LOCUSTFILE:-locustfile.py}","LOCUST_WXO_AUTH_ENABLED=${LOCUST_WXO_AUTH_ENABLED:-false}"],"volumes":["./tests/loadtest:/mnt/locust:ro","locust_token:/tokens:ro"],"depends_on":["locust","locust_token"]},{"name":"benchmark_server","image":"ghcr.io/ibm/cfex-mcp-benchmark-server:latest","restart":"unless-stopped","command":"-transport=http -server-count=${BENCHMARK_SERVER_COUNT:-10} -start-port=${BENCHMARK_START_PORT:-9000} -tools=50 -resources=20 -prompts=10","ports":["9000-9099:9000-9099"]},{"name":"register_benchmark","image":"${IMAGE_LOCAL:-mcpgateway/mcpgateway:latest}","restart":"no","command":"echo \"Registering benchmark servers with gateway...\"\n\n# Wait for benchmark servers to start (no healthcheck available)\necho \"Waiting for benchmark servers to start...\"\nsleep 5\n\n# Generate JWT token\nexport MCPGATEWAY_BEARER_TOKEN=$$(python3 -m mcpgateway.utils.create_jwt_token --username admin@example.com --exp 10080 --secret $$JWT_SECRET_KEY --algo HS256 2>/dev/null)\n\n# Register benchmark servers using environment variables\npython3 -c \"\nimport urllib.request\nimport json\nimport os\n\ntoken = os.environ.get('MCPGATEWAY_BEARER_TOKEN', '')\nserver_count = int(os.environ.get('BENCHMARK_SERVER_COUNT', '10'))\nstart_port = int(os.environ.get('BENCHMARK_START_PORT', '9000'))\n\nheaders = {\n    'Authorization': f'Bearer {token}',\n    'Content-Type': 'application/json'\n}\n\ndef api_request(method, path, data=None):\n    url = f'http://gateway:4444{path}'\n    body = json.dumps(data).encode() if data else None\n    req = urllib.request.Request(url, data=body, headers=headers, method=method)\n    with urllib.request.urlopen(req, timeout=30) as resp:\n        return json.loads(resp.read().decode())\n\n# Register benchmark servers\nprint(f'Registering {server_count} benchmark servers (ports {start_port}-{start_port + server_count - 1})...')\nregistered = 0\nfor port in range(start_port, start_port + server_count):\n    name = f'benchmark-{port}'\n    try:\n        result = api_request('POST', '/gateways', {\n            'name': name,\n            'url': f'http://benchmark_server:{port}/mcp',\n            'transport': 'STREAMABLEHTTP'\n        })\n        print(f'✅ Registered {name}: {result.get(\\\"id\\\", \\\"unknown\\\")}')\n        registered += 1\n    except urllib.error.HTTPError as e:\n        if e.code == 409:\n            print(f'⏭️  {name} already registered')\n            registered += 1\n        else:\n            print(f'❌ Failed to register {name}: HTTP {e.code}')\n    except Exception as e:\n        print(f'❌ Failed to register {name}: {e}')\n\nprint(f'✅ Registration complete: {registered}/{server_count} benchmark servers')\n\"\n","environment":["JWT_SECRET_KEY=${JWT_SECRET_KEY:?JWT_SECRET_KEY is not set. Run: make setup (first time) or make init-secrets-patch-env (if .env exists)}","AUTH_ENCRYPTION_SECRET=${AUTH_ENCRYPTION_SECRET:?AUTH_ENCRYPTION_SECRET is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","MCP_LIST_PAGE_SIZE=${MCP_LIST_PAGE_SIZE:-100}","MCP_LIST_CURSOR_TTL_SECONDS=${MCP_LIST_CURSOR_TTL_SECONDS:-900}","MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES=${MCP_PROXY_LIST_MAX_SNAPSHOT_BYTES:-67108864}","MCP_PROXY_LIST_MAX_TOTAL_BYTES=${MCP_PROXY_LIST_MAX_TOTAL_BYTES:-134217728}","MCP_PROXY_LIST_MAX_COLLECTORS=${MCP_PROXY_LIST_MAX_COLLECTORS:-32}","MCP_PROXY_LIST_MAX_SNAPSHOTS=${MCP_PROXY_LIST_MAX_SNAPSHOTS:-64}","PLATFORM_ADMIN_PASSWORD=${PLATFORM_ADMIN_PASSWORD:?PLATFORM_ADMIN_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","DEFAULT_USER_PASSWORD=${DEFAULT_USER_PASSWORD:?DEFAULT_USER_PASSWORD is not set. Run: make setup (if .env does not exist) or make init-secrets-patch-env (if .env exists)}","BENCHMARK_SERVER_COUNT=${BENCHMARK_SERVER_COUNT:-10}","BENCHMARK_START_PORT=${BENCHMARK_START_PORT:-9000}"],"depends_on":["gateway","benchmark_server"]},{"name":"cert_init","image":"debian:bookworm-slim","command":"apt-get update\napt-get install -y --no-install-recommends openssl\nrm -rf /var/lib/apt/lists/*\n# Check if we have an encrypted key that needs decryption\nif [ -f /certs/key-encrypted.pem ] && [ -n \"$${KEY_FILE_PASSWORD}\" ]; then\n  # Validate: encrypted key requires matching certificate\n  if [ ! -f /certs/cert.pem ]; then\n    echo \"❌ Found key-encrypted.pem but cert.pem is missing\"\n    echo \"   Please provide both files: cert.pem and key-encrypted.pem\"\n    exit 1\n  fi\n  echo \"🔓 Decrypting passphrase-protected key for nginx...\"\n  if [ -f /certs/key.pem ]; then\n    echo \"⚠️  Overwriting existing key.pem with decrypted version\"\n  fi\n  # Decrypt the key for nginx (nginx doesn't support passphrase-protected keys)\n  # Using env: prefix to avoid exposing password in process listing\n  openssl rsa -in /certs/key-encrypted.pem -out /certs/key.pem -passin env:KEY_FILE_PASSWORD\n  if [ $? -eq 0 ]; then\n    chmod 640 /certs/key.pem\n    echo \"✅ Successfully decrypted key-encrypted.pem to key.pem\"\n  else\n    echo \"❌ Failed to decrypt key-encrypted.pem - check KEY_FILE_PASSWORD\"\n    exit 1\n  fi\nfi\n\n# Check if we already have unencrypted certs\nif [ -f /certs/cert.pem ] && [ -f /certs/key.pem ]; then\n  echo \"✅ Certificates found in ./certs - using existing\"\n  exit 0\nfi\n\n# Generate new self-signed certificate (without passphrase for nginx)\necho \"🔏 Generating self-signed TLS certificate...\"\nmkdir -p /certs\nopenssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes \\\n  -keyout /certs/key.pem -out /certs/cert.pem \\\n  -subj \"/CN=localhost\" \\\n  -addext \"subjectAltName=DNS:localhost,DNS:gateway,DNS:nginx,IP:127.0.0.1\"\nchmod 644 /certs/cert.pem\nchmod 640 /certs/key.pem\necho \"✅ TLS certificate generated in ./certs\"\n","environment":["KEY_FILE_PASSWORD=${KEY_FILE_PASSWORD:-}"],"volumes":["./certs:/certs"]},{"name":"nginx_tls","image":"mcpgateway/nginx-cache:latest","build":{"context":"./infra/nginx","dockerfile":"Dockerfile"},"restart":"unless-stopped","ports":["${NGINX_PORT:-8080}:80","8443:443"],"environment":["NGINX_FORCE_HTTPS=${NGINX_FORCE_HTTPS:-false}","GATEWAY_SCHEME=${GATEWAY_SCHEME:-http}"],"volumes":["nginx_cache:/var/cache/nginx","./infra/nginx/nginx-tls.conf:/etc/nginx/nginx.conf:ro","./certs:/app/certs:ro"],"depends_on":["gateway","cert_init"]},{"name":"mcp_inspector","image":"ghcr.io/modelcontextprotocol/inspector:latest","restart":"unless-stopped","ports":["6274:6274","6277:6277"],"environment":["HOST=0.0.0.0","MCP_AUTO_OPEN_ENABLED=false","DANGEROUSLY_OMIT_AUTH=true"],"depends_on":["gateway"]},{"name":"zap","image":"ghcr.io/zaproxy/zaproxy:stable","restart":"unless-stopped","command":"zap.sh -daemon -port 8090 -host 0.0.0.0 -config api.key=${ZAP_API_KEY:-changeme} -config api.addrs.addr.name=.* -config api.addrs.addr.regex=true -config connection.timeoutInSecs=20","ports":["8090:8090"],"environment":["ZAP_API_KEY=${ZAP_API_KEY:-changeme}"],"depends_on":["nginx"]}],"exposedPorts":["8080","8180","5433","6432","6379","9187","9121","9127","9113","8085","9090","3101","3200","4317","4318","3000","5050","8081","8888","9102","9103","8889","9100","9101","8089","8443","6274","6277","8090"],"dockerRunCommand":"docker run -d --name mcp-context-forge -p 8080:8080 --restart always ghcr.io/ibm/cfex-mcp-slow-time-server:latest","podmanRunCommand":"podman run -d --name mcp-context-forge -p 8080:8080 --restart always ghcr.io/ibm/cfex-mcp-slow-time-server:latest","skopeoInspectCommand":"skopeo inspect docker://ghcr.io/ibm/cfex-mcp-slow-time-server:latest","orasPullCommand":"oras pull ghcr.io/ibm/cfex-mcp-slow-time-server:latest","registryMeta":{"provider":"ghcr","image":"ghcr.io/ibm/cfex-mcp-slow-time-server","canonicalImage":"ghcr.io/ibm/cfex-mcp-slow-time-server:latest","latestTag":"latest","multiArch":["linux/amd64","linux/arm64"],"lastUpdated":"2026-12-01T12:19:38.168Z","cliCommands":{"dockerRun":"docker run -d --name mcp-context-forge -p 8080:8080 --restart always ghcr.io/ibm/cfex-mcp-slow-time-server:latest","dockerPull":"docker pull ghcr.io/ibm/cfex-mcp-slow-time-server:latest","podmanRun":"podman run -d --name mcp-context-forge -p 8080:8080 --restart always ghcr.io/ibm/cfex-mcp-slow-time-server:latest","skopeoInspect":"skopeo inspect docker://ghcr.io/ibm/cfex-mcp-slow-time-server:latest","orasPull":"oras pull ghcr.io/ibm/cfex-mcp-slow-time-server:latest","composeYaml":"services:\n  mcp-context-forge:\n    image: ghcr.io/ibm/cfex-mcp-slow-time-server:latest\n    restart: unless-stopped\n    ports:\n      - \"8080:8080\""}}}