Skip to content

[BUG] Gateway spec.mcp.servers[].healthCheck is accepted but never used #326

Closed

Description

@edenreich

Summary

Gateway.spec.mcp.servers[].healthCheck (enabled, path, interval) is accepted by the CRD and configured in the examples, but no controller reads it. assembleMCPServerEntries in internal/controller/gateway_controller.go renders each server into MCP_SERVERS as <name>=<url> from Name and URL only, so the health check reaches neither the gateway pod nor any probe. The gateway polls its MCP servers on its own schedule regardless.

The examples teach the dead field: examples/mcp-server/README.md (step 5) and examples/gateway-complete/gateway.yaml both set healthCheck with path: /health, a path the example MCP servers do not serve.

Found while verifying the examples for #325 on a k3d cluster: a Gateway with the README's healthCheck block connected the memory server and listed its 4 tools, and nothing ever requested /health on it.

Steps to Reproduce

  1. Apply a Gateway whose spec.mcp.servers[] entry sets healthCheck: {enabled: true, path: /health, interval: 30s}.
  2. Read the gateway pod's MCP_SERVERS value (or status.mcpServers) and the MCP server's access log.

Expected Behavior

Either the health check takes effect, or the field does not exist.

Actual Behavior

MCP_SERVERS is memory-server=http://mcp-memory-server-service.mcp.svc.cluster.local:8080/mcp, the health check settings appear nowhere, and the MCP server receives no /health request.

The gateway does health-check its MCP servers: it polls each one with tools/list and reconnects one that stops answering, configured gateway-wide by MCP_POLLING_ENABLED, MCP_POLLING_INTERVAL and MCP_POLLING_TIMEOUT. The operator sets none of them. A fix moves the health check to spec.mcp.healthCheck (enabled, interval, timeout), renders it into those variables, and drops the per-server field, which the gateway has no per-server check or path for. The examples set it at the spec.mcp level.

Activity

  1. added
    bug
    on Nov 8, 2026
  2. added theissue type on Nov 8, 2026
  3. moved this to Todo in 2026on Nov 8, 2026
  4. moved this from Todo to In progress in 2026on Nov 8, 2026
  5. moved this from In progress to QA in 2026on Nov 8, 2026
  6. inference-gateway-releaser commented on Nov 8, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.33.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

  7. moved this from QA to Done in 2026on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreleased

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions