# Technical Documentation: IBM/mcp-context-forge

> ℹ️ **Provenance:** In-Tree Documentation (8 Chapters) · [CodeWiki Reference](https://codewiki.google/github.com/IBM/mcp-context-forge) · Recency: Active (< 180 days)

## File: charts/mcp-stack/README.md

# mcp-stack

  

A full-stack Helm chart for IBM's **Model Context Protocol (MCP) Gateway
& Registry - Context-Forge**.  It bundles:
  - ContextForge application (HTTP / WebSocket server)
  - PostgreSQL database with persistent storage
  - Redis cache for sessions & completions
  - Optional PgAdmin and Redis-Commander web UIs

**Homepage:** <https://github.com/IBM/mcp-context-forge>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| Mihai Criveti |  | <https://github.com/IBM> |

## Source Code

* <https://github.com/IBM/mcp-context-forge>

## Requirements

Kubernetes: `>=1.21.0-0`

## SSRF and In-Cluster Tool Registration

By default, the chart uses strict SSRF settings:

- `mcpContextForge.config.SSRF_ALLOW_LOCALHOST="false"`
- `mcpContextForge.config.SSRF_ALLOW_PRIVATE_NETWORKS="false"`
- `mcpContextForge.config.SSRF_ALLOWED_NETWORKS="[]"`

This is the recommended production baseline.
When you enable the Fast Time testing registration job (`testing.fastTime.register.enabled`), it creates a gateway that points to the in-cluster service URL:

- `fast-time`: `http://<release>-mcp-fast-time-server:80/http`

That destination is a private cluster address and will be blocked under strict SSRF defaults.


### Example: Allow only expected cluster CIDRs (preferred)

```yaml
mcpContextForge:
  config:
    SSRF_PROTECTION_ENABLED: "true"
    SSRF_ALLOW_LOCALHOST: "false"
    SSRF_ALLOW_PRIVATE_NETWORKS: "false"
    SSRF_ALLOWED_NETWORKS: '["10.96.0.0/12"]' # example Service CIDR, adjust for your cluster
    SSRF_DNS_FAIL_CLOSED: "true"
```

### Example: Local benchmark profile (broader allowance)

```yaml
mcpContextForge:
  config:
    SSRF_PROTECTION_ENABLED: "true"
    SSRF_ALLOW_LOCALHOST: "false"
    SSRF_ALLOW_PRIVATE_NETWORKS: "true"
    SSRF_DNS_FAIL_CLOSED: "true"
```

If registration fails with `422` and mentions blocked private network addresses, update SSRF values and
retry the Helm upgrade.

## Kubernetes Process Limits

**Important:** Kubernetes does NOT provide native per-container process limits equivalent to Docker's `ulimits.nproc`.

To prevent resource exhaustion in Kubernetes deployments, implement defense-in-depth using:

### Option 1: Admission Controllers (Recommended)

**OPA Gatekeeper:**
```yaml
apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sProcessLimit
metadata:
  name: container-process-limit
spec:
  match:
    kinds:
      - apiGroups: [""]
        kinds: ["Pod"]
  parameters:
    maxProcesses: 5000
```

**Kyverno:**
```yaml
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: limit-processes
spec:
  validationFailureAction: enforce
  rules:
    - name: check-process-limit
      match:
        resources:
          kinds:
            - Pod
      validate:
        message: "Container must not spawn excessive processes"
        pattern:
          spec:
            containers:
              - =(securityContext):
                  =(capabilities):
                    drop:
                      - SYS_ADMIN
```

### Option 2: Runtime Security Tools

**Falco Rule:**
```yaml
- rule: Excessive Process Creation
  desc: Detect rapid process creation patterns
  condition: >
    spawned_process and
    proc.pname = proc.name and
    evt.count > 100 in 1s
  output: "Rapid process creation detected (user=%user.name container=%container.name)"
  priority: CRITICAL
```

### Option 3: Node-level cgroups v2 (Advanced)

Configure pids.max at the node level (affects all pods on the node):
```bash
echo 5000 > /sys/fs/cgroup/kubepods/pids.max
```

**Note:** Requires node-level access and impacts all pods on the node.

For detailed guidance on resource limits and process management, see `docs/docs/security/resource-limits.md` in the repository.

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| global.imagePullSecrets | list | `[]` |  |
| global.nameOverride | string | `""` |  |
| global.fullnameOverride | string | `""` |  |
| serviceAccount.create | bool | `false` | Create a ServiceAccount for all pods in this release |
| serviceAccount.name | string | `""` | ServiceAccount name. If empty and create=true, uses release fullname. If create=false, uses this name or "default" |
| serviceAccount.annotations | object | `{}` | Annotations for the ServiceAccount (e.g., AWS IRSA, GCP Workload Identity) |
| serviceAccount.automountServiceAccountToken | bool | `false` | Mount the ServiceAccount token in pods (applies at PodSpec level in chart templates) |
| mcpContextForge.pluginConfig.enabled | bool | `false` |  |
| mcpContextForge.pluginConfig.plugins | string | `"# plugin file\n"` |  |
| mcpContextForge.replicaCount | int | `2` |  |
| mcpContextForge.hpa | object | `{"enabled":true,"maxReplicas":10,"minReplicas":2,"targetCPUUtilizationPercentage":90,"targetMemoryUtilizationPercentage":90}` | ------------------------------------------------------------------ |
| mcpContextForge.image.repository | string | `"ghcr.io/ibm/mcp-context-forge"` |  |
| mcpContextForge.image.tag | string | `"latest"` |  |
| mcpContextForge.image.pullPolicy | string | `"Always"` |  |
| mcpContextForge.service.type | string | `"ClusterIP"` |  |
| mcpContextForge.service.port | int | `80` |  |
| mcpContextForge.service.annotations | object | `{}` |  |
| mcpContextForge.containerPort | int | `4444` |  |
| mcpContextForge.metrics.enabled | bool | `true` |  |
| mcpContextForge.metrics.port | int | `8000` |  |
| mcpContextForge.metrics.serviceMonitor.enabled | bool | `true` |  |
| mcpContextForge.metrics.customLabels | object | `{}` |  |
| mcpContextForge.probes.startup.type | string | `"exec"` |  |
| mcpContextForge.probes.startup.command[0] | string | `"sh"` |  |
| mcpContextForge.probes.startup.command[1] | string | `"-c"` |  |
| mcpContextForge.probes.startup.command[2] | string | `"sleep 10"` |  |
| mcpContextForge.probes.startup.timeoutSeconds | int | `15` |  |
| mcpContextForge.probes.startup.periodSeconds | int | `5` |  |
| mcpContextForge.probes.startup.failureThreshold | int | `1` |  |
| mcpContextForge.probes.readiness.type | string | `"http"` |  |
| mcpContextForge.probes.readiness.path | string | `"/ready"` |  |
| mcpContextForge.probes.readiness.port | int | `4444` |  |
| mcpContextForge.probes.readiness.initialDelaySeconds | int | `15` |  |
| mcpContextForge.probes.readiness.periodSeconds | int | `10` |  |
| mcpContextForge.probes.readiness.timeoutSeconds | int | `2` |  |
| mcpContextForge.probes.readiness.successThreshold | int | `1` |  |
| mcpContextForge.probes.readiness.failureThreshold | int | `3` |  |
| mcpContextForge.probes.liveness.type | string | `"http"` |  |
| mcpContextForge.probes.liveness.path | string | `"/health"` |  |
| mcpContextForge.probes.liveness.port | int | `4444` |  |
| mcpContextForge.probes.liveness.initialDelaySeconds | int | `10` |  |
| mcpContextForge.probes.liveness.periodSeconds | int | `15` |  |
| mcpContextForge.probes.liveness.timeoutSeconds | int | `2` |  |
| mcpContextForge.probes.liveness.successThreshold | int | `1` |  |
| mcpContextForge.probes.liveness.failureThreshold | int | `3` |  |
| mcpContextForge.resources.limits.cpu | string | `"2"` |  |
| mcpContextForge.resources.limits.memory | string | `"2Gi"` |  |
| mcpContextForge.resources.requests.cpu | string | `"500m"` |  |
| mcpContextForge.resources.requests.memory | string | `"768Mi"` |  |
| mcpContextForge.ingress.enabled | bool | `true` |  |
| mcpContextForge.ingress.className | string | `"nginx"` |  |
| mcpContextForge.ingress.host | string | `"gateway.local"` |  |
| mcpContextForge.ingress.path | string | `"/"` |  |
| mcpContextForge.ingress.pathType | string | `"Prefix"` |  |
| mcpContextForge.ingress.annotations | object | `{}` |  |
| mcpContextForge.ingress.tls.enabled | bool | `true` |  |
| mcpContextForge.ingress.tls.secretName | string | `""` |  |
| mcpContextForge.env.host | string | `"0.0.0.0"` |  |
| mcpContextForge.env.postgres.port | int | `5432` |  |
| mcpContextForge.env.postgres.db | string | `"postgresdb"` |  |
| mcpContextForge.env.postgres.userKey | string | `"POSTGRES_USER"` |  |
| mcpContextForge.env.postgres.passwordKey | string | `"POSTGRES_PASSWORD"` |  |
| mcpContextForge.env.redis.host | string | `""` |  |
| mcpContextForge.env.redis.port | int | `6379` |  |
| mcpContextForge.config.GUNICORN_WORKERS | string | `"2"` |  |
| mcpContextForge.config.GUNICORN_TIMEOUT | string | `"600"` |  |
| mcpContextForge.config.GUNICORN_MAX_REQUESTS | string | `"100000"` |  |
| mcpContextForge.config.GUNICORN_MAX_REQUESTS_JITTER | string | `"100"` |  |
| mcpContextForge.config.GUNICORN_PRELOAD_APP | string | `"true"` |  |
| mcpContextForge.config.GUNICORN_DEV_MODE | string | `"false"` |  |
| mcpContextForge.config.DISABLE_ACCESS_LOG | string | `"true"` |  |
| mcpContextForge.config.APP_NAME | string | `"ContextForge"` |  |
| mcpContextForge.config.HOST | string | `"0.0.0.0"` |  |
| mcpContextForge.config.PORT | string | `"4444"` |  |
| mcpContextForge.config.APP_ROOT_PATH | string | `""` |  |
| mcpContextForge.config.CLIENT_MODE | string | `"false"` |  |
| mcpContextForge.config.TEMPLATES_DIR | string | `"/app/mcpgateway/templates"` |  |
| mcpContextForge.config.STATIC_DIR | string | `"/app/mcpgateway/static"` |  |
| mcpContextForge.config.DB_POOL_SIZE | string | `"15"` |  |
| mcpContextForge.config.DB_MAX_OVERFLOW | string | `"30"` |  |
| mcpContextForge.config.DB_POOL_TIMEOUT | string | `"30"` |  |
| mcpContextForge.config.DB_POOL_RECYCLE | string | `"3600"` |  |
| mcpContextForge.config.DB_SQLITE_BUSY_TIMEOUT | string | `"5000"` |  |
| mcpContextForge.config.CACHE_TYPE | string | `"redis"` |  |
| mcpContextForge.config.CACHE_PREFIX | string | `"mcpgw:"` |  |
| mcpContextForge.config.SESSION_TTL | string | `"3600"` |  |
| mcpContextForge.config.MESSAGE_TTL | string | `"600"` |  |
| mcpContextForge.config.REDIS_MAX_RETRIES | string | `"30"` |  |
| mcpContextForge.config.REDIS_RETRY_INTERVAL_MS | string | `"2000"` |  |
| mcpContextForge.config.REDIS_MAX_BACKOFF_SECONDS | string | `"30"` |  |
| mcpContextForge.config.DB_MAX_RETRIES | string | `"30"` |  |
| mcpContextForge.config.DB_RETRY_INTERVAL_MS | string | `"2000"` |  |
| mcpContextForge.config.DB_MAX_BACKOFF_SECONDS | string | `"30"` |  |
| mcpContextForge.config.REDIS_MAX_CONNECTIONS | string | `"50"` |  |
| mcpContextForge.config.REDIS_SOCKET_TIMEOUT | string | `"2.0"` |  |
| mcpContextForge.config.REDIS_SOCKET_CONNECT_TIMEOUT | string | `"2.0"` |  |
| mcpContextForge.config.REDIS_RETRY_ON_TIMEOUT | string | `"true"` |  |
| mcpContextForge.config.REDIS_HEALTH_CHECK_INTERVAL | string | `"30"` |  |
| mcpContextForge.config.REDIS_DECODE_RESPONSES | string | `"true"` |  |
| mcpContextForge.config.REDIS_LEADER_TTL | string | `"15"` |  |
| mcpContextForge.config.REDIS_LEADER_KEY | string | `"gateway_service_leader"` |  |
| mcpContextForge.config.REDIS_LEADER_HEARTBEAT_INTERVAL | string | `"5"` |  |
| mcpContextForge.config.AUTH_CACHE_ENABLED | string | `"true"` |  |
| mcpContextForge.config.AUTH_CACHE_USER_TTL | string | `"60"` |  |
| mcpContextForge.config.AUTH_CACHE_REVOCATION_TTL | string | `"30"` |  |
| mcpContextForge.config.AUTH_CACHE_TEAM_TTL | string | `"60"` |  |
| mcpContextForge.config.AUTH_CACHE_ROLE_TTL | string | `"60"` |  |
| mcpContextForge.config.AUTH_CACHE_TEAMS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.AUTH_CACHE_TEAMS_TTL | string | `"60"` |  |
| mcpContextForge.config.AUTH_CACHE_BATCH_QUERIES | string | `"true"` |  |
| mcpContextForge.config.REGISTRY_CACHE_ENABLED | string | `"true"` |  |
| mcpContextForge.config.REGISTRY_CACHE_TOOLS_TTL | string | `"20"` |  |
| mcpContextForge.config.REGISTRY_CACHE_PROMPTS_TTL | string | `"15"` |  |
| mcpContextForge.config.REGISTRY_CACHE_RESOURCES_TTL | string | `"15"` |  |
| mcpContextForge.config.REGISTRY_CACHE_AGENTS_TTL | string | `"20"` |  |
| mcpContextForge.config.REGISTRY_CACHE_SERVERS_TTL | string | `"20"` |  |
| mcpContextForge.config.REGISTRY_CACHE_GATEWAYS_TTL | string | `"20"` |  |
| mcpContextForge.config.REGISTRY_CACHE_CATALOG_TTL | string | `"300"` |  |
| mcpContextForge.config.TOOL_LOOKUP_CACHE_ENABLED | string | `"true"` |  |
| mcpContextForge.config.TOOL_LOOKUP_CACHE_TTL_SECONDS | string | `"60"` |  |
| mcpContextForge.config.TOOL_LOOKUP_CACHE_NEGATIVE_TTL_SECONDS | string | `"10"` |  |
| mcpContextForge.config.TOOL_LOOKUP_CACHE_L1_MAXSIZE | string | `"10000"` |  |
| mcpContextForge.config.TOOL_LOOKUP_CACHE_L2_ENABLED | string | `"true"` |  |
| mcpContextForge.config.ADMIN_STATS_CACHE_ENABLED | string | `"true"` |  |
| mcpContextForge.config.ADMIN_STATS_CACHE_SYSTEM_TTL | string | `"60"` |  |
| mcpContextForge.config.ADMIN_STATS_CACHE_OBSERVABILITY_TTL | string | `"30"` |  |
| mcpContextForge.config.ADMIN_STATS_CACHE_TAGS_TTL | string | `"120"` |  |
| mcpContextForge.config.ADMIN_STATS_CACHE_PLUGINS_TTL | string | `"120"` |  |
| mcpContextForge.config.ADMIN_STATS_CACHE_PERFORMANCE_TTL | string | `"60"` |  |
| mcpContextForge.config.TEAM_MEMBER_COUNT_CACHE_ENABLED | string | `"true"` |  |
| mcpContextForge.config.TEAM_MEMBER_COUNT_CACHE_TTL | string | `"300"` |  |
| mcpContextForge.config.METRICS_CACHE_ENABLED | string | `"true"` |  |
| mcpContextForge.config.METRICS_CACHE_TTL_SECONDS | string | `"60"` |  |
| mcpContextForge.config.PROTOCOL_VERSION | string | `"2025-06-18"` |  |
| mcpContextForge.config.MCPGATEWAY_UI_ENABLED | string | `"true"` |  |
| mcpContextForge.config.MCPGATEWAY_UI_AIRGAPPED | string | `"false"` |  |
| mcpContextForge.config.MCPGATEWAY_ADMIN_API_ENABLED | string | `"true"` |  |
| mcpContextForge.config.MCPGATEWAY_BULK_IMPORT_ENABLED | string | `"true"` |  |
| mcpContextForge.config.MCPGATEWAY_BULK_IMPORT_MAX_TOOLS | string | `"200"` |  |
| mcpContextForge.config.MCPGATEWAY_BULK_IMPORT_RATE_LIMIT | string | `"10"` |  |
| mcpContextForge.config.MCPGATEWAY_A2A_ENABLED | string | `"true"` |  |
| mcpContextForge.config.MCPGATEWAY_A2A_MAX_AGENTS | string | `"100"` |  |
| mcpContextForge.config.MCPGATEWAY_A2A_DEFAULT_TIMEOUT | string | `"30"` |  |
| mcpContextForge.config.MCPGATEWAY_A2A_MAX_RETRIES | string | `"3"` |  |
| mcpContextForge.config.MCPGATEWAY_A2A_METRICS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.MCPGATEWAY_DIRECT_PROXY_ENABLED | string | `"false"` |  |
| mcpContextForge.config.MCPGATEWAY_DIRECT_PROXY_TIMEOUT | string | `"30"` |  |
| mcpContextForge.config.MCPGATEWAY_CATALOG_ENABLED | string | `"true"` |  |
| mcpContextForge.config.MCPGATEWAY_CATALOG_FILE | string | `"mcp-catalog.yml"` |  |
| mcpContextForge.config.MCPGATEWAY_CATALOG_AUTO_HEALTH_CHECK | string | `"true"` |  |
| mcpContextForge.config.MCPGATEWAY_CATALOG_CACHE_TTL | string | `"3600"` |  |
| mcpContextForge.config.MCPGATEWAY_CATALOG_PAGE_SIZE | string | `"100"` |  |
| mcpContextForge.config.MCPGATEWAY_UI_TOOL_TEST_TIMEOUT | string | `"60000"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_ACQUIRE_TIMEOUT | string | `"30.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_CIRCUIT_BREAKER_RESET | string | `"60.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_CIRCUIT_BREAKER_THRESHOLD | string | `"5"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_CREATE_TIMEOUT | string | `"30.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_ENABLED | string | `"false"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_EXPLICIT_HEALTH_RPC | string | `"false"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_HEALTH_CHECK_INTERVAL | string | `"60.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_HEALTH_CHECK_METHODS | string | `"[\"ping\", \"skip\"]"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_HEALTH_CHECK_TIMEOUT | string | `"5.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_IDENTITY_HEADERS | string | `"[\"authorization\", \"x-tenant-id\", \"x-user-id\", \"x-api-key\", \"cookie\"]"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_IDLE_EVICTION | string | `"600.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_MAX_PER_KEY | string | `"10"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_TRANSPORT_TIMEOUT | string | `"30.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_TTL | string | `"300.0"` |  |
| mcpContextForge.config.MCPGATEWAY_UI_EMBEDDED | string | `"false"` |  |
| mcpContextForge.config.MCPGATEWAY_UI_HIDE_SECTIONS | string | `""` |  |
| mcpContextForge.config.MCPGATEWAY_UI_HIDE_HEADER_ITEMS | string | `""` |  |
| mcpContextForge.config.MESSAGE_TTL | string | `"600"` |  |
| mcpContextForge.config.METRICS_AGGREGATION_AUTO_START | string | `"false"` |  |
| mcpContextForge.config.METRICS_AGGREGATION_BACKFILL_HOURS | string | `"6"` |  |
| mcpContextForge.config.METRICS_AGGREGATION_ENABLED | string | `"true"` |  |
| mcpContextForge.config.METRICS_AGGREGATION_WINDOW_MINUTES | string | `"5"` |  |
| mcpContextForge.config.METRICS_BUFFER_ENABLED | string | `"true"` |  |
| mcpContextForge.config.METRICS_BUFFER_FLUSH_INTERVAL | string | `"60"` |  |
| mcpContextForge.config.METRICS_BUFFER_MAX_SIZE | string | `"1000"` |  |
| mcpContextForge.config.METRICS_CACHE_ENABLED | string | `"true"` |  |
| mcpContextForge.config.METRICS_CACHE_TTL_SECONDS | string | `"60"` |  |
| mcpContextForge.config.METRICS_CLEANUP_BATCH_SIZE | string | `"10000"` |  |
| mcpContextForge.config.METRICS_CLEANUP_ENABLED | string | `"true"` |  |
| mcpContextForge.config.METRICS_CLEANUP_INTERVAL_HOURS | string | `"1"` |  |
| mcpContextForge.config.METRICS_CUSTOM_LABELS | string | `""` |  |
| mcpContextForge.config.METRICS_DELETE_RAW_AFTER_ROLLUP | string | `"true"` |  |
| mcpContextForge.config.METRICS_DELETE_RAW_AFTER_ROLLUP_HOURS | string | `"1"` |  |
| mcpContextForge.config.METRICS_EXCLUDED_HANDLERS | string | `""` |  |
| mcpContextForge.config.METRICS_NAMESPACE | string | `"default"` |  |
| mcpContextForge.config.METRICS_RETENTION_DAYS | string | `"7"` |  |
| mcpContextForge.config.METRICS_ROLLUP_ENABLED | string | `"true"` |  |
| mcpContextForge.config.METRICS_ROLLUP_INTERVAL_HOURS | string | `"1"` |  |
| mcpContextForge.config.METRICS_ROLLUP_LATE_DATA_HOURS | string | `"1"` |  |
| mcpContextForge.config.METRICS_ROLLUP_RETENTION_DAYS | string | `"365"` |  |
| mcpContextForge.config.METRICS_SUBSYSTEM | string | `""` |  |
| mcpContextForge.config.OBSERVABILITY_ENABLED | string | `"false"` |  |
| mcpContextForge.config.OBSERVABILITY_EVENTS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.OBSERVABILITY_EXCLUDE_PATHS | string | `"[\"/health\", \"/healthz\", \"/ready\", \"/metrics\", \"/static/.*\"]"` |  |
| mcpContextForge.config.OBSERVABILITY_INCLUDE_PATHS | string | `"[\"^/rpc/?$\", \"^/sse$\", \"^/message$\", \"^/mcp(?:/|$)\", \"^/servers/[^/]+/mcp/?$\", \"^/servers/[^/]+/sse$\", \"^/servers/[^/]+/message$\", \"^/a2a(?:/|$)\"]"` |  |
| mcpContextForge.config.OBSERVABILITY_MAX_TRACES | string | `"100000"` |  |
| mcpContextForge.config.OBSERVABILITY_METRICS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.OBSERVABILITY_SAMPLE_RATE | string | `"1.0"` |  |
| mcpContextForge.config.OBSERVABILITY_TRACE_HTTP_REQUESTS | string | `"true"` |  |
| mcpContextForge.config.OBSERVABILITY_TRACE_RETENTION_DAYS | string | `"7"` |  |
| mcpContextForge.config.OTEL_BSP_MAX_EXPORT_BATCH_SIZE | string | `"512"` |  |
| mcpContextForge.config.OTEL_BSP_MAX_QUEUE_SIZE | string | `"2048"` |  |
| mcpContextForge.config.OTEL_BSP_SCHEDULE_DELAY | string | `"5000"` |  |
| mcpContextForge.config.OTEL_ENABLE_OBSERVABILITY | string | `"false"` |  |
| mcpContextForge.config.OTEL_EXPORTER_OTLP_INSECURE | string | `"true"` |  |
| mcpContextForge.config.OTEL_EXPORTER_OTLP_PROTOCOL | string | `"grpc"` |  |
| mcpContextForge.config.OTEL_SERVICE_NAME | string | `"mcp-gateway"` |  |
| mcpContextForge.config.OTEL_TRACES_EXPORTER | string | `"otlp"` |  |
| mcpContextForge.config.PAGINATION_BASE_URL | string | `""` |  |
| mcpContextForge.config.PAGINATION_COUNT_CACHE_TTL | string | `"300"` |  |
| mcpContextForge.config.PAGINATION_CURSOR_ENABLED | string | `"true"` |  |
| mcpContextForge.config.PAGINATION_CURSOR_THRESHOLD | string | `"10000"` |  |
| mcpContextForge.config.PAGINATION_DEFAULT_PAGE_SIZE | string | `"50"` |  |
| mcpContextForge.config.PAGINATION_DEFAULT_SORT_FIELD | string | `"created_at"` |  |
| mcpContextForge.config.PAGINATION_DEFAULT_SORT_ORDER | string | `"desc"` |  |
| mcpContextForge.config.PAGINATION_INCLUDE_LINKS | string | `"true"` |  |
| mcpContextForge.config.PAGINATION_MAX_OFFSET | string | `"100000"` |  |
| mcpContextForge.config.PAGINATION_MAX_PAGE_SIZE | string | `"500"` |  |
| mcpContextForge.config.PAGINATION_MIN_PAGE_SIZE | string | `"1"` |  |
| mcpContextForge.config.PASSTHROUGH_HEADERS_SOURCE | string | `"db"` |  |
| mcpContextForge.config.PERFORMANCE_DEGRADATION_MULTIPLIER | string | `"1.5"` |  |
| mcpContextForge.config.PERFORMANCE_THRESHOLD_DATABASE_QUERY_MS | string | `"100.0"` |  |
| mcpContextForge.config.PERFORMANCE_THRESHOLD_HTTP_REQUEST_MS | string | `"500.0"` |  |
| mcpContextForge.config.PERFORMANCE_THRESHOLD_RESOURCE_READ_MS | string | `"1000.0"` |  |
| mcpContextForge.config.PERFORMANCE_THRESHOLD_TOOL_INVOCATION_MS | string | `"2000.0"` |  |
| mcpContextForge.config.PERFORMANCE_TRACKING_ENABLED | string | `"true"` |  |
| mcpContextForge.config.PERMISSION_AUDIT_ENABLED | string | `"false"` |  |
| mcpContextForge.config.PLUGINS_CLIENT_MTLS_CA_BUNDLE | string | `""` |  |
| mcpContextForge.config.PLUGINS_CLIENT_MTLS_CERTFILE | string | `""` |  |
| mcpContextForge.config.PLUGINS_CLIENT_MTLS_CHECK_HOSTNAME | string | `"true"` |  |
| mcpContextForge.config.PLUGINS_CLIENT_MTLS_KEYFILE | string | `""` |  |
| mcpContextForge.config.PLUGINS_CLIENT_MTLS_KEYFILE_PASSWORD | string | `""` |  |
| mcpContextForge.config.PLUGINS_CLIENT_MTLS_VERIFY | string | `"true"` |  |
| mcpContextForge.config.PLUGINS_CLI_COMPLETION | string | `"false"` |  |
| mcpContextForge.config.PLUGINS_CLI_MARKUP_MODE | string | `"rich"` |  |
| mcpContextForge.config.PLUGINS_ENABLED | string | `"false"` |  |
| mcpContextForge.config.PLUGINS_SERVER_SSL_CA_CERTS | string | `""` |  |
| mcpContextForge.config.PLUGINS_SERVER_SSL_CERTFILE | string | `""` |  |
| mcpContextForge.config.PLUGINS_SERVER_SSL_CERT_REQS | string | `"2"` |  |
| mcpContextForge.config.PLUGINS_SERVER_SSL_ENABLED | string | `"false"` |  |
| mcpContextForge.config.PLUGINS_SERVER_SSL_KEYFILE | string | `""` |  |
| mcpContextForge.config.PLUGINS_SERVER_SSL_KEYFILE_PASSWORD | string | `""` |  |
| mcpContextForge.config.PLUGINS_CONFIG_FILE | string | not set (app default: `plugins/config.yaml`) | Set to override plugin config path. `PLUGIN_CONFIG_FILE` also accepted for backwards compatibility |
| mcpContextForge.config.POLL_INTERVAL | string | `"1.0"` |  |
| mcpContextForge.config.PORT | string | `"4444"` |  |
| mcpContextForge.config.PROMPT_CACHE_SIZE | string | `"100"` |  |
| mcpContextForge.config.PROMPT_RENDER_TIMEOUT | string | `"10"` |  |
| mcpContextForge.config.PROTOCOL_VERSION | string | `"2025-06-18"` |  |
| mcpContextForge.config.REDIS_DECODE_RESPONSES | string | `"true"` |  |
| mcpContextForge.config.REDIS_HEALTH_CHECK_INTERVAL | string | `"30"` |  |
| mcpContextForge.config.REDIS_LEADER_HEARTBEAT_INTERVAL | string | `"5"` |  |
| mcpContextForge.config.REDIS_LEADER_KEY | string | `"gateway_service_leader"` |  |
| mcpContextForge.config.REDIS_LEADER_TTL | string | `"15"` |  |
| mcpContextForge.config.REDIS_MAX_BACKOFF_SECONDS | string | `"30"` |  |
| mcpContextForge.config.REDIS_MAX_CONNECTIONS | string | `"50"` |  |
| mcpContextForge.config.REDIS_MAX_RETRIES | string | `"30"` |  |
| mcpContextForge.config.REDIS_PARSER | string | `"auto"` |  |
| mcpContextForge.config.REDIS_RETRY_INTERVAL_MS | string | `"2000"` |  |
| mcpContextForge.config.REDIS_RETRY_ON_TIMEOUT | string | `"true"` |  |
| mcpContextForge.config.REDIS_SOCKET_CONNECT_TIMEOUT | string | `"2.0"` |  |
| mcpContextForge.config.REDIS_SOCKET_TIMEOUT | string | `"2.0"` |  |
| mcpContextForge.config.REGISTRY_CACHE_AGENTS_TTL | string | `"20"` |  |
| mcpContextForge.config.REGISTRY_CACHE_CATALOG_TTL | string | `"300"` |  |
| mcpContextForge.config.REGISTRY_CACHE_ENABLED | string | `"true"` |  |
| mcpContextForge.config.REGISTRY_CACHE_GATEWAYS_TTL | string | `"20"` |  |
| mcpContextForge.config.REGISTRY_CACHE_PROMPTS_TTL | string | `"15"` |  |
| mcpContextForge.config.REGISTRY_CACHE_RESOURCES_TTL | string | `"15"` |  |
| mcpContextForge.config.REGISTRY_CACHE_SERVERS_TTL | string | `"20"` |  |
| mcpContextForge.config.REGISTRY_CACHE_TOOLS_TTL | string | `"20"` |  |
| mcpContextForge.config.RELOAD | string | `"false"` |  |
| mcpContextForge.config.REMOVE_SERVER_HEADERS | string | `"true"` |  |
| mcpContextForge.config.RESOURCE_CACHE_SIZE | string | `"1000"` |  |
| mcpContextForge.config.RESOURCE_CACHE_TTL | string | `"3600"` |  |
| mcpContextForge.config.RETRY_BASE_DELAY | string | `"1.0"` |  |
| mcpContextForge.config.RETRY_JITTER_MAX | string | `"0.5"` |  |
| mcpContextForge.config.RETRY_MAX_ATTEMPTS | string | `"3"` |  |
| mcpContextForge.config.RETRY_MAX_DELAY | string | `"60"` |  |
| mcpContextForge.config.SANITIZE_OUTPUT | string | `"true"` |  |
| mcpContextForge.config.SECURE_COOKIES | string | `"true"` |  |
| mcpContextForge.config.SECURITY_FAILED_AUTH_THRESHOLD | string | `"5"` |  |
| mcpContextForge.config.SECURITY_HEADERS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.SECURITY_LOGGING_ENABLED | string | `"false"` |  |
| mcpContextForge.config.SECURITY_LOGGING_LEVEL | string | `"failures_only"` |  |
| mcpContextForge.config.SECURITY_RATE_LIMIT_WINDOW_MINUTES | string | `"5"` |  |
| mcpContextForge.config.SECURITY_THREAT_SCORE_ALERT | string | `"0.7"` |  |
| mcpContextForge.config.SESSION_TTL | string | `"3600"` |  |
| mcpContextForge.config.TOOLOPS_ENABLED | string | `"false"` |  |
| mcpContextForge.config.LLMCHAT_ENABLED | string | `"true"` |  |
| mcpContextForge.config.LLM_API_PREFIX | string | `"/v1"` |  |
| mcpContextForge.config.LLM_REQUEST_TIMEOUT | string | `"120"` |  |
| mcpContextForge.config.LLM_STREAMING_ENABLED | string | `"true"` |  |
| mcpContextForge.config.LLM_HEALTH_CHECK_INTERVAL | string | `"300"` |  |
| mcpContextForge.config.GATEWAY_MODEL | string | `"gpt-4o"` |  |
| mcpContextForge.config.GATEWAY_TEMPERATURE | string | `"0.7"` |  |
| mcpContextForge.config.DEFAULT_ROOTS | string | `"[]"` |  |
| mcpContextForge.config.ENVIRONMENT | string | `"development"` |  |
| mcpContextForge.config.APP_DOMAIN | string | `"http://localhost"` |  |
| mcpContextForge.config.CORS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.CORS_ALLOW_CREDENTIALS | string | `"true"` |  |
| mcpContextForge.config.ALLOWED_ORIGINS | string | `"[\"http://localhost\",\"http://localhost:4444\"]"` |  |
| mcpContextForge.config.SKIP_SSL_VERIFY | string | `"false"` |  |
| mcpContextForge.config.SECURITY_HEADERS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.X_FRAME_OPTIONS | string | `"DENY"` |  |
| mcpContextForge.config.X_CONTENT_TYPE_OPTIONS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.X_XSS_PROTECTION_ENABLED | string | `"true"` |  |
| mcpContextForge.config.X_DOWNLOAD_OPTIONS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.HSTS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.HSTS_MAX_AGE | string | `"31536000"` |  |
| mcpContextForge.config.HSTS_INCLUDE_SUBDOMAINS | string | `"true"` |  |
| mcpContextForge.config.REMOVE_SERVER_HEADERS | string | `"true"` |  |
| mcpContextForge.config.SECURE_COOKIES | string | `"true"` |  |
| mcpContextForge.config.COOKIE_SAMESITE | string | `"lax"` |  |
| mcpContextForge.config.INSECURE_ALLOW_QUERYPARAM_AUTH | string | `"false"` |  |
| mcpContextForge.config.INSECURE_QUERYPARAM_AUTH_ALLOWED_HOSTS | string | `"[]"` |  |
| mcpContextForge.config.SSRF_PROTECTION_ENABLED | string | `"true"` |  |
| mcpContextForge.config.SSRF_ALLOW_LOCALHOST | string | `"false"` |  |
| mcpContextForge.config.SSRF_ALLOW_PRIVATE_NETWORKS | string | `"false"` |  |
| mcpContextForge.config.SSRF_ALLOWED_NETWORKS | string | `"[]"` |  |
| mcpContextForge.config.SSRF_DNS_FAIL_CLOSED | string | `"true"` |  |
| mcpContextForge.config.LOG_LEVEL | string | `"INFO"` |  |
| mcpContextForge.config.LOG_FORMAT | string | `"json"` |  |
| mcpContextForge.config.LOG_TO_FILE | string | `"false"` |  |
| mcpContextForge.config.LOG_REQUESTS | string | `"false"` |  |
| mcpContextForge.config.LOG_DETAILED_MAX_BODY_SIZE | string | `"16384"` |  |
| mcpContextForge.config.LOG_DETAILED_SKIP_ENDPOINTS | string | `""` |  |
| mcpContextForge.config.LOG_DETAILED_SAMPLE_RATE | string | `"1.0"` |  |
| mcpContextForge.config.LOG_RESOLVE_USER_IDENTITY | string | `"false"` |  |
| mcpContextForge.config.LOG_FILEMODE | string | `"a+"` |  |
| mcpContextForge.config.LOG_FILE | string | `""` |  |
| mcpContextForge.config.LOG_FOLDER | string | `""` |  |
| mcpContextForge.config.LOG_ROTATION_ENABLED | string | `"false"` |  |
| mcpContextForge.config.LOG_MAX_SIZE_MB | string | `"1"` |  |
| mcpContextForge.config.LOG_BACKUP_COUNT | string | `"5"` |  |
| mcpContextForge.config.LOG_BUFFER_SIZE_MB | string | `"1.0"` |  |
| mcpContextForge.config.AUDIT_TRAIL_ENABLED | string | `"false"` |  |
| mcpContextForge.config.PERMISSION_AUDIT_ENABLED | string | `"false"` |  |
| mcpContextForge.config.DB_METRICS_RECORDING_ENABLED | string | `"true"` |  |
| mcpContextForge.config.METRICS_BUFFER_ENABLED | string | `"true"` |  |
| mcpContextForge.config.METRICS_BUFFER_FLUSH_INTERVAL | string | `"60"` |  |
| mcpContextForge.config.METRICS_BUFFER_MAX_SIZE | string | `"1000"` |  |
| mcpContextForge.config.METRICS_CLEANUP_ENABLED | string | `"true"` |  |
| mcpContextForge.config.METRICS_RETENTION_DAYS | string | `"7"` |  |
| mcpContextForge.config.METRICS_CLEANUP_INTERVAL_HOURS | string | `"1"` |  |
| mcpContextForge.config.METRICS_CLEANUP_BATCH_SIZE | string | `"10000"` |  |
| mcpContextForge.config.METRICS_ROLLUP_ENABLED | string | `"true"` |  |
| mcpContextForge.config.METRICS_ROLLUP_INTERVAL_HOURS | string | `"1"` |  |
| mcpContextForge.config.METRICS_ROLLUP_RETENTION_DAYS | string | `"365"` |  |
| mcpContextForge.config.METRICS_ROLLUP_LATE_DATA_HOURS | string | `"1"` |  |
| mcpContextForge.config.METRICS_DELETE_RAW_AFTER_ROLLUP | string | `"true"` |  |
| mcpContextForge.config.METRICS_DELETE_RAW_AFTER_ROLLUP_HOURS | string | `"1"` |  |
| mcpContextForge.config.USE_POSTGRESDB_PERCENTILES | string | `"true"` |  |
| mcpContextForge.config.YIELD_BATCH_SIZE | string | `"1000"` |  |
| mcpContextForge.config.TRANSPORT_TYPE | string | `"all"` |  |
| mcpContextForge.config.MCPGATEWAY_WS_RELAY_ENABLED | string | `"false"` |  |
| mcpContextForge.config.MCPGATEWAY_REVERSE_PROXY_ENABLED | string | `"false"` |  |
| mcpContextForge.config.WEBSOCKET_PING_INTERVAL | string | `"30"` |  |
| mcpContextForge.config.SSE_RETRY_TIMEOUT | string | `"5000"` |  |
| mcpContextForge.config.SSE_KEEPALIVE_ENABLED | string | `"true"` |  |
| mcpContextForge.config.SSE_KEEPALIVE_INTERVAL | string | `"30"` |  |
| mcpContextForge.config.SSE_SEND_TIMEOUT | string | `"30.0"` |  |
| mcpContextForge.config.SSE_RAPID_YIELD_WINDOW_MS | string | `"1000"` |  |
| mcpContextForge.config.SSE_RAPID_YIELD_MAX | string | `"50"` |  |
| mcpContextForge.config.USE_STATEFUL_SESSIONS | string | `"false"` |  |
| mcpContextForge.config.JSON_RESPONSE_ENABLED | string | `"true"` |  |
| mcpContextForge.config.MCPGATEWAY_SESSION_AFFINITY_ENABLED | string | `"false"` |  |
| mcpContextForge.config.MCPGATEWAY_SESSION_AFFINITY_TTL | string | `"300"` |  |
| mcpContextForge.config.MCPGATEWAY_SESSION_AFFINITY_MAX_SESSIONS | string | `"1"` |  |
| mcpContextForge.config.MCPGATEWAY_POOL_RPC_FORWARD_TIMEOUT | string | `"30"` |  |
| mcpContextForge.config.FEDERATION_TIMEOUT | string | `"120"` |  |
| mcpContextForge.config.RESOURCE_CACHE_SIZE | string | `"1000"` |  |
| mcpContextForge.config.RESOURCE_CACHE_TTL | string | `"3600"` |  |
| mcpContextForge.config.MAX_RESOURCE_SIZE | string | `"10485760"` |  |
| mcpContextForge.config.TOOL_TIMEOUT | string | `"60"` |  |
| mcpContextForge.config.MAX_TOOL_RETRIES | string | `"3"` |  |
| mcpContextForge.config.TOOL_RATE_LIMIT | string | `"100"` |  |
| mcpContextForge.config.TOOL_CONCURRENT_LIMIT | string | `"10"` |  |
| mcpContextForge.config.GATEWAY_TOOL_NAME_SEPARATOR | string | `"-"` |  |
| mcpContextForge.config.PROMPT_CACHE_SIZE | string | `"100"` |  |
| mcpContextForge.config.MAX_PROMPT_SIZE | string | `"102400"` |  |
| mcpContextForge.config.PROMPT_RENDER_TIMEOUT | string | `"10"` |  |
| mcpContextForge.config.HEALTH_CHECK_INTERVAL | string | `"60"` |  |
| mcpContextForge.config.HEALTH_CHECK_TIMEOUT | string | `"5"` |  |
| mcpContextForge.config.GATEWAY_HEALTH_CHECK_TIMEOUT | string | `"5.0"` |  |
| mcpContextForge.config.UNHEALTHY_THRESHOLD | string | `"3"` |  |
| mcpContextForge.config.GATEWAY_VALIDATION_TIMEOUT | string | `"5"` |  |
| mcpContextForge.config.MAX_CONCURRENT_HEALTH_CHECKS | string | `"10"` |  |
| mcpContextForge.config.AUTO_REFRESH_SERVERS | string | `"false"` |  |
| mcpContextForge.config.FILELOCK_NAME | string | `"gateway_healthcheck_init.lock"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_ENABLED | string | `"false"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_MAX_PER_KEY | string | `"10"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_TTL | string | `"300.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_HEALTH_CHECK_INTERVAL | string | `"60.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_ACQUIRE_TIMEOUT | string | `"30.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_CREATE_TIMEOUT | string | `"30.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_CIRCUIT_BREAKER_THRESHOLD | string | `"5"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_CIRCUIT_BREAKER_RESET | string | `"60.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_IDLE_EVICTION | string | `"600.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_TRANSPORT_TIMEOUT | string | `"30.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_EXPLICIT_HEALTH_RPC | string | `"false"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_HEALTH_CHECK_METHODS | string | `"[\"ping\", \"skip\"]"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_HEALTH_CHECK_TIMEOUT | string | `"5.0"` |  |
| mcpContextForge.config.MCP_SESSION_POOL_IDENTITY_HEADERS | string | `"[\"authorization\", \"x-tenant-id\", \"x-user-id\", \"x-api-key\", \"cookie\"]"` |  |
| mcpContextForge.config.DEV_MODE | string | `"false"` |  |
| mcpContextForge.config.RELOAD | string | `"false"` |  |
| mcpContextForge.config.TEMPLATES_AUTO_RELOAD | string | `"false"` |  |
| mcpContextForge.config.DEBUG | string | `"false"` |  |
| mcpContextForge.config.RETRY_MAX_ATTEMPTS | string | `"3"` |  |
| mcpContextForge.config.RETRY_BASE_DELAY | string | `"1.0"` |  |
| mcpContextForge.config.RETRY_MAX_DELAY | string | `"60"` |  |
| mcpContextForge.config.RETRY_JITTER_MAX | string | `"0.5"` |  |
| mcpContextForge.config.HTTPX_MAX_CONNECTIONS | string | `"200"` |  |
| mcpContextForge.config.HTTPX_MAX_KEEPALIVE_CONNECTIONS | string | `"100"` |  |
| mcpContextForge.config.HTTPX_KEEPALIVE_EXPIRY | string | `"30.0"` |  |
| mcpContextForge.config.HTTPX_CONNECT_TIMEOUT | string | `"5.0"` |  |
| mcpContextForge.config.HTTPX_READ_TIMEOUT | string | `"120.0"` |  |
| mcpContextForge.config.HTTPX_WRITE_TIMEOUT | string | `"30.0"` |  |
| mcpContextForge.config.HTTPX_POOL_TIMEOUT | string | `"10.0"` |  |
| mcpContextForge.config.HTTPX_HTTP2_ENABLED | string | `"false"` |  |
| mcpContextForge.config.HTTPX_ADMIN_READ_TIMEOUT | string | `"30.0"` |  |
| mcpContextForge.config.WELL_KNOWN_ENABLED | string | `"true"` |  |
| mcpContextForge.config.WELL_KNOWN_ROBOTS_TXT | string | `"User-agent: *\nDisallow: /\n\n# ContextForge is a private API gateway\n# Public crawling is disabled by default\n"` |  |
| mcpContextForge.config.WELL_KNOWN_SECURITY_TXT | string | `""` |  |
| mcpContextForge.config.WELL_KNOWN_SECURITY_TXT_ENABLED | string | `"false"` |  |
| mcpContextForge.config.WELL_KNOWN_CUSTOM_FILES | string | `"{}"` |  |
| mcpContextForge.config.WELL_KNOWN_CACHE_MAX_AGE | string | `"3600"` |  |
| mcpContextForge.config.PLUGINS_ENABLED | string | `"false"` |  |
| mcpContextForge.config.PLUGIN_CONFIG_FILE | string | `"plugins/config.yaml"` |  |
| mcpContextForge.config.PLUGINS_CLIENT_MTLS_CA_BUNDLE | string | `""` |  |
| mcpContextForge.config.PLUGINS_CLIENT_MTLS_CERTFILE | string | `""` |  |
| mcpContextForge.config.PLUGINS_CLIENT_MTLS_KEYFILE | string | `""` |  |
| mcpContextForge.config.PLUGINS_CLIENT_MTLS_KEYFILE_PASSWORD | string | `""` |  |
| mcpContextForge.config.PLUGINS_CLIENT_MTLS_VERIFY | string | `"true"` |  |
| mcpContextForge.config.PLUGINS_CLIENT_MTLS_CHECK_HOSTNAME | string | `"true"` |  |
| mcpContextForge.config.PLUGINS_SERVER_SSL_ENABLED | string | `"false"` |  |
| mcpContextForge.config.PLUGINS_SERVER_SSL_KEYFILE | string | `""` |  |
| mcpContextForge.config.PLUGINS_SERVER_SSL_CERTFILE | string | `""` |  |
| mcpContextForge.config.PLUGINS_SERVER_SSL_CA_CERTS | string | `""` |  |
| mcpContextForge.config.PLUGINS_SERVER_SSL_CERT_REQS | string | `"2"` |  |
| mcpContextForge.config.PLUGINS_SERVER_SSL_KEYFILE_PASSWORD | string | `""` |  |
| mcpContextForge.config.PLUGINS_CLI_COMPLETION | string | `"false"` |  |
| mcpContextForge.config.PLUGINS_CLI_MARKUP_MODE | string | `"rich"` |  |
| mcpContextForge.config.OTEL_ENABLE_OBSERVABILITY | string | `"false"` |  |
| mcpContextForge.config.OTEL_TRACES_EXPORTER | string | `"otlp"` |  |
| mcpContextForge.config.OTEL_EXPORTER_OTLP_PROTOCOL | string | `"grpc"` |  |
| mcpContextForge.config.OTEL_EXPORTER_OTLP_INSECURE | string | `"true"` |  |
| mcpContextForge.config.OTEL_SERVICE_NAME | string | `"mcp-gateway"` |  |
| mcpContextForge.config.OTEL_BSP_MAX_QUEUE_SIZE | string | `"2048"` |  |
| mcpContextForge.config.OTEL_BSP_MAX_EXPORT_BATCH_SIZE | string | `"512"` |  |
| mcpContextForge.config.OTEL_BSP_SCHEDULE_DELAY | string | `"5000"` |  |
| mcpContextForge.config.OBSERVABILITY_ENABLED | string | `"false"` |  |
| mcpContextForge.config.OBSERVABILITY_TRACE_HTTP_REQUESTS | string | `"true"` |  |
| mcpContextForge.config.OBSERVABILITY_TRACE_RETENTION_DAYS | string | `"7"` |  |
| mcpContextForge.config.OBSERVABILITY_MAX_TRACES | string | `"100000"` |  |
| mcpContextForge.config.OBSERVABILITY_SAMPLE_RATE | string | `"1.0"` |  |
| mcpContextForge.config.OBSERVABILITY_INCLUDE_PATHS | string | `"[\"^/rpc/?$\", \"^/sse$\", \"^/message$\", \"^/mcp(?:/|$)\", \"^/servers/[^/]+/mcp/?$\", \"^/servers/[^/]+/sse$\", \"^/servers/[^/]+/message$\", \"^/a2a(?:/|$)\"]"` |  |
| mcpContextForge.config.OBSERVABILITY_EXCLUDE_PATHS | string | `"[\"/health\", \"/healthz\", \"/ready\", \"/metrics\", \"/static/.*\"]"` |  |
| mcpContextForge.config.OBSERVABILITY_METRICS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.OBSERVABILITY_EVENTS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.ENABLE_METRICS | string | `"true"` |  |
| mcpContextForge.config.METRICS_EXCLUDED_HANDLERS | string | `""` |  |
| mcpContextForge.config.METRICS_NAMESPACE | string | `"default"` |  |
| mcpContextForge.config.METRICS_SUBSYSTEM | string | `""` |  |
| mcpContextForge.config.METRICS_CUSTOM_LABELS | string | `""` |  |
| mcpContextForge.config.ENABLE_HEADER_PASSTHROUGH | string | `"false"` |  |
| mcpContextForge.config.ENABLE_OVERWRITE_BASE_HEADERS | string | `"false"` |  |
| mcpContextForge.config.DEFAULT_PASSTHROUGH_HEADERS | string | `"[\"X-Tenant-Id\", \"X-Trace-Id\"]"` |  |
| mcpContextForge.config.PASSTHROUGH_HEADERS_SOURCE | string | `"db"` |  |
| mcpContextForge.config.GLOBAL_CONFIG_CACHE_TTL | string | `"60"` |  |
| mcpContextForge.config.VALIDATION_ALLOWED_URL_SCHEMES | string | `"[\"http://\", \"https://\", \"ws://\", \"wss://\"]"` |  |
| mcpContextForge.config.VALIDATION_ALLOWED_MIME_TYPES | string | `"[\"text/plain\", \"text/html\", \"text/css\", \"text/markdown\", \"text/javascript\", \"application/json\", \"application/xml\", \"application/pdf\", \"image/png\", \"image/jpeg\", \"image/gif\", \"image/svg+xml\", \"application/octet-stream\"]"` |  |
| mcpContextForge.config.VALIDATION_DANGEROUS_HTML_PATTERN | string | `"<(script|iframe|object|embed|link|meta|base|form|img|svg|video|audio|source|track|area|map|canvas|applet|frame|frameset|html|head|body|style)\\b|</*(script|iframe|object|embed|link|meta|base|form|img|svg|video|audio|source|track|area|map|canvas|applet|frame|frameset|html|head|body|style)>"` |  |
| mcpContextForge.config.VALIDATION_DANGEROUS_JS_PATTERN | string | `"(?i)(?:^|\\s|[\\\"'`<>=])(javascript:|vbscript:|data:\\s*[^,]*[;\\s]*(javascript|vbscript)|\\bon[a-z]+\\s*=|<\\s*script\\b)"` |  |
| mcpContextForge.config.VALIDATION_NAME_PATTERN | string | `"^[a-zA-Z0-9_.\\- ]+$"` |  |
| mcpContextForge.config.VALIDATION_IDENTIFIER_PATTERN | string | `"^[a-zA-Z0-9_\\-\\.]+$"` |  |
| mcpContextForge.config.VALIDATION_SAFE_URI_PATTERN | string | `"^[a-zA-Z0-9_\\-.:/?=&%{}]+$"` |  |
| mcpContextForge.config.VALIDATION_UNSAFE_URI_PATTERN | string | `"[<>\"'\\\\]"` |  |
| mcpContextForge.config.VALIDATION_TOOL_NAME_PATTERN | string | `"^[a-zA-Z0-9_][a-zA-Z0-9._/-]*$"` |  |
| mcpContextForge.config.VALIDATION_TOOL_METHOD_PATTERN | string | `"^[a-zA-Z][a-zA-Z0-9_\\./-]*$"` |  |
| mcpContextForge.config.VALIDATION_MAX_NAME_LENGTH | string | `"255"` |  |
| mcpContextForge.config.VALIDATION_MAX_DESCRIPTION_LENGTH | string | `"8192"` |  |
| mcpContextForge.config.VALIDATION_MAX_TEMPLATE_LENGTH | string | `"65536"` |  |
| mcpContextForge.config.VALIDATION_MAX_CONTENT_LENGTH | string | `"1048576"` |  |
| mcpContextForge.config.VALIDATION_MAX_JSON_DEPTH | string | `"30"` |  |
| mcpContextForge.config.VALIDATION_MAX_URL_LENGTH | string | `"2048"` |  |
| mcpContextForge.config.VALIDATION_MAX_RPC_PARAM_SIZE | string | `"262144"` |  |
| mcpContextForge.config.VALIDATION_MAX_METHOD_LENGTH | string | `"128"` |  |
| mcpContextForge.config.VALIDATION_MAX_REQUESTS_PER_MINUTE | string | `"60"` |  |
| mcpContextForge.config.PAGINATION_DEFAULT_PAGE_SIZE | string | `"50"` |  |
| mcpContextForge.config.PAGINATION_MAX_PAGE_SIZE | string | `"500"` |  |
| mcpContextForge.config.PAGINATION_MIN_PAGE_SIZE | string | `"1"` |  |
| mcpContextForge.config.PAGINATION_CURSOR_THRESHOLD | string | `"10000"` |  |
| mcpContextForge.config.PAGINATION_CURSOR_ENABLED | string | `"true"` |  |
| mcpContextForge.config.PAGINATION_DEFAULT_SORT_FIELD | string | `"created_at"` |  |
| mcpContextForge.config.PAGINATION_DEFAULT_SORT_ORDER | string | `"desc"` |  |
| mcpContextForge.config.PAGINATION_MAX_OFFSET | string | `"100000"` |  |
| mcpContextForge.config.PAGINATION_COUNT_CACHE_TTL | string | `"300"` |  |
| mcpContextForge.config.PAGINATION_INCLUDE_LINKS | string | `"true"` |  |
| mcpContextForge.config.PAGINATION_BASE_URL | string | `""` |  |
| mcpContextForge.config.EXPERIMENTAL_VALIDATE_IO | string | `"false"` |  |
| mcpContextForge.config.VALIDATION_MIDDLEWARE_ENABLED | string | `"false"` |  |
| mcpContextForge.config.VALIDATION_STRICT | string | `"true"` |  |
| mcpContextForge.config.TOOL_DESCRIPTION_FORBIDDEN_PATTERNS_ENABLED | string | `"true"` | Enable forbidden pattern checks on tool descriptions |
| mcpContextForge.config.TOOL_DESCRIPTION_FORBIDDEN_PATTERNS | string | `'["&&", ";", "||", "$(", "> ", "< "]'` | Substrings blocked in tool descriptions (JSON array) |
| mcpContextForge.config.CEL_EXECUTION | string | `"subprocess"` | Where tool validation policies (CEL) run: subprocess (forked sandbox) or inprocess |
| mcpContextForge.config.CEL_TIMEOUT_SECONDS | string | `"1.0"` | Wall-clock limit for one policy evaluation (seconds, at most 1.0) |
| mcpContextForge.config.CEL_WORKERS | string | `"2"` | Policy sandbox worker processes per gateway process |
| mcpContextForge.config.JSON_SCHEMA_VALIDATION_STRICT | string | `"true"` |  |
| mcpContextForge.config.SANITIZE_OUTPUT | string | `"true"` |  |
| mcpContextForge.config.ALLOWED_ROOTS | string | `"[]"` |  |
| mcpContextForge.config.MAX_PATH_DEPTH | string | `"10"` |  |
| mcpContextForge.config.MAX_PARAM_LENGTH | string | `"10000"` |  |
| mcpContextForge.config.DANGEROUS_PATTERNS | string | `"[\"[;&|`$(){}\\\\[\\\\]<>]\", \"\\\\.\\\\.[\\\\\\\\/]\", \"[\\\\x00-\\\\x1f\\\\x7f-\\\\x9f]\"]"` |  |
| mcpContextForge.config.ALLOWED_MIME_TYPES | string | `"[\"text/plain\",\"text/markdown\",\"text/html\",\"application/json\",\"application/xml\",\"image/png\",\"image/jpeg\",\"image/gif\"]"` |  |
| mcpContextForge.config.COMPRESSION_ENABLED | string | `"true"` |  |
| mcpContextForge.config.COMPRESSION_MINIMUM_SIZE | string | `"500"` |  |
| mcpContextForge.config.COMPRESSION_GZIP_LEVEL | string | `"6"` |  |
| mcpContextForge.config.COMPRESSION_BROTLI_QUALITY | string | `"4"` |  |
| mcpContextForge.config.COMPRESSION_ZSTD_LEVEL | string | `"3"` |  |
| mcpContextForge.config.CORRELATION_ID_ENABLED | string | `"true"` |  |
| mcpContextForge.config.CORRELATION_ID_HEADER | string | `"X-Correlation-ID"` |  |
| mcpContextForge.config.CORRELATION_ID_PRESERVE | string | `"true"` |  |
| mcpContextForge.config.CORRELATION_ID_RESPONSE_HEADER | string | `"true"` |  |
| mcpContextForge.config.SLUG_REFRESH_BATCH_SIZE | string | `"1000"` |  |
| mcpContextForge.config.GATEWAY_AUTO_REFRESH_INTERVAL | string | `"300"` |  |
| mcpContextForge.config.GATEWAY_MAX_REDIRECTS | string | `"5"` |  |
| mcpContextForge.config.POLL_INTERVAL | string | `"1.0"` |  |
| mcpContextForge.config.MAX_INTERVAL | string | `"5.0"` |  |
| mcpContextForge.config.BACKOFF_FACTOR | string | `"1.5"` |  |
| mcpContextForge.config.A2A_STATS_CACHE_TTL | string | `"30"` |  |
| mcpContextForge.config.DB_POOL_CLASS | string | `"auto"` |  |
| mcpContextForge.config.DB_POOL_PRE_PING | string | `"auto"` |  |
| mcpContextForge.config.DB_DRIVER | string | `"postgresql+psycopg"` |  |
| mcpContextForge.config.DB_PREPARE_THRESHOLD | string | `"5"` |  |
| mcpContextForge.config.REDIS_PARSER | string | `"auto"` |  |
| mcpContextForge.config.DB_QUERY_LOG_ENABLED | string | `"false"` |  |
| mcpContextForge.config.DB_QUERY_LOG_FILE | string | `"logs/db-queries.log"` |  |
| mcpContextForge.config.DB_QUERY_LOG_JSON_FILE | string | `"logs/db-queries.jsonl"` |  |
| mcpContextForge.config.DB_QUERY_LOG_FORMAT | string | `"both"` |  |
| mcpContextForge.config.DB_QUERY_LOG_INCLUDE_PARAMS | string | `"false"` |  |
| mcpContextForge.config.DB_QUERY_LOG_MIN_QUERIES | string | `"1"` |  |
| mcpContextForge.config.DB_QUERY_LOG_N1_THRESHOLD | string | `"3"` |  |
| mcpContextForge.config.DB_QUERY_LOG_DETECT_N1 | string | `"true"` |  |
| mcpContextForge.config.LLMCHAT_SESSION_TTL | string | `"300"` |  |
| mcpContextForge.config.LLMCHAT_SESSION_LOCK_TTL | string | `"30"` |  |
| mcpContextForge.config.LLMCHAT_SESSION_LOCK_RETRIES | string | `"10"` |  |
| mcpContextForge.config.LLMCHAT_SESSION_LOCK_WAIT | string | `"0.2"` |  |
| mcpContextForge.config.LLMCHAT_CHAT_HISTORY_TTL | string | `"3600"` |  |
| mcpContextForge.config.LLMCHAT_CHAT_HISTORY_MAX_MESSAGES | string | `"50"` |  |
| mcpContextForge.config.MCPGATEWAY_ELICITATION_ENABLED | string | `"true"` |  |
| mcpContextForge.config.MCPGATEWAY_ELICITATION_TIMEOUT | string | `"60"` |  |
| mcpContextForge.config.MCPGATEWAY_ELICITATION_MAX_CONCURRENT | string | `"100"` |  |
| mcpContextForge.config.MCPGATEWAY_TOOL_CANCELLATION_ENABLED | string | `"true"` |  |
| mcpContextForge.config.MCPGATEWAY_GRPC_ENABLED | string | `"false"` |  |
| mcpContextForge.config.MCPGATEWAY_GRPC_TIMEOUT | string | `"30"` |  |
| mcpContextForge.config.MCPGATEWAY_GRPC_MAX_MESSAGE_SIZE | string | `"4194304"` |  |
| mcpContextForge.config.MCPGATEWAY_GRPC_REFLECTION_ENABLED | string | `"true"` |  |
| mcpContextForge.config.MCPGATEWAY_GRPC_TLS_ENABLED | string | `"false"` |  |
| mcpContextForge.config.PERFORMANCE_TRACKING_ENABLED | string | `"true"` |  |
| mcpContextForge.config.PERFORMANCE_THRESHOLD_DATABASE_QUERY_MS | string | `"100.0"` |  |
| mcpContextForge.config.PERFORMANCE_THRESHOLD_RESOURCE_READ_MS | string | `"1000.0"` |  |
| mcpContextForge.config.PERFORMANCE_THRESHOLD_TOOL_INVOCATION_MS | string | `"2000.0"` |  |
| mcpContextForge.config.PERFORMANCE_THRESHOLD_HTTP_REQUEST_MS | string | `"500.0"` |  |
| mcpContextForge.config.PERFORMANCE_DEGRADATION_MULTIPLIER | string | `"1.5"` |  |
| mcpContextForge.config.MCPGATEWAY_PERFORMANCE_TRACKING | string | `"false"` |  |
| mcpContextForge.config.MCPGATEWAY_PERFORMANCE_COLLECTION_INTERVAL | string | `"10"` |  |
| mcpContextForge.config.MCPGATEWAY_PERFORMANCE_MAX_SNAPSHOTS | string | `"10000"` |  |
| mcpContextForge.config.MCPGATEWAY_PERFORMANCE_RETENTION_DAYS | string | `"90"` |  |
| mcpContextForge.config.MCPGATEWAY_PERFORMANCE_RETENTION_HOURS | string | `"24"` |  |
| mcpContextForge.config.MCPGATEWAY_PERFORMANCE_DISTRIBUTED | string | `"false"` |  |
| mcpContextForge.config.MCPGATEWAY_PERFORMANCE_NET_CONNECTIONS_ENABLED | string | `"true"` |  |
| mcpContextForge.config.MCPGATEWAY_PERFORMANCE_NET_CONNECTIONS_CACHE_TTL | string | `"15"` |  |
| mcpContextForge.config.METRICS_AGGREGATION_ENABLED | string | `"true"` |  |
| mcpContextForge.config.METRICS_AGGREGATION_AUTO_START | string | `"false"` |  |
| mcpContextForge.config.METRICS_AGGREGATION_BACKFILL_HOURS | string | `"6"` |  |
| mcpContextForge.config.METRICS_AGGREGATION_WINDOW_MINUTES | string | `"5"` |  |
| mcpContextForge.config.SECURITY_LOGGING_ENABLED | string | `"false"` |  |
| mcpContextForge.config.SECURITY_LOGGING_LEVEL | string | `"failures_only"` |  |
| mcpContextForge.config.SECURITY_FAILED_AUTH_THRESHOLD | string | `"5"` |  |
| mcpContextForge.config.SECURITY_THREAT_SCORE_ALERT | string | `"0.7"` |  |
| mcpContextForge.config.SECURITY_RATE_LIMIT_WINDOW_MINUTES | string | `"5"` |  |
| mcpContextForge.config.STRUCTURED_LOGGING_ENABLED | string | `"true"` |  |
| mcpContextForge.config.STRUCTURED_LOGGING_EXTERNAL_ENABLED | string | `"false"` |  |
| mcpContextForge.config.STRUCTURED_LOGGING_DATABASE_ENABLED | string | `"false"` |  |
| mcpContextForge.config.SYSLOG_ENABLED | string | `"false"` |  |
| mcpContextForge.config.SYSLOG_HOST | string | `""` |  |
| mcpContextForge.config.SYSLOG_PORT | string | `"514"` |  |
| mcpContextForge.config.ELASTICSEARCH_ENABLED | string | `"false"` |  |
| mcpContextForge.config.ELASTICSEARCH_URL | string | `""` |  |
| mcpContextForge.config.ELASTICSEARCH_INDEX_PREFIX | string | `"mcpgateway-logs"` |  |
| mcpContextForge.config.WEBHOOK_LOGGING_ENABLED | string | `"false"` |  |
| mcpContextForge.config.WEBHOOK_LOGGING_URLS | string | `"[]"` |  |
| mcpContextForge.config.LOG_RETENTION_DAYS | string | `"30"` |  |
| mcpContextForge.config.LOG_SEARCH_MAX_RESULTS | string | `"1000"` |  |
| mcpContextForge.config.MASKED_AUTH_VALUE | string | `"*****"` |  |
| mcpContextForge.secret.BASIC_AUTH_USER | string | `"admin"` |  |
| mcpContextForge.secret.BASIC_AUTH_PASSWORD | string | `""` |  |
| mcpContextForge.secret.API_ALLOW_BASIC_AUTH | string | `"false"` |  |
| mcpContextForge.secret.AUTH_REQUIRED | string | `"true"` |  |
| mcpContextForge.secret.MCP_REQUIRE_AUTH | string | `"false"` |  |
| mcpContextForge.secret.JWT_SECRET_KEY | string | `"my-test-key-but-now-longer-than-32-bytes"` |  |
| mcpContextForge.secret.JWT_ALGORITHM | string | `"HS256"` |  |
| mcpContextForge.secret.JWT_AUDIENCE | string | `"mcpgateway-api"` |  |
| mcpContextForge.secret.JWT_ISSUER | string | `"mcpgateway"` |  |
| mcpContextForge.secret.TOKEN_EXPIRY | string | `"10080"` |  |
| mcpContextForge.secret.REQUIRE_TOKEN_EXPIRATION | string | `"true"` |  |
| mcpContextForge.secret.REQUIRE_JTI | string | `"true"` |  |
| mcpContextForge.secret.REQUIRE_USER_IN_DB | string | `"false"` |  |
| mcpContextForge.secret.AUTH_ENCRYPTION_SECRET | string | `""` |  |
| mcpContextForge.secret.EMAIL_AUTH_ENABLED | string | `"true"` |  |
| mcpContextForge.secret.PROTECT_ALL_ADMINS | string | `"true"` |  |
| mcpContextForge.secret.PLATFORM_ADMIN_EMAIL | string | `"admin@example.com"` |  |
| mcpContextForge.secret.PLATFORM_ADMIN_PASSWORD | string | `""` |  |
| mcpContextForge.secret.PLATFORM_ADMIN_FULL_NAME | string | `"Platform Administrator"` |  |
| mcpContextForge.secret.DEFAULT_USER_PASSWORD | string | `""` |  |
| mcpContextForge.secret.ARGON2ID_TIME_COST | string | `"3"` |  |
| mcpContextForge.secret.ARGON2ID_MEMORY_COST | string | `"65536"` |  |
| mcpContextForge.secret.ARGON2ID_PARALLELISM | string | `"1"` |  |
| mcpContextForge.secret.PASSWORD_MIN_LENGTH | string | `"8"` |  |
| mcpContextForge.secret.PASSWORD_REQUIRE_UPPERCASE | string | `"false"` |  |
| mcpContextForge.secret.PASSWORD_REQUIRE_LOWERCASE | string | `"false"` |  |
| mcpContextForge.secret.PASSWORD_REQUIRE_NUMBERS | string | `"false"` |  |
| mcpContextForge.secret.PASSWORD_REQUIRE_SPECIAL | string | `"false"` |  |
| mcpContextForge.secret.PASSWORD_CHANGE_ENFORCEMENT_ENABLED | string | `"true"` |  |
| mcpContextForge.secret.ADMIN_REQUIRE_PASSWORD_CHANGE_ON_BOOTSTRAP | string | `"true"` |  |
| mcpContextForge.secret.DETECT_DEFAULT_PASSWORD_ON_LOGIN | string | `"true"` |  |
| mcpContextForge.secret.REQUIRE_PASSWORD_CHANGE_FOR_DEFAULT_PASSWORD | string | `"true"` |  |
| mcpContextForge.secret.PASSWORD_POLICY_ENABLED | string | `"true"` |  |
| mcpContextForge.secret.PASSWORD_PREVENT_REUSE | string | `"true"` |  |
| mcpContextForge.secret.PASSWORD_MAX_AGE_DAYS | string | `"90"` |  |
| mcpContextForge.secret.MAX_FAILED_LOGIN_ATTEMPTS | string | `"5"` |  |
| mcpContextForge.secret.ACCOUNT_LOCKOUT_DURATION_MINUTES | string | `"30"` |  |
| mcpContextForge.secret.ACCOUNT_LOCKOUT_NOTIFICATION_ENABLED | string | `"true"` |  |
| mcpContextForge.secret.PASSWORD_RESET_ENABLED | string | `"true"` |  |
| mcpContextForge.secret.PASSWORD_RESET_TOKEN_EXPIRY_MINUTES | string | `"60"` |  |
| mcpContextForge.secret.PASSWORD_RESET_RATE_LIMIT | string | `"5"` |  |
| mcpContextForge.secret.PASSWORD_RESET_RATE_WINDOW_MINUTES | string | `"15"` |  |
| mcpContextForge.secret.PASSWORD_RESET_INVALIDATE_SESSIONS | string | `"true"` |  |
| mcpContextForge.secret.PASSWORD_RESET_MIN_RESPONSE_MS | string | `"250"` |  |
| mcpContextForge.secret.SMTP_ENABLED | string | `"false"` |  |
| mcpContextForge.secret.SMTP_HOST | string | `""` |  |
| mcpContextForge.secret.SMTP_PORT | string | `"587"` |  |
| mcpContextForge.secret.SMTP_USER | string | `""` |  |
| mcpContextForge.secret.SMTP_PASSWORD | string | `""` |  |
| mcpContextForge.secret.SMTP_FROM_EMAIL | string | `""` |  |
| mcpContextForge.secret.SMTP_FROM_NAME | string | `"ContextForge"` |  |
| mcpContextForge.secret.SMTP_USE_TLS | string | `"true"` |  |
| mcpContextForge.secret.SMTP_USE_SSL | string | `"false"` |  |
| mcpContextForge.secret.SMTP_TIMEOUT_SECONDS | string | `"15"` |  |
| mcpContextForge.secret.MIN_PASSWORD_LENGTH | string | `"12"` |  |
| mcpContextForge.secret.MIN_SECRET_LENGTH | string | `"32"` |  |
| mcpContextForge.secret.REQUIRE_STRONG_SECRETS | string | `"false"` |  |
| mcpContextForge.secret.MCP_CLIENT_AUTH_ENABLED | string | `"true"` |  |
| mcpContextForge.secret.TRUST_PROXY_AUTH | string | `"false"` |  |
| mcpContextForge.secret.PROXY_USER_HEADER | string | `"X-Authenticated-User"` |  |
| mcpContextForge.secret.OAUTH_REQUEST_TIMEOUT | string | `"30"` |  |
| mcpContextForge.secret.OAUTH_MAX_RETRIES | string | `"3"` |  |
| mcpContextForge.secret.DCR_ENABLED | string | `"true"` |  |
| mcpContextForge.secret.DCR_AUTO_REGISTER_ON_MISSING_CREDENTIALS | string | `"true"` |  |
| mcpContextForge.secret.DCR_DEFAULT_SCOPES | string | `"[\"mcp:read\"]"` |  |
| mcpContextForge.secret.DCR_ALLOWED_ISSUERS | string | `"[]"` |  |
| mcpContextForge.secret.DCR_TOKEN_ENDPOINT_AUTH_METHOD | string | `"client_secret_basic"` |  |
| mcpContextForge.secret.DCR_APPLICATION_TYPE | string | `"auto"` |  |
| mcpContextForge.secret.DCR_METADATA_CACHE_TTL | string | `"3600"` |  |
| mcpContextForge.secret.DCR_CLIENT_NAME_TEMPLATE | string | `"ContextForge ({gateway_name})"` |  |
| mcpContextForge.secret.DCR_REQUEST_REFRESH_TOKEN_WHEN_UNSUPPORTED | string | `"false"` |  |
| mcpContextForge.secret.OAUTH_DISCOVERY_ENABLED | string | `"true"` |  |
| mcpContextForge.secret.OAUTH_PREFERRED_CODE_CHALLENGE_METHOD | string | `"S256"` |  |
| mcpContextForge.secret.JWT_AUDIENCE_VERIFICATION | string | `"true"` |  |
| mcpContextForge.secret.JWT_ISSUER_VERIFICATION | string | `"true"` |  |
| mcpContextForge.secret.JWT_PRIVATE_KEY_PATH | string | `""` |  |
| mcpContextForge.secret.JWT_PUBLIC_KEY_PATH | string | `""` |  |
| mcpContextForge.secret.EMBED_ENVIRONMENT_IN_TOKENS | string | `"false"` |  |
| mcpContextForge.secret.VALIDATE_TOKEN_ENVIRONMENT | string | `"false"` |  |
| mcpContextForge.secret.SSO_ENABLED | string | `"false"` |  |
| mcpContextForge.secret.SSO_AUTO_CREATE_USERS | string | `"true"` |  |
| mcpContextForge.secret.SSO_TRUSTED_DOMAINS | string | `"[]"` |  |
| mcpContextForge.secret.SSO_PRESERVE_ADMIN_AUTH | string | `"true"` |  |
| mcpContextForge.secret.SSO_REQUIRE_ADMIN_APPROVAL | string | `"false"` |  |
| mcpContextForge.secret.SSO_AUTO_ADMIN_DOMAINS | string | `"[]"` |  |
| mcpContextForge.secret.SSO_ISSUERS | string | `"[]"` |  |
| mcpContextForge.secret.SSO_GITHUB_ENABLED | string | `"false"` |  |
| mcpContextForge.secret.SSO_GITHUB_CLIENT_ID | string | `""` |  |
| mcpContextForge.secret.SSO_GITHUB_CLIENT_SECRET | string | `""` |  |
| mcpContextForge.secret.SSO_GITHUB_ADMIN_ORGS | string | `"[]"` |  |
| mcpContextForge.secret.SSO_GOOGLE_ENABLED | string | `"false"` |  |
| mcpContextForge.secret.SSO_GOOGLE_CLIENT_ID | string | `""` |  |
| mcpContextForge.secret.SSO_GOOGLE_CLIENT_SECRET | string | `""` |  |
| mcpContextForge.secret.SSO_GOOGLE_ADMIN_DOMAINS | string | `"[]"` |  |
| mcpContextForge.secret.SSO_IBM_VERIFY_ENABLED | string | `"false"` |  |
| mcpContextForge.secret.SSO_IBM_VERIFY_CLIENT_ID | string | `""` |  |
| mcpContextForge.secret.SSO_IBM_VERIFY_CLIENT_SECRET | string | `""` |  |
| mcpContextForge.secret.SSO_IBM_VERIFY_ISSUER | string | `""` |  |
| mcpContextForge.secret.SSO_OKTA_ENABLED | string | `"false"` |  |
| mcpContextForge.secret.SSO_OKTA_CLIENT_ID | string | `""` |  |
| mcpContextForge.secret.SSO_OKTA_CLIENT_SECRET | string | `""` |  |
| mcpContextForge.secret.SSO_OKTA_ISSUER | string | `""` |  |
| mcpContextForge.secret.SSO_KEYCLOAK_ENABLED | string | `"false"` |  |
| mcpContextForge.secret.SSO_KEYCLOAK_BASE_URL | string | `""` |  |
| mcpContextForge.secret.SSO_KEYCLOAK_REALM | string | `"master"` |  |
| mcpContextForge.secret.SSO_KEYCLOAK_CLIENT_ID | string | `""` |  |
| mcpContextForge.secret.SSO_KEYCLOAK_CLIENT_SECRET | string | `""` |  |
| mcpContextForge.secret.SSO_KEYCLOAK_MAP_REALM_ROLES | string | `"true"` |  |
| mcpContextForge.secret.SSO_KEYCLOAK_MAP_CLIENT_ROLES | string | `"false"` |  |
| mcpContextForge.secret.SSO_KEYCLOAK_USERNAME_CLAIM | string | `"preferred_username"` |  |
| mcpContextForge.secret.SSO_KEYCLOAK_EMAIL_CLAIM | string | `"email"` |  |
| mcpContextForge.secret.SSO_KEYCLOAK_GROUPS_CLAIM | string | `"groups"` |  |
| mcpContextForge.secret.SSO_ENTRA_ENABLED | string | `"false"` |  |
| mcpContextForge.secret.SSO_ENTRA_CLIENT_ID | string | `""` |  |
| mcpContextForge.secret.SSO_ENTRA_CLIENT_SECRET | string | `""` |  |
| mcpContextForge.secret.SSO_ENTRA_TENANT_ID | string | `""` |  |
| mcpContextForge.secret.SSO_ENTRA_GROUPS_CLAIM | string | `"groups"` |  |
| mcpContextForge.secret.SSO_ENTRA_ADMIN_GROUPS | string | `"[]"` |  |
| mcpContextForge.secret.SSO_ENTRA_ROLE_MAPPINGS | string | `"{}"` |  |
| mcpContextForge.secret.SSO_ENTRA_DEFAULT_ROLE | string | `""` |  |
| mcpContextForge.secret.SSO_ENTRA_SYNC_ROLES_ON_LOGIN | string | `"true"` |  |
| mcpContextForge.secret.SSO_ENTRA_GRAPH_API_ENABLED | string | `"true"` |  |
| mcpContextForge.secret.SSO_ENTRA_GRAPH_API_TIMEOUT | string | `"10"` |  |
| mcpContextForge.secret.SSO_ENTRA_GRAPH_API_MAX_GROUPS | string | `"0"` |  |
| mcpContextForge.secret.SSO_GENERIC_ENABLED | string | `"false"` |  |
| mcpContextForge.secret.SSO_GENERIC_PROVIDER_ID | string | `""` |  |
| mcpContextForge.secret.SSO_GENERIC_DISPLAY_NAME | string | `""` |  |
| mcpContextForge.secret.SSO_GENERIC_CLIENT_ID | string | `""` |  |
| mcpContextForge.secret.SSO_GENERIC_CLIENT_SECRET | string | `""` |  |
| mcpContextForge.secret.SSO_GENERIC_AUTHORIZATION_URL | string | `""` |  |
| mcpContextForge.secret.SSO_GENERIC_TOKEN_URL | string | `""` |  |
| mcpContextForge.secret.SSO_GENERIC_USERINFO_URL | string | `""` |  |
| mcpContextForge.secret.SSO_GENERIC_ISSUER | string | `""` |  |
| mcpContextForge.secret.SSO_GENERIC_JWKS_URI | string | `""` |  |
| mcpContextForge.secret.SSO_GENERIC_SCOPE | string | `"openid profile email"` |  |
| mcpContextForge.secret.DEFAULT_ADMIN_ROLE | string | `"platform_admin"` |  |
| mcpContextForge.secret.DEFAULT_USER_ROLE | string | `"platform_viewer"` |  |
| mcpContextForge.secret.DEFAULT_TEAM_OWNER_ROLE | string | `"team_admin"` |  |
| mcpContextForge.secret.DEFAULT_TEAM_MEMBER_ROLE | string | `"viewer"` |  |
| mcpContextForge.secret.AUTO_CREATE_PERSONAL_TEAMS | string | `"true"` |  |
| mcpContextForge.secret.PERSONAL_TEAM_PREFIX | string | `""` |  |
| mcpContextForge.secret.MAX_TEAMS_PER_USER | string | `"50"` |  |
| mcpContextForge.secret.MAX_MEMBERS_PER_TEAM | string | `"100"` |  |
| mcpContextForge.secret.INVITATION_EXPIRY_DAYS | string | `"7"` |  |
| mcpContextForge.secret.REQUIRE_EMAIL_VERIFICATION_FOR_INVITES | string | `"true"` |  |
| mcpContextForge.secret.ALLOW_TEAM_CREATION | string | `"true"` | Allow users to create organizational teams (admins always can) |
| mcpContextForge.secret.ALLOW_TEAM_JOIN_REQUESTS | string | `"true"` | Allow users to request to join public teams |
| mcpContextForge.secret.ALLOW_TEAM_INVITATIONS | string | `"true"` | Allow team owners to send invitations |
| mcpContextForge.secret.ENABLE_ED25519_SIGNING | string | `"false"` |  |
| mcpContextForge.secret.ED25519_PRIVATE_KEY | string | `""` |  |
| mcpContextForge.secret.ED25519_PUBLIC_KEY | string | `""` |  |
| mcpContextForge.secret.PREV_ED25519_PRIVATE_KEY | string | `""` |  |
| mcpContextForge.secret.PREV_ED25519_PUBLIC_KEY | string | `""` |  |
| mcpContextForge.secret.OTEL_EXPORTER_OTLP_ENDPOINT | string | `""` |  |
| mcpContextForge.secret.OTEL_EXPORTER_OTLP_HEADERS | string | `""` |  |
| mcpContextForge.secret.LANGFUSE_OTEL_ENDPOINT | string | `""` |  |
| mcpContextForge.secret.LANGFUSE_PUBLIC_KEY | string | `""` |  |
| mcpContextForge.secret.LANGFUSE_SECRET_KEY | string | `""` |  |
| mcpContextForge.secret.LANGFUSE_OTEL_AUTH | string | `""` |  |
| mcpContextForge.secret.OTEL_EXPORTER_JAEGER_ENDPOINT | string | `""` |  |
| mcpContextForge.secret.OTEL_EXPORTER_ZIPKIN_ENDPOINT | string | `""` |  |
| mcpContextForge.secret.OTEL_RESOURCE_ATTRIBUTES | string | `""` |  |
| mcpContextForge.secret.DOCS_ALLOW_BASIC_AUTH | string | `"false"` |  |
| mcpContextForge.secret.MCPGATEWAY_BOOTSTRAP_ROLES_IN_DB_ENABLED | string | `"false"` |  |
| mcpContextForge.secret.MCPGATEWAY_BOOTSTRAP_ROLES_IN_DB_FILE | string | `"additional_roles_in_db.json"` |  |
| mcpContextForge.extraEnvFrom | list | `[]` |  |
| mcpContextForge.extraEnv | list | `[]` |  |
| migration.enabled | bool | `true` |  |
| migration.restartPolicy | string | `"Never"` |  |
| migration.backoffLimit | int | `3` |  |
| migration.activeDeadlineSeconds | int | `600` |  |
| migration.image.repository | string | `"ghcr.io/ibm/mcp-context-forge"` |  |
| migration.image.tag | string | `"latest"` |  |
| migration.image.pullPolicy | string | `"Always"` |  |
| migration.resources.limits.cpu | string | `"500m"` |  |
| migration.resources.limits.memory | string | `"1Gi"` |  |
| migration.resources.requests.cpu | string | `"250m"` |  |
| migration.resources.requests.memory | string | `"512Mi"` |  |
| migration.command.waitForDb | string | `"python3 /app/mcpgateway/utils/db_isready.py --max-tries 30 --interval 2 --timeout 5"` |  |
| migration.command.migrate | string | `"python3 -m mcpgateway.bootstrap_db"` |  |
| postgres.enabled | bool | `true` |  |
| postgres.image.repository | string | `"postgres"` |  |
| postgres.image.tag | string | `"17"` |  |
| postgres.image.pullPolicy | string | `"IfNotPresent"` |  |
| postgres.service.type | string | `"ClusterIP"` |  |
| postgres.service.port | int | `5432` |  |
| postgres.persistence.enabled | bool | `true` |  |
| postgres.persistence.storageClassName | string | `""` |  |
| postgres.persistence.useReadWriteOncePod | bool | `true` |  |
| postgres.persistence.accessModes[0] | string | `"ReadWriteOnce"` |  |
| postgres.persistence.size | string | `"5Gi"` |  |
| postgres.persistence.reclaimPolicy | string | `"Retain"` |  |
| postgres.persistence.annotations | object | `{}` |  |
| postgres.existingSecret | string | `""` |  |
| postgres.credentials.database | string | `"postgresdb"` |  |
| postgres.credentials.user | string | `"admin"` |  |
| postgres.credentials.password | string | `"test123"` |  |
| postgres.resources.limits.cpu | string | `"2"` |  |
| postgres.resources.limits.memory | string | `"2Gi"` |  |
| postgres.resources.requests.cpu | string | `"500m"` |  |
| postgres.resources.requests.memory | string | `"512Mi"` |  |
| postgres.terminationGracePeriodSeconds | int | `120` |  |
| postgres.lifecycle.preStop.enabled | bool | `true` |  |
| postgres.external.enabled | bool | `false` |  |
| postgres.external.existingSecret | string | `""` |  |
| postgres.external.host | string | `""` |  |
| postgres.external.hostKey | string | `"host"` |  |
| postgres.external.port | int | `5432` |  |
| postgres.external.portKey | string | `"port"` |  |
| postgres.external.database | string | `""` |  |
| postgres.external.databaseKey | string | `"dbname"` |  |
| postgres.external.user | string | `""` |  |
| postgres.external.userKey | string | `"user"` |  |
| postgres.external.password | string | `""` |  |
| postgres.external.passwordKey | string | `"password"` |  |
| postgres.probes.readiness.type | string | `"exec"` |  |
| postgres.probes.readiness.command[0] | string | `"pg_isready"` |  |
| postgres.probes.readiness.command[1] | string | `"-U"` |  |
| postgres.probes.readiness.command[2] | string | `"$(POSTGRES_USER)"` |  |
| postgres.probes.readiness.initialDelaySeconds | int | `15` |  |
| postgres.probes.readiness.periodSeconds | int | `10` |  |
| postgres.probes.readiness.timeoutSeconds | int | `3` |  |
| postgres.probes.readiness.successThreshold | int | `1` |  |
| postgres.probes.readiness.failureThreshold | int | `3` |  |
| postgres.probes.liveness.type | string | `"exec"` |  |
| postgres.probes.liveness.command[0] | string | `"pg_isready"` |  |
| postgres.probes.liveness.command[1] | string | `"-U"` |  |
| postgres.probes.liveness.command[2] | string | `"$(POSTGRES_USER)"` |  |
| postgres.probes.liveness.initialDelaySeconds | int | `10` |  |
| postgres.probes.liveness.periodSeconds | int | `15` |  |
| postgres.probes.liveness.timeoutSeconds | int | `3` |  |
| postgres.probes.liveness.successThreshold | int | `1` |  |
| postgres.probes.liveness.failureThreshold | int | `5` |  |
| postgres.upgrade.enabled | bool | `false` |  |
| postgres.upgrade.targetVersion | string | `"18"` |  |
| postgres.upgrade.backupCompleted | bool | `false` |  |
| pgbouncer.enabled | bool | `false` |  |
| pgbouncer.image.repository | string | `"edoburu/pgbouncer"` |  |
| pgbouncer.image.tag | string | `"latest"` |  |
| pgbouncer.image.pullPolicy | string | `"IfNotPresent"` |  |
| pgbouncer.service.type | string | `"ClusterIP"` |  |
| pgbouncer.service.port | int | `6432` |  |
| pgbouncer.pool.mode | string | `"transaction"` |  |
| pgbouncer.pool.maxClientConn | int | `3000` |  |
| pgbouncer.pool.defaultPoolSize | int | `120` |  |
| pgbouncer.pool.minPoolSize | int | `10` |  |
| pgbouncer.pool.reservePoolSize | int | `25` |  |
| pgbouncer.pool.reservePoolTimeout | int | `5` |  |
| pgbouncer.pool.maxDbConnections | int | `200` |  |
| pgbouncer.pool.maxUserConnections | int | `200` |  |
| pgbouncer.pool.serverLifetime | int | `3600` |  |
| pgbouncer.pool.serverIdleTimeout | int | `600` |  |
| pgbouncer.authType | string | `"scram-sha-256"` |  |
| pgbouncer.resources.limits.cpu | string | `"1"` |  |
| pgbouncer.resources.limits.memory | string | `"256Mi"` |  |
| pgbouncer.resources.requests.cpu | string | `"250m"` |  |
| pgbouncer.resources.requests.memory | string | `"128Mi"` |  |
| pgbouncer.probes.readiness.type | string | `"exec"` |  |
| pgbouncer.probes.readiness.command[0] | string | `"pg_isready"` |  |
| pgbouncer.probes.readiness.command[1] | string | `"-h"` |  |
| pgbouncer.probes.readiness.command[2] | string | `"localhost"` |  |
| pgbouncer.probes.readiness.command[3] | string | `"-p"` |  |
| pgbouncer.probes.readiness.command[4] | string | `"6432"` |  |
| pgbouncer.probes.readiness.initialDelaySeconds | int | `10` |  |
| pgbouncer.probes.readiness.periodSeconds | int | `10` |  |
| pgbouncer.probes.readiness.timeoutSeconds | int | `5` |  |
| pgbouncer.probes.readiness.successThreshold | int | `1` |  |
| pgbouncer.probes.readiness.failureThreshold | int | `3` |  |
| pgbouncer.probes.liveness.type | string | `"exec"` |  |
| pgbouncer.probes.liveness.command[0] | string | `"pg_isready"` |  |
| pgbouncer.probes.liveness.command[1] | string | `"-h"` |  |
| pgbouncer.probes.liveness.command[2] | string | `"localhost"` |  |
| pgbouncer.probes.liveness.command[3] | string | `"-p"` |  |
| pgbouncer.probes.liveness.command[4] | string | `"6432"` |  |
| pgbouncer.probes.liveness.initialDelaySeconds | int | `10` |  |
| pgbouncer.probes.liveness.periodSeconds | int | `15` |  |
| pgbouncer.probes.liveness.timeoutSeconds | int | `5` |  |
| pgbouncer.probes.liveness.successThreshold | int | `1` |  |
| pgbouncer.probes.liveness.failureThreshold | int | `5` |  |
| redis.enabled | bool | `true` |  |
| redis.image.repository | string | `"redis"` |  |
| redis.image.tag | string | `"latest"` |  |
| redis.image.pullPolicy | string | `"IfNotPresent"` |  |
| redis.service.type | string | `"ClusterIP"` |  |
| redis.service.port | int | `6379` |  |
| redis.external.enabled | bool | `false` |  |
| redis.external.existingSecret | string | `""` |  |
| redis.external.urlKey | string | `"REDIS_URL"` |  |
| redis.external.url | string | `""` |  |
| redis.external.host | string | `""` |  |
| redis.external.port | int | `6379` |  |
| redis.external.db | int | `0` |  |
| redis.auth.enabled | bool | `true` |  |


### Rate Limiter Redis (Optional)

Separate Redis instance for rate limiting to prevent contention:

#### Using Kubernetes Secrets (Recommended)

Create a Secret for the rate limiter Redis URL:

```bash
kubectl create secret generic rate-limiter-redis-secret \
  --from-literal=RATELIMITER_REDIS_URL='redis://:password@rate-limiter-redis:6379/0' \
  --from-literal=RATELIMITER_REDIS_SSL_CA_CERTS='path/to/ca.crt' \
  --from-literal=RATELIMITER_REDIS_SSL_CERTFILE='path/to/client.crt' \
  --from-literal=RATELIMITER_REDIS_SSL_KEYFILE='path/to/client.key' \
  --from-literal=RATELIMITER_REDIS_SSL_CHECK_HOSTNAME='true'
```

Reference the Secret in your `values.yaml`:

```yaml
mcpContextForge:
  extraEnvFrom:
    - secretRef:
        name: rate-limiter-redis-secret

  config:
    # Connection pool settings for rate limiter Redis
    RATELIMITER_REDIS_MAX_CONNECTIONS: "50"
    RATELIMITER_REDIS_SOCKET_TIMEOUT: "2.0"
    RATELIMITER_REDIS_SOCKET_CONNECT_TIMEOUT: "2.0"
    RATELIMITER_REDIS_SSL: false
```

#### Direct Configuration (Development Only)

```yaml
mcpContextForge:
  config:
    RATELIMITER_REDIS_URL: "redis://rate-limiter-redis:6379/0"
    RATELIMITER_REDIS_MAX_CONNECTIONS: "50"
    RATELIMITER_REDIS_SOCKET_TIMEOUT: "2.0"
    RATELIMITER_REDIS_SOCKET_CONNECT_TIMEOUT: "2.0"
    RATELIMITER_REDIS_SSL: false
    RATELIMITER_REDIS_SSL_CA_CERTS: /certs/ca.crt
    RATELIMITER_REDIS_SSL_CERTFILE: /certs/client.crt
    RATELIMITER_REDIS_SSL_KEYFILE: /certs/client.key
    RATELIMITER_REDIS_SSL_CHECK_HOSTNAME: true
```

#### Fallback Behavior

When `RATELIMITER_REDIS_URL` is not set during start time, the gateway automatically falls back to the main Redis instance configured via `REDIS_URL`. But during mid-runtime if `RATELIMITER_REDIS_URL` becomes unavailable, rather than falling back to `REDIS_URL`, it falls back to in-memory. This ensures backward compatibility with existing deployments.

**Notes:**
- **Migration:** Unset = uses main `REDIS_URL` (backward compatible)
- **URL Validation:** Must start with `redis://` or `rediss://` (validated at startup)
- **Independent:** Operates independently of `CACHE_TYPE` setting

| redis.auth.existingSecret | string | `""` |  |
| redis.auth.passwordKey | string | `"REDIS_PASSWORD"` |  |
| redis.auth.password | string | `"change-me-redis"` |  |
| redis.resources.limits.cpu | string | `"1"` |  |
| redis.resources.limits.memory | string | `"1Gi"` |  |
| redis.resources.requests.cpu | string | `"250m"` |  |
| redis.resources.requests.memory | string | `"256Mi"` |  |
| redis.probes.readiness.type | string | `"exec"` |  |
| redis.probes.readiness.command[0] | string | `"sh"` |  |
| redis.probes.readiness.command[1] | string | `"-c"` |  |
| redis.probes.readiness.command[2] | string | `"if [ -n \"${REDIS_PASSWORD:-}\" ]; then\n  redis-cli --no-auth-warning -a \"${REDIS_PASSWORD}\" PING\nelse\n  redis-cli PING\nfi\n"` |  | 
| redis.probes.readiness.initialDelaySeconds | int | `10` |  |
| redis.probes.readiness.periodSeconds | int | `15` |  |
| redis.probes.readiness.timeoutSeconds | int | `5` |  |
| redis.probes.readiness.successThreshold | int | `1` |  |
| redis.probes.readiness.failureThreshold | int | `6` |  |
| redis.probes.liveness.type | string | `"exec"` |  |
| redis.probes.liveness.command[0] | string | `"sh"` |  |
| redis.probes.liveness.command[1] | string | `"-c"` |  |
| redis.probes.liveness.command[2] | string | `"if [ -n \"${REDIS_PASSWORD:-}\" ]; then\n  redis-cli --no-auth-warning -a \"${REDIS_PASSWORD}\" PING\nelse\n  redis-cli PING\nfi\n"` |  | 
| redis.probes.liveness.initialDelaySeconds | int | `5` |  |
| redis.probes.liveness.periodSeconds | int | `20` |  |
| redis.probes.liveness.timeoutSeconds | int | `5` |  |
| redis.probes.liveness.successThreshold | int | `1` |  |
| redis.probes.liveness.failureThreshold | int | `8` |  |
| redis.persistence.enabled | bool | `false` |  |
| redis.persistence.storageClassName | string | `""` |  |
| redis.persistence.accessModes[0] | string | `"ReadWriteOnce"` |  |
| redis.persistence.size | string | `"1Gi"` |  |
| redis.persistence.reclaimPolicy | string | `"Retain"` |  |
| redis.persistence.annotations | object | `{}` |  |
| pgadmin.enabled | bool | `false` |  |
| pgadmin.image.repository | string | `"dpage/pgadmin4"` |  |
| pgadmin.image.tag | string | `"latest"` |  |
| pgadmin.image.pullPolicy | string | `"IfNotPresent"` |  |
| pgadmin.service.type | string | `"ClusterIP"` |  |
| pgadmin.service.port | int | `80` |  |
| pgadmin.existingSecret | string | `""` |  |
| pgadmin.passwordKey | string | `"PGADMIN_DEFAULT_PASSWORD"` |  |
| pgadmin.env.email | string | `"admin@example.com"` |  |
| pgadmin.env.password | string | `"admin123"` |  |
| pgadmin.resources.limits.cpu | string | `"200m"` |  |
| pgadmin.resources.limits.memory | string | `"256Mi"` |  |
| pgadmin.resources.requests.cpu | string | `"100m"` |  |
| pgadmin.resources.requests.memory | string | `"128Mi"` |  |
| pgadmin.probes.readiness.type | string | `"http"` |  |
| pgadmin.probes.readiness.path | string | `"/misc/ping"` |  |
| pgadmin.probes.readiness.port | int | `80` |  |
| pgadmin.probes.readiness.initialDelaySeconds | int | `60` |  |
| pgadmin.probes.readiness.periodSeconds | int | `10` |  |
| pgadmin.probes.readiness.timeoutSeconds | int | `5` |  |
| pgadmin.probes.readiness.successThreshold | int | `1` |  |
| pgadmin.probes.readiness.failureThreshold | int | `5` |  |
| pgadmin.probes.liveness.type | string | `"http"` |  |
| pgadmin.probes.liveness.path | string | `"/misc/ping"` |  |
| pgadmin.probes.liveness.port | int | `80` |  |
| pgadmin.probes.liveness.initialDelaySeconds | int | `90` |  |
| pgadmin.probes.liveness.periodSeconds | int | `20` |  |
| pgadmin.probes.liveness.timeoutSeconds | int | `5` |  |
| pgadmin.probes.liveness.successThreshold | int | `1` |  |
| pgadmin.probes.liveness.failureThreshold | int | `3` |  |
| redisCommander.enabled | bool | `false` |  |
| redisCommander.image.repository | string | `"rediscommander/redis-commander"` |  |
| redisCommander.image.tag | string | `"latest"` |  |
| redisCommander.image.pullPolicy | string | `"IfNotPresent"` |  |
| redisCommander.service.type | string | `"ClusterIP"` |  |
| redisCommander.service.port | int | `8081` |  |
| redisCommander.resources.limits.cpu | string | `"100m"` |  |
| redisCommander.resources.limits.memory | string | `"256Mi"` |  |
| redisCommander.resources.requests.cpu | string | `"50m"` |  |
| redisCommander.resources.requests.memory | string | `"128Mi"` |  |
| redisCommander.probes.readiness.type | string | `"http"` |  |
| redisCommander.probes.readiness.path | string | `"/"` |  |
| redisCommander.probes.readiness.port | int | `8081` |  |
| redisCommander.probes.readiness.initialDelaySeconds | int | `15` |  |
| redisCommander.probes.readiness.periodSeconds | int | `10` |  |
| redisCommander.probes.readiness.timeoutSeconds | int | `2` |  |
| redisCommander.probes.readiness.successThreshold | int | `1` |  |
| redisCommander.probes.readiness.failureThreshold | int | `3` |  |
| redisCommander.probes.liveness.type | string | `"http"` |  |
| redisCommander.probes.liveness.path | string | `"/"` |  |
| redisCommander.probes.liveness.port | int | `8081` |  |
| redisCommander.probes.liveness.initialDelaySeconds | int | `10` |  |
| redisCommander.probes.liveness.periodSeconds | int | `15` |  |
| redisCommander.probes.liveness.timeoutSeconds | int | `2` |  |
| redisCommander.probes.liveness.successThreshold | int | `1` |  |
| redisCommander.probes.liveness.failureThreshold | int | `5` |  |
| minio.enabled | bool | `false` |  |
| minio.image.repository | string | `"minio/minio"` |  |
| minio.image.tag | string | `"RELEASE.2025-09-07T16-13-09Z-cpuv1"` |  |
| minio.image.pullPolicy | string | `"IfNotPresent"` |  |
| minio.existingSecret | string | `""` |  |
| minio.credentials.rootUser | string | `"minioadmin"` |  |
| minio.credentials.rootPassword | string | `"minioadminchangeme"` |  |
| minio.service.type | string | `"ClusterIP"` |  |
| minio.service.apiPort | int | `9000` |  |
| minio.service.consolePort | int | `9001` |  |
| minio.persistence.enabled | bool | `true` |  |
| minio.persistence.storageClassName | string | `""` |  |
| minio.persistence.accessModes[0] | string | `"ReadWriteOnce"` |  |
| minio.persistence.size | string | `"10Gi"` |  |
| minio.persistence.reclaimPolicy | string | `"Retain"` |  |
| minio.resources.limits.cpu | string | `"500m"` |  |
| minio.resources.limits.memory | string | `"1Gi"` |  |
| minio.resources.requests.cpu | string | `"100m"` |  |
| minio.resources.requests.memory | string | `"256Mi"` |  |
| mcpFastTimeServer.enabled | bool | `true` |  |
| mcpFastTimeServer.replicaCount | int | `2` |  |
| mcpFastTimeServer.image.repository | string | `"ghcr.io/ibm/fast-time-server"` |  |
| mcpFastTimeServer.image.tag | string | `"latest"` |  |
| mcpFastTimeServer.image.pullPolicy | string | `"IfNotPresent"` |  |
| mcpFastTimeServer.port | int | `8080` |  |
| mcpFastTimeServer.command | list | `[]` |  |
| mcpFastTimeServer.args[0] | string | `"-transport=dual"` |  |
| mcpFastTimeServer.args[1] | string | `"-listen=0.0.0.0"` |  |
| mcpFastTimeServer.args[2] | string | `"-port=8080"` |  |
| mcpFastTimeServer.args[3] | string | `"-log-level=info"` |  |
| mcpFastTimeServer.ingress.enabled | bool | `true` |  |
| mcpFastTimeServer.ingress.className | string | `"nginx"` |  |
| mcpFastTimeServer.ingress.host | string | `"gateway.local"` |  |
| mcpFastTimeServer.ingress.path | string | `"/fast-time"` |  |
| mcpFastTimeServer.ingress.pathType | string | `"Prefix"` |  |
| mcpFastTimeServer.ingress.servicePort | int | `80` |  |
| mcpFastTimeServer.ingress.annotations | object | `{}` |  |
| mcpFastTimeServer.ingress.tls.enabled | bool | `true` |  |
| mcpFastTimeServer.ingress.tls.secretName | string | `""` |  |
| mcpFastTimeServer.probes.readiness.type | string | `"http"` |  |
| mcpFastTimeServer.probes.readiness.path | string | `"/health"` |  |
| mcpFastTimeServer.probes.readiness.port | int | `8080` |  |
| mcpFastTimeServer.probes.readiness.initialDelaySeconds | int | `3` |  |
| mcpFastTimeServer.probes.readiness.periodSeconds | int | `10` |  |
| mcpFastTimeServer.probes.readiness.timeoutSeconds | int | `2` |  |
| mcpFastTimeServer.probes.readiness.successThreshold | int | `1` |  |
| mcpFastTimeServer.probes.readiness.failureThreshold | int | `3` |  |
| mcpFastTimeServer.probes.liveness.type | string | `"http"` |  |
| mcpFastTimeServer.probes.liveness.path | string | `"/health"` |  |
| mcpFastTimeServer.probes.liveness.port | int | `8080` |  |
| mcpFastTimeServer.probes.liveness.initialDelaySeconds | int | `3` |  |
| mcpFastTimeServer.probes.liveness.periodSeconds | int | `15` |  |
| mcpFastTimeServer.probes.liveness.timeoutSeconds | int | `2` |  |
| mcpFastTimeServer.probes.liveness.successThreshold | int | `1` |  |
| mcpFastTimeServer.probes.liveness.failureThreshold | int | `3` |  |
| mcpFastTimeServer.resources.limits.cpu | string | `"50m"` |  |
| mcpFastTimeServer.resources.limits.memory | string | `"64Mi"` |  |
| mcpFastTimeServer.resources.requests.cpu | string | `"25m"` |  |
| mcpFastTimeServer.resources.requests.memory | string | `"10Mi"` |  |
| nginxProxy.enabled | bool | `false` |  |
| nginxProxy.image.repository | string | `"mcpgateway/nginx-cache"` |  |
| nginxProxy.image.tag | string | `"latest"` |  |
| nginxProxy.image.pullPolicy | string | `"IfNotPresent"` |  |
| nginxProxy.service.type | string | `"ClusterIP"` |  |
| nginxProxy.service.port | int | `80` |  |
| nginxProxy.persistence.enabled | bool | `true` |  |
| nginxProxy.persistence.storageClassName | string | `""` |  |
| nginxProxy.persistence.accessModes[0] | string | `"ReadWriteOnce"` |  |
| nginxProxy.persistence.size | string | `"2Gi"` |  |
| nginxProxy.sysctls[0] | string | `"net.ipv4.tcp_fin_timeout=15"` |  |
| nginxProxy.sysctls[1] | string | `"net.ipv4.ip_local_port_range=1024 65535"` |  |
| nginxProxy.resources.limits.cpu | string | `"4"` |  |
| nginxProxy.resources.limits.memory | string | `"1Gi"` |  |
| nginxProxy.resources.requests.cpu | string | `"2"` |  |
| nginxProxy.resources.requests.memory | string | `"512Mi"` |  |
| nginxProxy.probes.readiness.type | string | `"http"` |  |
| nginxProxy.probes.readiness.path | string | `"/health"` |  |
| nginxProxy.probes.readiness.port | int | `80` |  |
| nginxProxy.probes.readiness.initialDelaySeconds | int | `10` |  |
| nginxProxy.probes.readiness.periodSeconds | int | `30` |  |
| nginxProxy.probes.readiness.timeoutSeconds | int | `5` |  |
| nginxProxy.probes.readiness.successThreshold | int | `1` |  |
| nginxProxy.probes.readiness.failureThreshold | int | `3` |  |
| nginxProxy.probes.liveness.type | string | `"http"` |  |
| nginxProxy.probes.liveness.path | string | `"/health"` |  |
| nginxProxy.probes.liveness.port | int | `80` |  |
| nginxProxy.probes.liveness.initialDelaySeconds | int | `10` |  |
| nginxProxy.probes.liveness.periodSeconds | int | `30` |  |
| nginxProxy.probes.liveness.timeoutSeconds | int | `5` |  |
| nginxProxy.probes.liveness.successThreshold | int | `1` |  |
| nginxProxy.probes.liveness.failureThreshold | int | `3` |  |
| nginxProxy.config.workerConnections | int | `8192` |  |
| nginxProxy.config.keepaliveTimeout | int | `65` |  |
| nginxProxy.config.clientMaxBodySize | string | `"25m"` |  |
| nginxProxy.config.proxyReadTimeout | string | `"300s"` |  |
| nginxProxy.config.proxySendTimeout | string | `"300s"` |  |
| nginxProxy.config.sendTimeout | string | `"300s"` |  |
| nginxProxy.config.cache.enabled | bool | `true` |  |
| nginxProxy.config.cache.path | string | `"/var/cache/nginx"` |  |
| nginxProxy.config.cache.maxSize | string | `"1g"` |  |
| nginxProxy.config.cache.inactive | string | `"10m"` |  |
| monitoring.enabled | bool | `false` |  |
| monitoring.postgresExporter.enabled | bool | `true` |  |
| monitoring.postgresExporter.image.repository | string | `"quay.io/prometheuscommunity/postgres-exporter"` |  |
| monitoring.postgresExporter.image.tag | string | `"latest"` |  |
| monitoring.postgresExporter.image.pullPolicy | string | `"IfNotPresent"` |  |
| monitoring.postgresExporter.service.type | string | `"ClusterIP"` |  |
| monitoring.postgresExporter.service.port | int | `9187` |  |
| monitoring.postgresExporter.resources.limits.cpu | string | `"200m"` |  |
| monitoring.postgresExporter.resources.limits.memory | string | `"256Mi"` |  |
| monitoring.postgresExporter.resources.requests.cpu | string | `"50m"` |  |
| monitoring.postgresExporter.resources.requests.memory | string | `"64Mi"` |  |
| monitoring.redisExporter.enabled | bool | `true` |  |
| monitoring.redisExporter.image.repository | string | `"oliver006/redis_exporter"` |  |
| monitoring.redisExporter.image.tag | string | `"latest"` |  |
| monitoring.redisExporter.image.pullPolicy | string | `"IfNotPresent"` |  |
| monitoring.redisExporter.service.type | string | `"ClusterIP"` |  |
| monitoring.redisExporter.service.port | int | `9121` |  |
| monitoring.redisExporter.resources.limits.cpu | string | `"200m"` |  |
| monitoring.redisExporter.resources.limits.memory | string | `"256Mi"` |  |
| monitoring.redisExporter.resources.requests.cpu | string | `"50m"` |  |
| monitoring.redisExporter.resources.requests.memory | string | `"64Mi"` |  |
| monitoring.pgbouncerExporter.enabled | bool | `true` |  |
| monitoring.pgbouncerExporter.image.repository | string | `"prometheuscommunity/pgbouncer-exporter"` |  |
| monitoring.pgbouncerExporter.image.tag | string | `"latest"` |  |
| monitoring.pgbouncerExporter.image.pullPolicy | string | `"IfNotPresent"` |  |
| monitoring.pgbouncerExporter.service.type | string | `"ClusterIP"` |  |
| monitoring.pgbouncerExporter.service.port | int | `9127` |  |
| monitoring.pgbouncerExporter.resources.limits.cpu | string | `"200m"` |  |
| monitoring.pgbouncerExporter.resources.limits.memory | string | `"256Mi"` |  |
| monitoring.pgbouncerExporter.resources.requests.cpu | string | `"50m"` |  |
| monitoring.pgbouncerExporter.resources.requests.memory | string | `"64Mi"` |  |
| monitoring.nginxExporter.enabled | bool | `true` |  |
| monitoring.nginxExporter.image.repository | string | `"nginx/nginx-prometheus-exporter"` |  |
| monitoring.nginxExporter.image.tag | string | `"latest"` |  |
| monitoring.nginxExporter.image.pullPolicy | string | `"IfNotPresent"` |  |
| monitoring.nginxExporter.service.type | string | `"ClusterIP"` |  |
| monitoring.nginxExporter.service.port | int | `9113` |  |
| monitoring.nginxExporter.scrapeUri | string | `""` |  |
| monitoring.nginxExporter.resources.limits.cpu | string | `"200m"` |  |
| monitoring.nginxExporter.resources.limits.memory | string | `"128Mi"` |  |
| monitoring.nginxExporter.resources.requests.cpu | string | `"50m"` |  |
| monitoring.nginxExporter.resources.requests.memory | string | `"64Mi"` |  |
| monitoring.cadvisor.enabled | bool | `true` |  |
| monitoring.cadvisor.image.repository | string | `"gcr.io/cadvisor/cadvisor"` |  |
| monitoring.cadvisor.image.tag | string | `"latest"` |  |
| monitoring.cadvisor.image.pullPolicy | string | `"IfNotPresent"` |  |
| monitoring.cadvisor.service.type | string | `"ClusterIP"` |  |
| monitoring.cadvisor.service.port | int | `8080` |  |
| monitoring.cadvisor.privileged | bool | `true` |  |
| monitoring.cadvisor.resources.limits.cpu | string | `"500m"` |  |
| monitoring.cadvisor.resources.limits.memory | string | `"512Mi"` |  |
| monitoring.cadvisor.resources.requests.cpu | string | `"100m"` |  |
| monitoring.cadvisor.resources.requests.memory | string | `"128Mi"` |  |
| monitoring.prometheus.enabled | bool | `true` |  |
| monitoring.prometheus.image.repository | string | `"prom/prometheus"` |  |
| monitoring.prometheus.image.tag | string | `"latest"` |  |
| monitoring.prometheus.image.pullPolicy | string | `"IfNotPresent"` |  |
| monitoring.prometheus.service.type | string | `"ClusterIP"` |  |
| monitoring.prometheus.service.port | int | `9090` |  |
| monitoring.prometheus.retention | string | `"7d"` |  |
| monitoring.prometheus.persistence.enabled | bool | `true` |  |
| monitoring.prometheus.persistence.storageClassName | string | `""` |  |
| monitoring.prometheus.persistence.accessModes[0] | string | `"ReadWriteOnce"` |  |
| monitoring.prometheus.persistence.size | string | `"8Gi"` |  |
| monitoring.prometheus.resources.limits.cpu | int | `1` |  |
| monitoring.prometheus.resources.limits.memory | string | `"1Gi"` |  |
| monitoring.prometheus.resources.requests.cpu | string | `"200m"` |  |
| monitoring.prometheus.resources.requests.memory | string | `"256Mi"` |  |
| monitoring.loki.enabled | bool | `true` |  |
| monitoring.loki.image.repository | string | `"grafana/loki"` |  |
| monitoring.loki.image.tag | string | `"latest"` |  |
| monitoring.loki.image.pullPolicy | string | `"IfNotPresent"` |  |
| monitoring.loki.service.type | string | `"ClusterIP"` |  |
| monitoring.loki.service.port | int | `3100` |  |
| monitoring.loki.persistence.enabled | bool | `true` |  |
| monitoring.loki.persistence.storageClassName | string | `""` |  |
| monitoring.loki.persistence.accessModes[0] | string | `"ReadWriteOnce"` |  |
| monitoring.loki.persistence.size | string | `"8Gi"` |  |
| monitoring.loki.resources.limits.cpu | int | `1` |  |
| monitoring.loki.resources.limits.memory | string | `"1Gi"` |  |
| monitoring.loki.resources.requests.cpu | string | `"100m"` |  |
| monitoring.loki.resources.requests.memory | string | `"256Mi"` |  |
| monitoring.tempo.enabled | bool | `true` |  |
| monitoring.tempo.image.repository | string | `"grafana/tempo"` |  |
| monitoring.tempo.image.tag | string | `"latest"` |  |
| monitoring.tempo.image.pullPolicy | string | `"IfNotPresent"` |  |
| monitoring.tempo.service.type | string | `"ClusterIP"` |  |
| monitoring.tempo.service.queryPort | int | `3200` |  |
| monitoring.tempo.service.grpcPort | int | `4317` |  |
| monitoring.tempo.service.httpPort | int | `4318` |  |
| monitoring.tempo.persistence.enabled | bool | `true` |  |
| monitoring.tempo.persistence.storageClassName | string | `""` |  |
| monitoring.tempo.persistence.accessModes[0] | string | `"ReadWriteOnce"` |  |
| monitoring.tempo.persistence.size | string | `"8Gi"` |  |
| monitoring.tempo.resources.limits.cpu | int | `1` |  |
| monitoring.tempo.resources.limits.memory | string | `"1Gi"` |  |
| monitoring.tempo.resources.requests.cpu | string | `"100m"` |  |
| monitoring.tempo.resources.requests.memory | string | `"256Mi"` |  |
| monitoring.promtail.enabled | bool | `true` |  |
| monitoring.promtail.image.repository | string | `"grafana/promtail"` |  |
| monitoring.promtail.image.tag | string | `"latest"` |  |
| monitoring.promtail.image.pullPolicy | string | `"IfNotPresent"` |  |
| monitoring.promtail.resources.limits.cpu | string | `"500m"` |  |
| monitoring.promtail.resources.limits.memory | string | `"512Mi"` |  |
| monitoring.promtail.resources.requests.cpu | string | `"100m"` |  |
| monitoring.promtail.resources.requests.memory | string | `"128Mi"` |  |
| monitoring.grafana.enabled | bool | `true` |  |
| monitoring.grafana.image.repository | string | `"grafana/grafana"` |  |
| monitoring.grafana.image.tag | string | `"latest"` |  |
| monitoring.grafana.image.pullPolicy | string | `"IfNotPresent"` |  |
| monitoring.grafana.service.type | string | `"ClusterIP"` |  |
| monitoring.grafana.service.port | int | `3000` |  |
| monitoring.grafana.adminPassword | string | `"changeme"` |  |
| monitoring.grafana.allowSignUp | bool | `false` |  |
| monitoring.grafana.persistence.enabled | bool | `true` |  |
| monitoring.grafana.persistence.storageClassName | string | `""` |  |
| monitoring.grafana.persistence.accessModes[0] | string | `"ReadWriteOnce"` |  |
| monitoring.grafana.persistence.size | string | `"5Gi"` |  |
| monitoring.grafana.resources.limits.cpu | int | `1` |  |
| monitoring.grafana.resources.limits.memory | string | `"1Gi"` |  |
| monitoring.grafana.resources.requests.cpu | string | `"100m"` |  |
| monitoring.grafana.resources.requests.memory | string | `"256Mi"` |  |
| testing.enabled | bool | `false` |  |
| testing.registration.enabled | bool | `true` |  |
| testing.registration.image.repository | string | `"mcpgateway/mcpgateway"` |  |
| testing.registration.image.tag | string | `"latest"` |  |
| testing.registration.image.pullPolicy | string | `"IfNotPresent"` |  |
| testing.registration.backoffLimit | int | `2` |  |
| testing.registration.activeDeadlineSeconds | int | `600` |  |
| testing.registration.restartPolicy | string | `"Never"` |  |
| testing.registration.jwt.username | string | `"admin@example.com"` |  |
| testing.registration.jwt.expirationMinutes | int | `10080` |  |
| testing.registration.jwt.secret | string | `"my-test-key-but-now-longer-than-32-bytes"` |  |
| testing.fastTime.register.enabled | bool | `false` |  |
| testing.fastTime.register.gatewayName | string | `"fast_time"` |  |
| testing.fastTime.register.gatewayPath | string | `"/http"` |  |
| testing.fastTime.register.transport | string | `"STREAMABLEHTTP"` |  |
| testing.fastTime.register.createVirtualServer | bool | `true` |  |
| testing.fastTime.register.virtualServerId | string | `"9779b6698cbd4b4995ee04a4fab38737"` |  | 
| testing.fastTime.register.virtualServerName | string | `"Fast Time Server"` |  |
| testing.fastTime.register.virtualServerDescription | string | `"Virtual server exposing Fast Time MCP tools/resources/prompts"` |  |
| testing.a2aEchoAgent.enabled | bool | `true` |  |
| testing.a2aEchoAgent.image.repository | string | `"mcpgateway/a2a-echo-agent"` |  |
| testing.a2aEchoAgent.image.tag | string | `"latest"` |  |
| testing.a2aEchoAgent.image.pullPolicy | string | `"IfNotPresent"` |  |
| testing.a2aEchoAgent.service.type | string | `"ClusterIP"` |  |
| testing.a2aEchoAgent.service.port | int | `9100` |  |
| testing.a2aEchoAgent.env.A2A_ECHO_ADDR | string | `"0.0.0.0:9100"` |  |
| testing.a2aEchoAgent.env.A2A_ECHO_NAME | string | `"a2a-echo-agent"` |  |
| testing.a2aEchoAgent.env.A2A_ECHO_LOG_LEVEL | string | `"info"` |  |
| testing.a2aEchoAgent.resources.limits.cpu | string | `"1"` |  |
| testing.a2aEchoAgent.resources.limits.memory | string | `"256Mi"` |  |
| testing.a2aEchoAgent.resources.requests.cpu | string | `"250m"` |  |
| testing.a2aEchoAgent.resources.requests.memory | string | `"64Mi"` |  |
| testing.a2aEchoAgent.probes.readiness.type | string | `"http"` |  |
| testing.a2aEchoAgent.probes.readiness.path | string | `"/health"` |  |
| testing.a2aEchoAgent.probes.readiness.port | int | `9100` |  |
| testing.a2aEchoAgent.probes.readiness.initialDelaySeconds | int | `10` |  |
| testing.a2aEchoAgent.probes.readiness.periodSeconds | int | `30` |  |
| testing.a2aEchoAgent.probes.readiness.timeoutSeconds | int | `5` |  |
| testing.a2aEchoAgent.probes.readiness.successThreshold | int | `1` |  |
| testing.a2aEchoAgent.probes.readiness.failureThreshold | int | `3` |  |
| testing.a2aEchoAgent.probes.liveness.type | string | `"http"` |  |
| testing.a2aEchoAgent.probes.liveness.path | string | `"/health"` |  |
| testing.a2aEchoAgent.probes.liveness.port | int | `9100` |  |
| testing.a2aEchoAgent.probes.liveness.initialDelaySeconds | int | `10` |  |
| testing.a2aEchoAgent.probes.liveness.periodSeconds | int | `30` |  |
| testing.a2aEchoAgent.probes.liveness.timeoutSeconds | int | `5` |  |
| testing.a2aEchoAgent.probes.liveness.successThreshold | int | `1` |  |
| testing.a2aEchoAgent.probes.liveness.failureThreshold | int | `3` |  |
| testing.a2a.register.enabled | bool | `true` |  |
| testing.a2a.register.name | string | `"a2a-echo-agent"` |  |
| testing.a2a.register.description | string | `"Lightweight A2A echo agent for Kubernetes testing"` |  |
| testing.a2a.register.endpointPath | string | `"/"` |  |
| testing.a2a.register.protocolVersion | string | `"0.3.0"` |  |
| testing.a2a.register.visibility | string | `"public"` |  |
| testing.locust.enabled | bool | `true` |  |
| testing.locust.image.repository | string | `"locustio/locust"` |  |
| testing.locust.image.tag | string | `"latest"` |  |
| testing.locust.image.pullPolicy | string | `"IfNotPresent"` |  |
| testing.locust.service.type | string | `"ClusterIP"` |  |
| testing.locust.service.port | int | `8089` |  |
| testing.locust.mode | string | `"master"` |  |
| testing.locust.users | int | `100` |  |
| testing.locust.spawnRate | int | `10` |  |
| testing.locust.runTime | string | `"5m"` |  |
| testing.locust.expectWorkers | int | `1` |  |
| testing.locust.host | string | `""` |  |
| testing.locust.worker.enabled | bool | `true` |  |
| testing.locust.worker.replicaCount | int | `1` |  |
| testing.locust.script.existingConfigMap | string | `""` |  |
| testing.locust.script.key | string | `"locustfile.py"` |  |
| testing.locust.script.inline | string | `"from locust import HttpUser, between, task\n\nclass MCPGatewaySmokeUser(HttpUser):\n    wait_time = between(1, 3)\n\n    @task(3)\n    def health(self):\n        self.client.get(\"/health\", name=\"GET /health\")\n\n    @task(2)\n    def ready(self):\n        self.client.get(\"/ready\", name=\"GET /ready\")\n\n    @task(1)\n    def version(self):\n        self.client.get(\"/version\", name=\"GET /version\")\n"` |  |
| testing.locust.resources.limits.cpu | string | `"2"` |  |
| testing.locust.resources.limits.memory | string | `"1Gi"` |  |
| testing.locust.resources.requests.cpu | string | `"500m"` |  |
| testing.locust.resources.requests.memory | string | `"128Mi"` |  |
| benchmark.enabled | bool | `false` |  |
| benchmark.server.enabled | bool | `true` |  |
| benchmark.server.image.repository | string | `"mcpgateway/benchmark-server"` |  |
| benchmark.server.image.tag | string | `"latest"` |  |
| benchmark.server.image.pullPolicy | string | `"IfNotPresent"` |  |
| benchmark.server.service.type | string | `"ClusterIP"` |  |
| benchmark.server.service.startPort | int | `9000` |  |
| benchmark.server.service.serverCount | int | `10` |  |
| benchmark.server.transport | string | `"http"` |  |
| benchmark.server.tools | int | `50` |  |
| benchmark.server.resources | int | `20` |  |
| benchmark.server.prompts | int | `10` |  |
| benchmark.server.resourcesLimits.limits.cpu | string | `"2"` |  |
| benchmark.server.resourcesLimits.limits.memory | string | `"1Gi"` |  |
| benchmark.server.resourcesLimits.requests.cpu | string | `"500m"` |  |
| benchmark.server.resourcesLimits.requests.memory | string | `"256Mi"` |  |
| benchmark.register.enabled | bool | `true` |  |
| benchmark.register.gatewayPrefix | string | `"benchmark-"` |  |
| benchmark.register.transport | string | `"STREAMABLEHTTP"` |  |
| benchmark.register.startPort | int | `9000` |  |
| benchmark.register.serverCount | int | `10` |  |
| tls.enabled | bool | `false` |  |
| tls.forceHttps | bool | `false` |  |
| tls.image.repository | string | `"mcpgateway/nginx-cache"` |  |
| tls.image.tag | string | `"latest"` |  |
| tls.image.pullPolicy | string | `"IfNotPresent"` |  |
| tls.service.type | string | `"ClusterIP"` |  |
| tls.service.httpPort | int | `80` |  |
| tls.service.httpsPort | int | `443` |  |
| tls.persistence.enabled | bool | `true` |  |
| tls.persistence.storageClassName | string | `""` |  |
| tls.persistence.accessModes[0] | string | `"ReadWriteOnce"` |  |
| tls.persistence.size | string | `"2Gi"` |  |
| tls.resources.limits.cpu | string | `"4"` |  |
| tls.resources.limits.memory | string | `"1Gi"` |  |
| tls.resources.requests.cpu | string | `"2"` |  |
| tls.resources.requests.memory | string | `"512Mi"` |  |
| tls.probes.readiness.type | string | `"http"` |  |
| tls.probes.readiness.path | string | `"/health"` |  |
| tls.probes.readiness.port | int | `80` |  |
| tls.probes.readiness.initialDelaySeconds | int | `10` |  |
| tls.probes.readiness.periodSeconds | int | `30` |  |
| tls.probes.readiness.timeoutSeconds | int | `5` |  |
| tls.probes.readiness.successThreshold | int | `1` |  |
| tls.probes.readiness.failureThreshold | int | `3` |  |
| tls.probes.liveness.type | string | `"http"` |  |
| tls.probes.liveness.path | string | `"/health"` |  |
| tls.probes.liveness.port | int | `80` |  |
| tls.probes.liveness.initialDelaySeconds | int | `10` |  |
| tls.probes.liveness.periodSeconds | int | `30` |  |
| tls.probes.liveness.timeoutSeconds | int | `5` |  |
| tls.probes.liveness.successThreshold | int | `1` |  |
| tls.probes.liveness.failureThreshold | int | `3` |  |
| tls.sysctls[0] | string | `"net.ipv4.tcp_fin_timeout=15"` |  |
| tls.sysctls[1] | string | `"net.ipv4.ip_local_port_range=1024 65535"` |  |
| tls.certificate.existingSecret | string | `""` |  |
| tls.certificate.certKey | string | `"tls.crt"` |  |
| tls.certificate.privateKeyKey | string | `"tls.key"` |  |
| tls.certificate.selfSigned.enabled | bool | `true` |  |
| tls.certificate.selfSigned.commonName | string | `"localhost"` |  |
| tls.certificate.selfSigned.dnsNames[0] | string | `"localhost"` |  |
| tls.certificate.selfSigned.dnsNames[1] | string | `"gateway"` |  |
| tls.certificate.selfSigned.dnsNames[2] | string | `"nginx"` |  |
| tls.certificate.selfSigned.ipAddresses[0] | string | `"127.0.0.1"` |  |
| tls.certificate.selfSigned.durationDays | int | `365` |  |
| inspector.enabled | bool | `false` |  |
| inspector.image.repository | string | `"ghcr.io/modelcontextprotocol/inspector"` |  |
| inspector.image.tag | string | `"latest"` |  |
| inspector.image.pullPolicy | string | `"IfNotPresent"` |  |
| inspector.service.type | string | `"ClusterIP"` |  |
| inspector.service.uiPort | int | `6274` |  |
| inspector.service.apiPort | int | `6277` |  |
| inspector.env.HOST | string | `"0.0.0.0"` |  |
| inspector.env.MCP_AUTO_OPEN_ENABLED | string | `"false"` |  |
| inspector.env.DANGEROUSLY_OMIT_AUTH | string | `"true"` |  |
| inspector.resources.limits.cpu | string | `"1"` |  |
| inspector.resources.limits.memory | string | `"512Mi"` |  |
| inspector.resources.requests.cpu | string | `"250m"` |  |
| inspector.resources.requests.memory | string | `"128Mi"` |  |

---

## File: charts/README.md

# ContextForge Stack - Helm Chart

Deploy the full **ContextForge Stack**-ContextForge gateway, PostgreSQL, Redis, and optional PgAdmin & Redis-Commander UIs-on any Kubernetes distribution with a single Helm release. The chart lives in [`charts/mcp-stack`](https://github.com/IBM/mcp-context-forge/tree/main/charts/mcp-stack).

---

## Table of Contents

1. [Architecture](#architecture)
2. [Prerequisites](#prerequisites)
3. [Quick Start](#quick-start)
4. [Verify Deployment](#verify-deployment)
5. [Customising `values.yaml`](#customising-valuesyaml)
6. [Upgrade & Rollback](#upgrade--rollback)
7. [Uninstall](#uninstall)
8. [CI/CD & OCI Push](#cicd--oci-push)
9. [Troubleshooting](#troubleshooting)
10. [Common Values Reference](#common-values-reference)
11. [Further Reading](#further-reading)
12. [Contributing](#contributing)

---

## Architecture

High-level architecture:

```
          ┌─────────────────────────────┐
          │      NGINX Ingress          │
          └──────────┬───────────┬──────┘
                     │/          │/
      ┌──────────────▼─────┐ ┌────▼───────────┐
      │  ContextForge │ │ PgAdmin (opt.) │
      └─────────┬──────────┘ └────┬───────────┘
                │                 │
   ┌────────────▼──────┐ ┌────────▼────────────┐
   │    PostgreSQL     │ │ Redis Commander(opt)│
   └────────┬──────────┘ └────────┬────────────┘
            │                     │
      ┌─────▼────┐          ┌─────▼────┐
      │   PV     │          │  Redis   │
      └──────────┘          └──────────┘
```

Chart design:

```mermaid
graph TB
    %% External Access
    Ingress[🌐 NGINX Ingress<br/>gateway.local]

    %% Pre-deployment Job
    subgraph "Database Migration"
        MigrationJob[🔄 Migration Job<br/>Alembic upgrade head<br/>Runs before Gateway<br/>CPU: 100m-200m<br/>Memory: 256Mi-512Mi<br/>Restart: Never, Max 3 retries]
    end

    %% Application Tier
    subgraph "Application Layer"
        MCPGateway[🚪 ContextForge<br/>Replicas: 2<br/>Port: 4444<br/>CPU: 100m-200m<br/>Memory: 512Mi-1024Mi]
        FastTimeServer[⏰ Fast Time Server<br/>Replicas: 2<br/>Port: 8080<br/>CPU: 25m-50m<br/>Memory: 10Mi-64Mi]
        HPA{📈 Auto Scaling<br/>Min: 2, Max: 10<br/>CPU/Memory: 90%}
    end

    %% Management UIs
    subgraph "Management UIs - Optional"
        PgAdmin[📊 PgAdmin<br/>Postgres Web UI<br/>Port: 80<br/>CPU: 100m-200m<br/>Memory: 128Mi-256Mi]
        RedisCommander[🔧 Redis Commander<br/>Redis Web UI<br/>Port: 8081<br/>CPU: 50m-100m<br/>Memory: 128Mi-256Mi]
    end

    %% Configuration Management
    subgraph "Configuration"
        GatewayConfig[(📄 Gateway ConfigMap<br/>~40 app settings)]
        GatewaySecret[(🔐 Gateway Secret<br/>Auth & JWT keys)]
        PostgresConfig[(📄 Postgres ConfigMap<br/>Database name)]
        PostgresSecret[(🔐 Postgres Secret<br/>DB credentials)]
    end

    %% Data & State Management
    subgraph "Data & State"
        PostgreSQL[(🗄️ PostgreSQL 17<br/>Port: 5432<br/>CPU: 500m-1000m<br/>Memory: 64Mi-1Gi<br/>MCP Server configs)]
        Redis[(🔄 Redis<br/>Port: 6379<br/>CPU: 50m-100m<br/>Memory: 16Mi-256Mi<br/>Sessions & Cache)]
        PVC[(💾 Persistent Volume<br/>5Gi RWX Storage<br/>PostgreSQL data)]
    end

    %% Services Layer
    subgraph "Services (ClusterIP)"
        GatewaySvc[🔗 Gateway Service<br/>Port: 80]
        FastTimeSvc[🔗 Fast Time Service<br/>Port: 80]
        PostgresSvc[🔗 Postgres Service<br/>Port: 5432]
        RedisSvc[🔗 Redis Service<br/>Port: 6379]
        PgAdminSvc[🔗 PgAdmin Service<br/>Port: 80]
        RedisCommanderSvc[🔗 Redis Commander Service<br/>Port: 8081]
    end

    %% Network Connections
    Ingress --> GatewaySvc
    Ingress -.->|/fast-time| FastTimeSvc
    GatewaySvc --> MCPGateway
    FastTimeSvc --> FastTimeServer

    %% Migration Flow (Sequential)
    MigrationJob -->|Waits for DB ready| PostgresSvc
    MigrationJob -->|Runs before| MCPGateway

    %% Application to Services
    MCPGateway --> PostgresSvc
    MCPGateway --> RedisSvc
    PostgresSvc --> PostgreSQL
    RedisSvc --> Redis

    %% UI Connections
    PgAdminSvc --> PgAdmin
    RedisCommanderSvc --> RedisCommander
    PgAdmin --> PostgresSvc
    RedisCommander --> RedisSvc

    %% Configuration Injection
    GatewayConfig --> MCPGateway
    GatewaySecret --> MCPGateway
    PostgresConfig --> PostgreSQL
    PostgresSecret --> PostgreSQL
    PostgresSecret --> PgAdmin
    PostgresSecret --> MigrationJob

    %% Storage
    PostgreSQL --> PVC

    %% Auto Scaling
    HPA -.-> MCPGateway

    %% Health Checks (dotted lines)
    MCPGateway -.->|/health<br/>/ready| MCPGateway
    FastTimeServer -.->|/health| FastTimeServer
    PostgreSQL -.->|pg_isready| PostgreSQL
    Redis -.->|PING| Redis
    PgAdmin -.->|/misc/ping| PgAdmin
    RedisCommander -.->|HTTP root| RedisCommander
    MigrationJob -.->|db_isready.py| PostgreSQL

    %% Deployment Order (optional visual cue)
    PostgreSQL -.->|Must be ready first| MigrationJob
    MigrationJob -.->|Must complete first| MCPGateway

    %% Styling
    classDef app fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
    classDef migration fill:#fff3e0,stroke:#ef6c00,stroke-width:3px
    classDef ui fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
    classDef config fill:#fff8e1,stroke:#f57c00,stroke-width:2px
    classDef data fill:#f1f8e9,stroke:#388e3c,stroke-width:2px
    classDef service fill:#e0f2f1,stroke:#00695c,stroke-width:2px
    classDef network fill:#fce4ec,stroke:#c2185b,stroke-width:2px

    class MCPGateway,FastTimeServer,HPA app
    class MigrationJob migration
    class PgAdmin,RedisCommander ui
    class GatewayConfig,GatewaySecret,PostgresConfig,PostgresSecret config
    class PostgreSQL,Redis,PVC data
    class GatewaySvc,FastTimeSvc,PostgresSvc,RedisSvc,PgAdminSvc,RedisCommanderSvc service
    class Ingress network
```

---

## Prerequisites

* **Kubernetes ≥ 1.23** - Minikube, kind, EKS, AKS, GKE, OpenShift ...
* **Helm 3** - Install via Homebrew, Chocolatey, or cURL script
* **kubectl** - Configured to talk to the target cluster
* **Ingress controller** - NGINX, Traefik, or cloud-native (or disable via values)
* **StorageClass with dynamic provisioning** - Required for PostgreSQL/Redis PVC unless persistence is disabled

### Pre-flight checklist

```bash
# Check current context and cluster
kubectl config current-context
kubectl cluster-info

# Verify permissions
kubectl auth can-i create namespace
kubectl auth can-i create deployment -n default
kubectl auth can-i create clusterrolebinding

# Ensure server version ≥ v1.23
kubectl version -o json | jq -r '.serverVersion.gitVersion'

# Confirm a RWX StorageClass exists
kubectl get sc

# Confirm an ingress controller is running
kubectl get pods -A | grep -E 'ingress|traefik|nginx' || echo "No ingress controller found"
```

---

## Quick Start

```bash
# Clone the repo and enter the chart directory
git clone https://github.com/IBM/mcp-context-forge.git
cd mcp-context-forge/charts/mcp-stack

# (Optional) customise values
cp values.yaml my-values.yaml
vim my-values.yaml

# Install / upgrade (idempotent)
helm upgrade --install mcp-stack . \
  --namespace mcp \
  --create-namespace \
  -f my-values.yaml \
  --wait --timeout 30m
```

If you are running locally, add the line below to `/etc/hosts` (or enable the Minikube *ingress-dns* addon):

```text
$(minikube ip)  gateway.local
```

---

## Verify Deployment

```bash
# All resources should be Running / Completed
kubectl get all -n mcp
helm status mcp-stack -n mcp

# Check ingress (if enabled)
kubectl get ingress -n mcp
curl http://gateway.local/health

# No ingress? Port-forward instead
kubectl port-forward svc/mcp-stack-app 8080:80 -n mcp
curl http://localhost:8080/health
```

---

## Customising `values.yaml`

Below is a minimal example. Copy the default file and adjust for your environment.
Treat chart values as examples, not production-ready defaults.
It is expected that users will change these values before deployment.

```yaml
mcpContextForge:
  image:
    repository: ghcr.io/ibm/mcp-context-forge
    tag: 0.9.0
  ingress:
    enabled: true
    host: gateway.local   # replace with real DNS
    className: nginx
  envFrom:
    - secretRef:
        name: mcp-gateway-secret
    - configMapRef:
        name: mcp-gateway-config

postgres:
  credentials:
    user: admin
    password: S3cuReP@ss   # use a Secret in production
  persistence:
    size: 10Gi

pgadmin:
  enabled: false

redisCommander:
  enabled: false

rbac:
  create: true
```

Validate your changes with:

```bash
helm lint .
```

---

## Upgrade & Rollback

```bash
# Upgrade only the gateway image
ahelm upgrade mcp-stack . -n mcp-private\
  --set mcpContextForge.image.tag=v1.2.3 \
  --wait

# Preview changes (requires helm-diff plugin)
helm plugin install https://github.com/databus23/helm-diff
helm diff upgrade mcp-stack . -n mcp-private-f my-values.yaml

# Roll back to revision 1
helm rollback mcp-stack 1 -n mcp
```

### Upgrade Note for `1.0.0-BETA-2` Installations

If your existing release was originally installed from chart/app `1.0.0-BETA-2`, a direct upgrade can fail on MinIO with:

```text
Deployment.apps "<release>-minio" is invalid: spec.selector ... field is immutable
```

Validated workaround:

```bash
# One-time: remove only the Deployment (keeps PVC/data)
kubectl delete deployment -n mcp-private mcp-stack-minio

# Retry upgrade
helm upgrade mcp-stack charts/mcp-stack \
  -n mcp-private \
  --wait --timeout 15m
```

This recreates MinIO using current labels while preserving existing volumes.

---

## Database Migration

The chart includes automatic database migration using **Alembic** that runs before the mcpgateway deployment starts. This ensures your database schema is always up-to-date.

### How It Works

1. **Migration Job** - Runs as a Kubernetes Job alongside other resources
2. **Database Readiness** - Waits for PostgreSQL using the built-in `db_isready.py` script
3. **Schema Migration** - Executes `alembic upgrade head` to apply any pending migrations
4. **Gateway Startup** - mcpgateway uses a startup probe to ensure database is ready before serving traffic

### Configuration

```yaml
migration:
  enabled: true                    # Enable/disable migrations (default: true)
  backoffLimit: 3                  # Retry attempts on failure
  activeDeadlineSeconds: 600       # Job timeout (10 minutes)

  image:
    repository: ghcr.io/ibm/mcp-context-forge
    tag: latest                    # Should match mcpContextForge.image.tag

  command:
    waitForDb: "python3 /app/mcpgateway/utils/db_isready.py --max-tries 30 --interval 2 --timeout 5"
    migrate: "alembic upgrade head || echo '⚠️ Migration check failed'"
---

## Uninstall

```bash
helm uninstall mcp-stack -n mcp

# Optional cleanup
akubectl delete pvc --all -n mcp
kubectl delete namespace mcp
```

---

## CI/CD & OCI Push

```bash
# Lint and package
helm lint .
helm package . -d dist/

# Push the package to GitHub Container Registry (only for mcp-context-forge release managers!)
helm push dist/mcp-stack-*.tgz oci://ghcr.io/ibm/mcp-context-forge
```

Use the OCI URL below in Argo CD or Flux:

```
oci://ghcr.io/ibm/mcp-context-forge
```

---

## Storage & Persistence Configuration

The chart supports persistent storage for both PostgreSQL and Redis using **dynamic provisioning**. This approach is production-ready and works across all cloud providers and on-premise Kubernetes clusters.

### Key Features

- **Dynamic Provisioning**: Uses your cluster's default StorageClass or a specified one
- **Cloud Native**: Compatible with AWS EBS, GCP PD, Azure Disk, and more
- **Backup Ready**: Supports annotations for backup tools like Velero
- **Flexible**: Supports different storage classes per component

### PostgreSQL Persistence

```yaml
postgres:
  persistence:
    enabled: true
    storageClassName: ""     # Use default StorageClass
    # storageClassName: "gp3"   # AWS EKS example
    # storageClassName: "ssd"   # GKE example
    # storageClassName: "managed-premium"  # Azure AKS example
    accessModes: [ReadWriteOnce]
    size: 5Gi
    reclaimPolicy: Retain    # Prevents data loss on PVC deletion
    annotations:
      # backup.velero.io/backup-volumes: "postgres-data"
      # backup.policy/schedule: "daily"
```

### Redis Persistence (Optional)

```yaml
redis:
  persistence:
    enabled: false           # Disabled by default (Redis is often used as cache)
    storageClassName: ""     # Use default StorageClass when enabled
    accessModes: [ReadWriteOnce]
    size: 1Gi
    reclaimPolicy: Retain
    annotations: {}
```

### Common StorageClass Examples

| Provider | StorageClass Examples | Performance |
|----------|----------------------|-------------|
| **AWS EKS** | `gp3`, `gp2`, `io1`, `io2` | General purpose to high IOPS |
| **Google GKE** | `standard`, `ssd`, `premium-rw` | Standard to high performance |
| **Azure AKS** | `default`, `managed-premium`, `azurefile` | Standard to premium SSD |
| **Bare Metal** | `local-path`, `nfs-client`, `ceph-rbd` | Local or network storage |

### Backup & Recovery

For production deployments, consider:

1. **Volume Snapshots**: Use your cloud provider's snapshot features
2. **Velero**: Add backup annotations shown above
3. **Database Dumps**: Regular `pg_dump` for PostgreSQL
4. **Monitoring**: Set up alerts for storage usage

### PostgreSQL Upgrade Safety Defaults

To reduce risk of PostgreSQL data corruption during chart upgrades, internal Postgres now uses:

1. `Deployment` update strategy `Recreate` (prevents overlapping old/new DB pods on one PVC)
2. `terminationGracePeriodSeconds: 120`
3. `lifecycle.preStop` clean stop (`pg_ctl ... stop`) before termination
4. `postgres.persistence.useReadWriteOncePod: true` (strict single-pod mount when supported)

If your storage class does not support `ReadWriteOncePod`, set:

```yaml
postgres:
  persistence:
    useReadWriteOncePod: false
    accessModes: [ReadWriteOnce]
```

### What MinIO Is Used For In This Chart

MinIO is not on the normal request path for ContextForge traffic. In this chart, MinIO is used for PostgreSQL major-version upgrade backup/restore flow:

1. `job-postgres-backup` (pre-upgrade hook) writes a `pg_dump` into MinIO bucket `postgres-backups`
2. PostgreSQL upgrade init container reads the latest dump from MinIO and seeds the upgraded DB data directory

MinIO is disabled by default. Enable it when you use the chart-managed PostgreSQL major-upgrade workflow:

```yaml
minio:
  enabled: true
```

Use MinIO together with `postgres.upgrade.enabled=true`.
The chart now fails fast at render time if `postgres.upgrade.enabled=true` and `minio.enabled=false`.
If you are upgrading an existing release and still need MinIO, pin `minio.enabled=true` in your values before running `helm upgrade`.

### Manual Persistent Volume Creation (Advanced)

For environments without dynamic provisioning support (bare-metal clusters, edge computing, air-gapped deployments), you can create PVs manually outside the Helm chart.

#### Prerequisites

- Kubernetes cluster without a dynamic provisioner
- Direct access to cluster storage (hostPath, NFS, local volumes, etc.)
- Understanding of PV/PVC binding mechanisms

#### Step-by-Step Guide

1. **Create your PV resource** (apply before installing the chart):

```yaml
apiVersion: v1
kind: PersistentVolume
metadata:
  name: custom-postgres-pv
spec:
  storageClassName: ""  # Empty string - must match chart config
  capacity:
    storage: 10Gi       # Must be >= chart requested size
  accessModes:
    - ReadWriteOnce     # Must match or exceed chart access modes
  persistentVolumeReclaimPolicy: Retain

  # Choose your volume source (pick one):

  # Option A: hostPath (single-node only)
  hostPath:
    path: "/mnt/data/postgres"
    type: DirectoryOrCreate

  # Option B: NFS (multi-node compatible)
  # nfs:
  #   server: nfs-server.example.com
  #   path: "/exports/postgres"

  # Option C: Local volume (node-specific)
  # local:
  #   path: "/mnt/disks/ssd1"
  # nodeAffinity:
  #   required:
  #     nodeSelectorTerms:
  #     - matchExpressions:
  #       - key: kubernetes.io/hostname
  #         operator: In
  #         values: ["node-1"]
```

2. **Apply the PV**:
```bash
kubectl apply -f custom-postgres-pv.yaml
kubectl get pv  # Verify PV is Available
```

3. **Configure the Helm chart** to use your manual PV:

```yaml
postgres:
  persistence:
    enabled: true
    storageClassName: ""   # Empty string matches manual PVs without a class
    accessModes: [ReadWriteOnce]
    size: 5Gi              # Must be <= PV capacity (10Gi in example)
```

4. **Install the chart**:
```bash
helm install mcp-stack ./charts/mcp-stack -f my-values.yaml
```

The PVC will automatically bind to your manually-created PV based on:
- Matching `storageClassName` (both empty `""`)
- Sufficient capacity (PV ≥ PVC)
- Compatible access modes
- PV status: Available

#### Redis Manual PV Example

```yaml
apiVersion: v1
kind: PersistentVolume
metadata:
  name: custom-redis-pv
spec:
  storageClassName: ""
  capacity:
    storage: 2Gi
  accessModes: [ReadWriteOnce]
  persistentVolumeReclaimPolicy: Retain
  hostPath:
    path: "/mnt/data/redis"
    type: DirectoryOrCreate
```

#### Troubleshooting Manual PVs

| Issue | Cause | Solution |
|-------|-------|----------|
| PVC stuck in `Pending` | No matching PV | Check storageClassName, size, accessModes match |
| PVC binds to wrong PV | Multiple matching PVs | Use unique storageClassName or labels |
| Pod can't mount volume | Path doesn't exist | Create directory on node: `mkdir -p /mnt/data/postgres` |
| Permission denied | Wrong ownership | `chown -R 999:999 /mnt/data/postgres` (Postgres UID) |

#### Security Considerations

- **hostPath volumes** bypass pod security policies - use only in trusted environments
- **NFS volumes** should use `root_squash` and proper export permissions
- **Local volumes** require node affinity - pod will only schedule on nodes with the volume
- Always use `Retain` reclaim policy to prevent accidental data loss

#### Migration from Chart-Managed PVs

If upgrading from a previous version that used chart-managed hostPath PVs:

1. **Back up your data** before upgrading
2. **Delete old Helm-managed PVs** (they won't be recreated):
```bash
kubectl delete pv mcp-stack-default-postgres-pv
kubectl delete pv mcp-stack-default-redis-pv
```
3. **Create new manual PVs** pointing to the same paths:
```yaml
hostPath:
  path: "/mnt/data/postgres"  # Same path as before
```
4. **Upgrade the chart** - PVCs will bind to your new PVs

---

## Troubleshooting

| Symptom                  | Possible Cause                        | Quick Fix                                          |
| ------------------------ | ------------------------------------- | -------------------------------------------------- |
| `ImagePullBackOff`       | Image missing or private              | Check image tag & ensure pull secret is configured |
| Ingress 404 / no address | Controller not ready or host mismatch | `kubectl get ingress`, verify DNS / `/etc/hosts`   |
| `CrashLoopBackOff`       | Bad configuration / missing env vars  | `kubectl logs` and `kubectl describe pod ...`        |
| Env vars missing         | Secret/ConfigMap not mounted          | Confirm `envFrom` refs and resource existence      |
| RBAC access denied       | Roles/Bindings not created            | Set `rbac.create=true` or add roles manually       |

You can use the `helm template` and `yq` and check your templates. Example:

```bash
helm lint .
helm template . | yq '.spec.template.spec.containers[0] | {readinessProbe,livenessProbe}'
helm template mcp-stack . -f my-values.yaml > /tmp/all.yaml
```

---

## Common Values Reference

## Common Values Reference

| Key                               | Default         | Description                    |
| --------------------------------- | --------------- | ------------------------------ |
| `mcpContextForge.image.tag`       | `latest`        | Gateway image version          |
| `mcpContextForge.ingress.enabled` | `true`          | Create Ingress resource        |
| `mcpContextForge.ingress.host`    | `gateway.local` | External host                  |
| `mcpContextForge.hpa.enabled`     | `true`          | Enable Horizontal Pod Autoscaler |
| `migration.enabled`               | `true`          | Run database migrations        |
| `migration.backoffLimit`          | `3`             | Migration job retry attempts   |
| `postgres.credentials.user`       | `admin`         | DB username                    |
| `postgres.persistence.enabled`    | `true`          | Enable persistent storage      |
| `postgres.persistence.storageClassName` | `""`      | StorageClass for dynamic provisioning (empty = default) |
| `postgres.persistence.size`       | `5Gi`           | PostgreSQL volume size         |
| `postgres.persistence.reclaimPolicy` | `Retain`     | PVC reclaim policy (Retain/Delete) |
| `redis.persistence.enabled`       | `false`         | Enable Redis persistent storage |
| `redis.persistence.size`          | `1Gi`           | Redis volume size (when enabled) |
| `pgadmin.enabled`                 | `false`         | Deploy PgAdmin UI              |
| `redisCommander.enabled`          | `false`         | Deploy Redis-Commander UI      |
| `rbac.create`                     | `true`          | Auto-create Role & RoleBinding |

For every setting see the [full annotated `values.yaml`](https://github.com/IBM/mcp-context-forge/blob/main/charts/mcp-stack/values.yaml).

---

## Further Reading

* Helm: [https://helm.sh/docs/](https://helm.sh/docs/)
* Helm Diff plugin: [https://github.com/databus23/helm-diff](https://github.com/databus23/helm-diff)
* Helm OCI registries: [https://helm.sh/docs/topics/registries/](https://helm.sh/docs/topics/registries/)
* Kubernetes Ingress: [https://kubernetes.io/docs/concepts/services-networking/ingress/](https://kubernetes.io/docs/concepts/services-networking/ingress/)
* Network Policies: [https://kubernetes.io/docs/concepts/services-networking/network-policies/](https://kubernetes.io/docs/concepts/services-networking/network-policies/)
* Argo CD: [https://argo-cd.readthedocs.io/](https://argo-cd.readthedocs.io/)
* Flux: [https://fluxcd.io/](https://fluxcd.io/)

---

## Contributing

1. Fork the repo and create a feature branch.
2. Update templates or `values.yaml`.
3. Test with `helm lint` and `helm template`.
4. Open a pull request-thank you!

## Features

* 🗂️ Multi-service stack - Deploys ContextForge (`n` replicas), Fast-Time-Server (`n` replicas), Postgres 17, Redis, PGAdmin 4 and Redis-Commander out of the box.
* 🎛️ Idiomatic naming - All objects use helper templates (`mcp-stack.fullname`, chart labels) so release names and overrides stay collision-free.
* 🔐 Secrets & credentials - `mcp-stack-gateway-secret` (Basic-Auth creds, JWT signing key, encryption salt, ...) and `postgres-secret` (DB user / password / database name), both injected via `envFrom`.
* ⚙️ Config as code - `mcp-stack-gateway-config` (\~40 tunables) and `postgres-config` for the DB name.
* 🔗 Derived URLs - Pods build `DATABASE_URL` and `REDIS_URL` from explicit host/port/user/pass variables-no hard-coding.
* ❤️🩹 Health management - Readiness and liveness probes on every deployment; the Gateway also has a startupProbe.
* 🚦 Resource safeguards - CPU and memory requests/limits set for all containers.
* 💾 Stateful storage - PV + PVC for Postgres (`/var/lib/postgresql/data`), storage class selectable.
* 🌐 Networking & access - ClusterIP services, optional NGINX Ingress, and `NOTES.txt` with port-forward plus safe secret-fetch commands (password, bearer token, `JWT_SECRET_KEY`).
* 📈 Replicas & availability - Gateway (3) and Fast-Time-Server (2) provide basic HA; stateful components run single-instance.
* 📦 Helm best-practice layout - Clear separation of Deployments, Services, ConfigMaps, Secrets, PVC/PV and Ingress; chart version 0.9.0.
* ⚙️ Horizontal Pod Autoscaler (HPA) support for mcpgateway

---

## TODO / Future roadmap

1. 🔄 Post-deploy hook to register MCP Servers with ContextForge
2. ⏳ Add startup probes for slow-booting services
3. 🛡️ Implement Kubernetes NetworkPolicies to restrict internal traffic
4. 📊 Expose Prometheus metrics and add scrape annotations
5. 📈 Bundle Grafana dashboards via ConfigMaps (optional)
6. 🔐 Integrate External Secrets support (e.g., AWS Secrets Manager)
7. 🧪 Add Helm test hooks to validate deployments
8. 🔍 Add `values.schema.json` for values validation and better UX
9. 🧰 Move static configuration to templated `ConfigMaps` where possible
10. 📁 Include persistent storage toggle in `values.yaml` for easier local/dev setup
11. 🧼 Add Helm pre-delete hook for cleanup tasks (e.g., deregistering from external systems)
12. 🧩 Package optional CRDs if needed in the future (e.g., for custom integrations)

## Debug / start fresh (delete namespace)

```bash
# 0. Create and customize the values
cp values.yaml my-values.yaml

# 1. Verify the release name and namespace
helm list -A | grep mcp-stack

# 2. Uninstall the Helm release (removes Deployments, Services, Secrets created by the chart)
helm uninstall mcp-stack -n mcp-private

# 3. Delete any leftover PersistentVolumeClaims *if* you don't need the data
kubectl delete pvc --all -n mcp-private

# 4. Remove the namespace itself (skips if you want to keep it)
kubectl delete namespace mcp-private

# 5. Optional: confirm nothing is left
helm list -A | grep mcp-stack   # should return nothing
kubectl get ns | grep mcp-private  # should return nothing

# 6. Re-create the namespace (if you deleted it)
kubectl create namespace mcp-private

# 7. Re-install the chart with your values file
helm upgrade --install mcp-stack . \
  --namespace mcp-private \
  -f my-values.yaml \
  --wait --timeout 15m --debug

# 8. Check status
kubectl get all -n mcp-private
helm status mcp-stack -n mcp-private --show-desc
```

---

## Horizontal Pod Autoscaler (HPA) Guide

Because ContextForge traffic could spike unpredictably, the chart lets you turn on a **Horizontal Pod Autoscaler** that automatically adds or removes gateway pods based on CPU / memory load.

The feature is **off by default**. Switch `hpa` to `enabled: true` in the `mcpContextForge` section of `values.yaml` to enable.

| Key                                                     | Default | What happens when you change it                                                                                                            |
| ------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `mcpContextForge.hpa.enabled`                           | `false` | `true` renders an `autoscaling/v2` HPA that targets **Deployment/mcpgateway**.                                                             |
| `mcpContextForge.hpa.minReplicas`                       | `3`     | ***Floor.*** Pods never drop below this even during quiet periods. Increase if you need more baseline capacity or faster cold-start times. |
| `mcpContextForge.hpa.maxReplicas`                       | `10`    | ***Ceiling.*** Upper safety-limit so runaway load cannot bankrupt the cluster.                                                             |
| `mcpContextForge.hpa.targetCPUUtilizationPercentage`    | `80`    | Lower the value to scale **up sooner** (more replicas at lower CPU); raise it to run hotter before adding pods.                            |
| `mcpContextForge.hpa.targetMemoryUtilizationPercentage` | *unset* | Optional second metric. If set, **either** CPU *or* memory breaching its threshold triggers scaling.                                       |

> **Tip** The starting replica count still comes from `mcpContextForge.replicaCount`, which also acts as a fallback if you later disable the HPA.

---

### Enabling or Tuning the HPA

#### 1 - Declaratively with Helm (recommended)

Make the change permanent by editing *values.yaml* or passing `--set` flags:

```bash
# First time enabling
helm upgrade --install mcp-stack charts/mcp-stack \
  --namespace mcp \
  --set mcpContextForge.hpa.enabled=true \
  --set mcpContextForge.hpa.minReplicas=2 \
  --set mcpContextForge.hpa.maxReplicas=15 \
  --set mcpContextForge.hpa.targetCPUUtilizationPercentage=70 \
  --wait

# Later: raise the ceiling & make scaling more aggressive
helm upgrade mcp-stack charts/mcp-stack \
  -n mcp-private\
  --reuse-values \
  --set mcpContextForge.hpa.maxReplicas=20 \
  --set mcpContextForge.hpa.targetCPUUtilizationPercentage=60 \
  --wait
```

*Helm edits the HPA in-place; no pod restarts are needed.*

#### 2 - Ad-hoc with kubectl (one-off tweaks)

Useful in emergencies or during load tests.

```bash
# Bump minReplicas from 3 → 5
kubectl patch hpa mcp-stack-mcpgateway -n mcp-private\
  --type merge \
  -p '{"spec":{"minReplicas":5}}'

# Drop the CPU target from 80 % → 65 % (scale up sooner)
kubectl patch hpa mcp-stack-mcpgateway -n mcp-private\
  --type json \
  -p '[{"op":"replace","path":"/spec/metrics/0/resource/target/averageUtilization","value":65}]'
```

> **Heads-up** Manual patches are overridden the next time you run `helm upgrade` unless you also update *values.yaml*.

---

### Verifying & Monitoring

| Task                   | Command                                               |
| ---------------------- | ----------------------------------------------------- |
| List all HPAs          | `kubectl get hpa -n mcp`                              |
| Watch live utilisation | `watch kubectl get hpa -n mcp`                        |
| Full details & events  | `kubectl describe hpa mcp-stack-mcpgateway -n mcp`    |
| Raw pod metrics        | `kubectl top pods -l app=mcp-stack-mcpgateway -n mcp` |

A healthy HPA shows something like:

```text
NAME                   TARGETS          MINPODS   MAXPODS   REPLICAS
mcp-stack-mcpgateway   55%/70%          2         15        4
```

### Check scaling events

```bash
# 1. Show the last few scale-up / scale-down events
kubectl describe hpa mcp-stack-mcpgateway -n mcp-private | tail -n 20

# 2. Stream HPA events as they happen
kubectl get events -n mcp-private \
  --field-selector involvedObject.kind=HorizontalPodAutoscaler,\
involvedObject.name=mcp-stack-mcpgateway \
  --watch

# 3. Watch target utilisation & replica count refresh every 2 s
watch -n2 kubectl get hpa mcp-stack-mcpgateway -n mcp-private

# 4. Live pod-level CPU / memory (confirm the numbers the HPA sees)
kubectl top pods -l app=mcp-stack-mcpgateway -n mcp-private --sort-by=cpu
```

---

### Prerequisites & Gotchas

* **Metrics API** - The cluster **must** run the Kubernetes *metrics-server* (or a Prometheus Adapter) so the control-plane can read CPU / memory stats.

  ```bash
  kubectl get deployment metrics-server -n kube-system
  ```
* **Resource requests** - The gateway deployment already sets `resources.requests.cpu` & `.memory`.
  Percentage-based HPAs need these values to compute utilisation.
* **RBAC** - Most distributions grant HPAs read-only access to metrics. Hardened clusters may require an additional `RoleBinding`.

---

### Troubleshooting

| Symptom                                | Checks                                                                                                                                                                   |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `cpu: ` / `memory: ` | *metrics-server* missing or failing → `kubectl logs deployment/metrics-server -n kube-system`                                                                            |
| HPA exists but never scales            | - Is the workload actually under load? See `kubectl top pods ...`.- Are limits **lower** than requests? Requests should reflect the typical baseline, not the ceiling. |
| No HPA rendered                        | Was the chart installed with `--set mcpContextForge.hpa.enabled=true`? Use `helm template` to confirm the YAML renders.                                                  |

---

## File: docs/docs/architecture/adr/001-adopt-fastapi-pydantic.md

# ADR-0001: Adopt FastAPI + Pydantic

- *Status:* Accepted
- *Date:* 2025-02-01
- *Deciders:* Mihai Criveti

## Context

ContextForge must serve both human and machine clients with low-latency HTTP and WebSocket endpoints. Payloads require runtime validation and schema documentation, while internal data types must align with environment-driven settings and JSON models.

We explored Python-native frameworks that support async-first operation, data validation, OpenAPI generation, and modular service layout.

## Decision

We will adopt:

- **FastAPI** as the core web framework for routing HTTP, WebSocket, and streaming endpoints.
- **Pydantic v2.11+** for all settings, schemas, and typed data models (e.g., `Tool`, `Resource`, `GatewayMetadata`, etc.).

These will form the foundation for the application layer and public API.

Pydantic v2 uses a **Rust-based core** (`pydantic-core`) that provides 5-50x performance improvements over Pydantic v1 for schema validation, type coercion, and model serialization. The Rust components release the GIL during execution, enabling better concurrency even within single worker processes.

## Consequences

- ✨ Strong typing, runtime validation, and auto-generated OpenAPI specs.
- 🧩 Unified model structure across internal logic, external APIs, and config parsing.
- 🚀 Excellent async performance with Uvicorn and Starlette compatibility.
- ⚡ Rust-powered validation (5-50x faster than Pydantic v1) with GIL release during validation.
- 🔒 Tight coupling to Pydantic means future transitions (e.g., to dataclasses or attrs) would be non-trivial.

## Alternatives Considered

| Option | Why Not |
|--------|---------|
| **Flask + Marshmallow** | Sync-first architecture, weak async support, manual OpenAPI generation. |
| **Django REST Framework** | Heavyweight, monolithic, tightly bound to Django ORM, not async-native. |
| **Tornado or Starlette alone** | More boilerplate to assemble middlewares, validators, and routing. |
| **Node.js + Fastify** | Excellent performance but requires a split language/runtime and loss of shared model code. |
| **Pure `httpx` + `uvicorn` + `pydantic-core`** | Too low-level; duplicating FastAPI features manually. |

## Status

This decision has been implemented in the current architecture.

---

## File: docs/docs/architecture/adr/002-use-async-sqlalchemy-orm.md

# ADR-0002: Use Async SQLAlchemy ORM

- *Status:* Accepted
- *Date:* 2025-02-01
- *Deciders:* Mihai Criveti

## Context

The gateway must persist:

- Tool metadata
- Resource configurations
- Usage metrics
- Peer discovery and federation state

We require a relational database with schema evolution, strong typing, and async support. The current codebase already uses SQLAlchemy ORM models with an async engine and declarative mapping style.

## Decision

We will use:

- **SQLAlchemy 2.x (async)** for all data persistence.
- **AsyncSession** and `async with` scoped transactions.
- **Alembic** for migrations, with autogeneration and CLI support.
- **SQLite** for development; **PostgreSQL** for production via `DATABASE_URL`.
- **Configurable connection pooling** with auto-scaling based on worker count and deployment size.

This provides consistent, well-understood relational behavior and integrates cleanly with FastAPI.

Connection pooling is configured via environment variables:

- `DB_POOL_SIZE`: Persistent connections per worker (default: 50)
- `DB_MAX_OVERFLOW`: Additional connections allowed (default: 10)
- `DB_POOL_TIMEOUT`: Wait time before timeout (default: 60s)
- `DB_POOL_RECYCLE`: Connection recycle interval (default: 3600s)

For multi-pod deployments, total connections = `(pods × workers × pool_size × 1.2) + buffer`.

## Consequences

- 🧱 Mature and reliable ORM with a wide developer base.
- 🔄 Fully async I/O stack without thread-pools or blocking.
- 🔧 Migrations handled declaratively using Alembic.
- 📄 Pydantic models can be derived from or synchronized with SQLAlchemy models if needed.
- ⚙️ Connection pooling auto-scales with deployment size (vertical and horizontal scaling).

## Alternatives Considered

| Option | Why Not |
|--------|---------|
| **Raw asyncpg / aiosqlite** | Manual query strings, error-prone joins, no built-in migrations. |
| **Tortoise ORM / GINO** | Less widely used, more magic, lower confidence in long-term maintainability. |
| **Django ORM** | Not async-native, tightly coupled to Django ecosystem, too heavyweight. |
| **NoSQL (e.g., MongoDB)** | No relational guarantees, weaker query language, major refactor from current SQL-based model. |

## Status

This decision is in place and all gateway persistence uses SQLAlchemy 2.x with async support.

---

## File: docs/docs/architecture/adr/003-expose-multi-transport-endpoints.md

# ADR-0003: Expose Multi-Transport Endpoints (HTTP / WebSocket / SSE / STDIO)

- *Status:* Accepted
- *Date:* 2025-02-01
- *Deciders:* Mihai Criveti

## Context

ContextForge must serve diverse clients: web browsers, CLIs, language-specific SDKs, and headless daemons.
Different use cases require support for both **request/response** and **streaming** interactions.

Requirements:

- Human-readable RPC over HTTP for developers
- Low-latency streaming for long-running tools
- IPC-style invocations for local CLI integration
- Unified business logic regardless of transport

## Decision

The gateway will support the following built-in transports:

- **HTTP JSON-RPC** (primary RPC interface)
- **WebSocket** (bidirectional messaging)
- **SSE (Server-Sent Events)** (for push-only event streaming)
- **Streamable HTTP**  (bidirectional, resumable streams, efficient MCP transport over HTTP)
- **STDIO** (optional local CLI / subprocess transport)

Transport selection is dynamic, based on environment (`TRANSPORT_TYPE`) and route grouping. All transports share the same service layer and authentication mechanisms.

## Consequences

- ✅ Maximum client flexibility, supporting modern browsers and legacy CLI tools.
- 🔄 Business logic remains decoupled from transport implementation.
- 📶 Streaming transports (WS, SSE) require timeout, reconnection, and back-pressure handling. Easy expansion with new MCP standards

## Alternatives Considered

| Option | Why Not |
|--------|---------|
| **HTTP-only JSON API** | Poor fit for long-lived streaming tasks; requires polling. |
| **gRPC (HTTP/2)** | Not browser-friendly; requires generated stubs; less discoverable. |
| **Separate microservices per transport** | Code duplication, diverging implementations, and operational complexity. |
| **Single transport abstraction** | Reduces explicitness; transport-specific needs get buried in generic interfaces. |

## Status

All four transports are implemented in the current FastAPI application and are toggleable via configuration.

---

## File: docs/docs/architecture/adr/004-combine-jwt-and-basic-auth.md

# ADR-0004: Combine JWT & Basic Auth

- *Status:* Accepted
- *Date:* 2025-02-01
- *Deciders:* Core Engineering Team

## Context

The gateway needs to support two types of clients:

- **Browser-based users** using the Admin UI
- **Headless clients** such as scripts, services, and tools

These use cases require different authentication workflows:

- Browsers prefer form-based login and session cookies.
- Automation prefers stateless, token-based access.

The current config exposes both:

- `BASIC_AUTH_USER` and `BASIC_AUTH_PASSWORD`
- `JWT_SECRET_KEY`, `JWT_EXPIRY_SECONDS`, and cookie settings

## Decision

We will combine both authentication modes as follows:

- **Basic Auth** secures access to `/admin`. Upon success, a short-lived **JWT cookie** is issued.
- **JWT Bearer token** (via header or cookie) is required for all API, WebSocket, and SSE requests.
- Tokens are signed using the shared `JWT_SECRET_KEY` and include standard claims (sub, exp, scopes).
- When `AUTH_REQUIRED=false`, the gateway allows unauthenticated access (dev only).

## Consequences

- ✅ Developers can log in once via browser and obtain an authenticated session.
- ✅ Scripts can use a generated JWT directly, with no credential storage.
- ❌ Tokens must be signed, rotated, and verified securely (TLS required).
- 🔄 JWTs expire and must be refreshed periodically by clients.

## Alternatives Considered

| Option | Why Not |
|--------|---------|
| **JWT only** | CLI tools need a pre-acquired token; not friendly for interactive login. |
| **Basic only** | Password sent on every request; cannot easily revoke or expire credentials. |
| **OAuth2 / OpenID Connect** | Too complex for self-hosted setups; requires external identity provider. |
| **mTLS client auth** | Secure but heavy; not usable in browsers or simple HTTP clients. |

## Status

This combined authentication mechanism is implemented and enabled by default in the gateway.

---

## Update: Asymmetric JWT Algorithm Support

- *Date:* 2025-01-13
- *Status:* Extended
- *Enhancement By:* Core Engineering Team

### Enhancement Overview

JWT authentication has been extended to support both symmetric (HMAC) and asymmetric (RSA/ECDSA) algorithms, significantly expanding the gateway's authentication capabilities for enterprise and distributed environments.

### Supported Algorithms

| Category | Algorithms | Use Case | Key Management |
|----------|------------|----------|----------------|
| **HMAC (Symmetric)** | HS256, HS384, HS512 | Single-service, simple deployments | Shared secret (`JWT_SECRET_KEY`) |
| **RSA (Asymmetric)** | RS256, RS384, RS512 | Multi-service, enterprise | Public/private key pair |
| **ECDSA (Asymmetric)** | ES256, ES384, ES512 | High-performance, modern crypto | Public/private key pair |

### Configuration

**Symmetric (HMAC) - Default:**
```bash
JWT_ALGORITHM=HS256
JWT_SECRET_KEY=your-secret-key
```

**Asymmetric (RSA/ECDSA) - New:**
```bash
JWT_ALGORITHM=RS256
JWT_PUBLIC_KEY_PATH=jwt/public.pem
JWT_PRIVATE_KEY_PATH=jwt/private.pem
JWT_AUDIENCE_VERIFICATION=true
JWT_ISSUER_VERIFICATION=true
```

### Benefits of Asymmetric Support

✅ **Enhanced Security**

- Private key never leaves the signing service
- Public key can be safely distributed for verification
- Eliminates shared secret management challenges

✅ **Scalability & Federation**

- Multiple services can verify tokens independently
- No need to distribute signing secrets
- Supports microservices and distributed architectures

✅ **Enterprise Compliance**

- Meets enterprise security standards (SOC2, ISO 27001)
- Supports Hardware Security Module (HSM) integration
- Enables proper key lifecycle management

✅ **Future-Proof Architecture**

- Foundation for advanced features like key rotation
- Compatible with industry-standard JWT libraries
- Supports Dynamic Client Registration scenarios

### Implementation Notes

- **Backward Compatibility**: All existing HMAC configurations continue to work unchanged
- **Runtime Configuration**: Algorithm and keys are validated at startup
- **Error Handling**: Clear error messages for misconfigured keys or missing files
- **Performance**: Minimal overhead for asymmetric operations in typical workloads

### Security Considerations

- **Key Storage**: Private keys must be secured and never committed to version control
- **Key Rotation**: Implement regular key rotation procedures for asymmetric keys
- **Algorithm Selection**: Choose algorithm based on security requirements and performance needs
- **Audience Verification**: Can be disabled for Dynamic Client Registration (DCR) scenarios

---

## Update: MCP Endpoint Authentication Configuration

- *Date:* 2025-01-16
- *Status:* Extended
- *Enhancement By:* Core Engineering Team

### Enhancement Overview

A new `MCP_REQUIRE_AUTH` configuration option provides fine-grained control over authentication requirements for MCP protocol endpoints (`/mcp/*`), independent of the global `AUTH_REQUIRED` setting.

### Configuration

| Setting | Default | Description |
|---------|---------|-------------|
| `MCP_REQUIRE_AUTH` | `false` | When `true`, all `/mcp` requests must include a valid Bearer token. When `false`, unauthenticated requests are allowed but can only access public tools, resources, and prompts — except for servers with `oauth_enabled=True`, which always require authentication. |

### Behavior Matrix

| `AUTH_REQUIRED` | `MCP_REQUIRE_AUTH` | REST API | MCP Endpoints |
|-----------------|-------------------|----------|---------------|
| `true` | `false` (default) | Auth required | Public-only access without token* |
| `true` | `true` | Auth required | Auth required |
| `false` | `false` | No auth | Public-only access without token* |
| `false` | `true` | No auth | Auth required |

*\*Per-server override: virtual servers with `oauth_enabled=True` always require authentication, even when `MCP_REQUIRE_AUTH=false`. Unauthenticated requests to these servers receive a 401 with a `WWW-Authenticate` header containing the RFC 9728 resource metadata URL.*

### Use Cases

**Default (`MCP_REQUIRE_AUTH=false`):**

- Suitable for public MCP services offering public tools
- Unauthenticated clients can discover and invoke public tools only
- Team-scoped and private tools require authentication
- Servers with `oauth_enabled=True` require authentication regardless (per-server override)

**Strict Mode (`MCP_REQUIRE_AUTH=true`):**

- Recommended for multi-tenant deployments
- All MCP clients must authenticate before any operation
- Prevents anonymous enumeration of available tools

### Security Considerations

- When `MCP_REQUIRE_AUTH=false`, unauthenticated requests receive an empty team list (`teams=[]`), restricting access to `visibility=public` items only
- **Per-server OAuth enforcement**: servers with `oauth_enabled=True` reject unauthenticated requests with 401 even in permissive mode, with a `WWW-Authenticate` header pointing to the RFC 9728 resource metadata URL for OAuth discovery
- **Fail-closed on infrastructure errors**: if the database is unavailable during per-server OAuth enforcement, the request is rejected with 503 rather than silently allowed
- Private and team-scoped tools, resources, and prompts are never exposed to unauthenticated users
- The service layer enforces access control regardless of this setting

### Configuration Dependencies

Full MCP access control (visibility + team scoping + membership validation) requires:

1. `MCP_CLIENT_AUTH_ENABLED=true` (default) - enables JWT authentication for MCP endpoints
2. Valid Bearer tokens with `teams` claim for team-scoped access
3. Team membership validation runs on each request (60s cache TTL)

When `MCP_CLIENT_AUTH_ENABLED=false`:

- Access control relies on `MCP_REQUIRE_AUTH` + tool/resource visibility only
- Team membership validation is skipped (no JWT to extract teams from)
- Use `TRUST_PROXY_AUTH=true` with a reverse proxy for user identification

---

## Update: API Basic Authentication Disabled by Default

- *Date:* 2026-01-28
- *Status:* Extended
- *Enhancement By:* Core Engineering Team

### Security Enhancement Overview

Basic authentication for API endpoints is now **disabled by default** to improve security posture. This change follows security best practices by preferring JWT tokens for programmatic API access.

### Configuration

| Setting | Default | Description |
|---------|---------|-------------|
| `API_ALLOW_BASIC_AUTH` | `false` | Enable Basic auth for API endpoints (`/api/metrics/*`). Disabled by default for security. |
| `DOCS_ALLOW_BASIC_AUTH` | `false` | Enable Basic auth for documentation endpoints (`/docs`, `/redoc`). Independent of API setting. |

### Behavior Changes

| Component | Before | After |
|-----------|--------|-------|
| **Admin UI** | Basic auth (broken - validated but not passed to routes) | Email/password authentication (`PLATFORM_ADMIN_EMAIL`/`PASSWORD`) |
| **API Endpoints** | Basic auth allowed | Basic auth **disabled by default**. Set `API_ALLOW_BASIC_AUTH=true` to enable. |
| **Documentation** | Basic auth configurable | Unchanged - controlled by `DOCS_ALLOW_BASIC_AUTH` |
| **CLI Tools** | Basic auth fallback | Only uses Basic auth if `API_ALLOW_BASIC_AUTH=true` |

### Migration Guide

**For API access:**
```bash
# Recommended: Use JWT tokens
export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token \
    --username admin@example.com --exp 10080 --secret $JWT_SECRET_KEY)

# If Basic auth is required (development only):
export API_ALLOW_BASIC_AUTH=true
```

**For Admin UI:**
```bash
# Use email/password authentication
PLATFORM_ADMIN_EMAIL=admin@example.com
PLATFORM_ADMIN_PASSWORD=your-secure-password
```

### Security Rationale

- **JWT tokens are more secure**: They have expiration, can be revoked, and don't transmit passwords on every request
- **Basic auth sends credentials on every request**: Higher risk of credential exposure
- **Separation of concerns**: Admin UI authentication is now clearly separate from API authentication
- **Defense in depth**: Disabled by default reduces attack surface

---

## File: docs/docs/architecture/adr/005-structured-json-logging.md

# ADR-0005: Structured JSON Logging

- *Status:* Implemented
- *Date:* 2025-01-09
- *Deciders:* Core Engineering Team

## Context

The gateway must emit logs that:

- Are machine-readable and parseable by tools like ELK, Loki, or Datadog
- Include rich context (e.g., request ID, auth user, duration)
- Can be viewed in plaintext locally and JSON in production

Our configuration supports:

- `LOG_FORMAT`: `json` or `text` (console format only)
- `LOG_LEVEL`: standard Python levels (`DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`)
- `LOG_TO_FILE`: enable file logging (default: `false` - stdout/stderr only)
- `LOG_FILE`: log filename when file logging is enabled (default: `null`)
- `LOG_FOLDER`: directory for log files when enabled (default: `null`)
- `LOG_FILEMODE`: file write mode (default: `a+` for append)
- `LOG_ROTATION_ENABLED`: enable automatic log rotation (default: `false`)
- `LOG_MAX_SIZE_MB`: maximum file size before rotation in MB (default: `1`)
- `LOG_BACKUP_COUNT`: number of backup files to keep (default: `5`)

Logs are initialized at startup via centralized `LoggingService`. By default, logs go only to stdout/stderr. File logging with dual-format output is optional via `LOG_TO_FILE=true`.

## Decision

Use the Python standard `logging` module with centralized `LoggingService`:

- **JSON formatter** for file logs using `python-json-logger` library
- **Text formatter** for console logs for human readability
- **Dual output**: JSON to files, text to console
- **Optional rotating file handler** for automatic log management (configurable)
- **Centralized service** integrated across all 22+ modules
- Global setup at app startup with lazy handler initialization

## Consequences

- 📋 **Structured JSON logs** suitable for production observability pipelines (ELK, Datadog, etc.)
- ⚙️ **Dual format support**: JSON files for machines, text console for humans
- 🔄 **Optional log rotation** prevents disk space issues when enabled
- 🧪 **Development-friendly** with human-readable console output
- 📁 **Organized storage** with configurable log directories and retention
- 🧱 **Minimal dependencies**: Uses standard library + `python-json-logger`
- 🎯 **Consistent logging** across all application modules

## Alternatives Considered

| Option | Why Not |
|--------|---------|
| **loguru** | Elegant syntax, but non-standard; poor compatibility with Python ecosystem. |
| **structlog** | Adds context pipeline complexity; not needed for current log volume. |
| **External sidecar (e.g. Fluent Bit)** | Useful downstream but doesn't solve app-side structure. |
| **Raw print() statements** | Unstructured, difficult to manage at scale. |

## Status

**✅ Implemented** - Structured logging is fully implemented in `LoggingService` with:

- Centralized logging service integrated across all modules
- Dual-format output (JSON to files, text to console)
- HTTP access log capture (uvicorn.access and uvicorn.error loggers)
- Optional log rotation with configurable size limits and retention
- Environment variable configuration support
- Production-ready with proper error handling and lazy initialization

**Files Modified**: 22 modules updated to use `LoggingService`
**Dependencies Added**: `python-json-logger>=2.0.0`
**Configuration**: Via `LOG_LEVEL`, `LOG_FORMAT`, `LOG_TO_FILE`, `LOG_FILE`, `LOG_FOLDER`, `LOG_FILEMODE`, `LOG_ROTATION_ENABLED`, `LOG_MAX_SIZE_MB`, `LOG_BACKUP_COUNT`

---

## File: docs/docs/architecture/adr/005-vscode-devcontainer-support.md

# ADR-005: VS Code Dev Container Support

## Status

Accepted

## Context

New contributors to ContextForge project face significant setup friction when trying to get a development environment running. The manual setup process requires:

- Installing Python 3.11
- Installing Docker/Podman
- Setting up virtual environments
- Installing development dependencies
- Configuring environment variables
- Running tests to verify setup

This setup complexity can discourage contributions and slow down the onboarding process for new developers. Many contributors use VS Code or GitHub Codespaces, which support Dev Containers for standardized development environments.

## Decision

We will add VS Code Dev Container support to the project by implementing:

1. **`.devcontainer/devcontainer.json`** - Configuration specifying:

   - Container build instructions
   - VS Code extensions (Python, Docker)
   - Post-creation commands
   - Environment variables for development mode

2. **`.devcontainer/Dockerfile`** - Container definition with:

   - Python 3.11 slim base image
   - Docker CLI for container management
   - System dependencies (curl, git, build-essential)
   - Python tooling (pip, setuptools, pdm, uv)
   - Development environment setup

3. **`.devcontainer/postCreateCommand.sh`** - Setup script that:

   - Copies `.env.example` to `.env` if needed
   - Runs `make install-dev` to install development dependencies
   - Runs `make test` to verify the environment

4. **Documentation updates** - README.md section explaining:

   - How to use the devcontainer in VS Code
   - How to use with GitHub Codespaces
   - Benefits and included tools

## Consequences

### Positive

- **Instant onboarding**: New contributors can start developing immediately with one click
- **Consistent environments**: All developers use the same Python version, tools, and dependencies
- **Reduced setup friction**: No need to manually install Python, Docker, or configure environments
- **GitHub Codespaces support**: Cloud-based development without local setup requirements
- **Automated verification**: Tests run automatically to ensure the environment is working
- **Standardized tooling**: Everyone gets the same VS Code extensions and configuration

### Negative

- **Additional maintenance**: Need to keep devcontainer configuration in sync with project requirements
- **Container build time**: Initial setup takes a few minutes for first-time users
- **Docker dependency**: Requires Docker/Podman to be installed and running
- **Limited to VS Code**: Only benefits developers using VS Code or Codespaces

### Neutral

- **File size increase**: Adds minimal files to the repository
- **Learning curve**: Developers unfamiliar with Dev Containers may need to learn the workflow

## Alternatives Considered

1. **Manual setup instructions only** (current state)

   - Pros: No additional complexity
   - Cons: High setup friction, inconsistent environments

2. **Gitpod integration**

   - Pros: Cloud-based development
   - Cons: Less VS Code-native, additional external dependency

3. **Docker Compose for development**

   - Pros: Tool-agnostic
   - Cons: More complex setup, less integrated with VS Code

4. **Vagrant-based development environment**

   - Pros: Full VM isolation
   - Cons: Resource-heavy, slower, less modern workflow

## Implementation Details

The devcontainer uses:

- **Python 3.11**: As specified in the project requirements
- **PDM and UV**: For package management (matching the project's tooling)
- **Make targets**: Leverages existing `make install-dev` and `make test` workflows
- **Environment variables**: Sets `DEV_MODE=true` for development
- **VS Code extensions**: Includes Python and Docker extensions for optimal development experience

## Verification

The implementation was tested by:

1. Building the devcontainer in VS Code
2. Verifying that development dependencies install correctly
3. Confirming that the test suite passes
4. Checking that all Make targets work properly inside the container

## References

- [VS Code Dev Containers documentation](https://code.visualstudio.com/docs/devcontainers/containers)
- [GitHub Codespaces documentation](https://docs.github.com/en/codespaces)
- [Dev Container specification](https://containers.dev/)
- Project issue/PR requesting devcontainer support

--- METRICS ---
- Files Extracted: 8
- Estimated Token Budget: ~42744 tokens
- Recency Window: Active (< 180 days)
- Canonical Reference: https://codewiki.google/github.com/IBM/mcp-context-forge
