Skip to content

Remove static mcp-route HTTPRoute to avoid duplication with controller-managed mcp-gateway-route #753

@trepel

Description

@trepel

Problem

The static HTTPRoute mcp-route in config/mcp-gateway/base/httproute.yaml coexists with the mcp-gateway-route HTTPRoute that is automatically created by the MCPGatewayExtension controller. Having two HTTPRoutes pointing to the same Gateway is confusing, especially for new users.

Context

The static mcp-route includes two things the auto-generated mcp-gateway-route does not:

  1. CORS headers via ResponseHeaderModifier filter (Access-Control-Allow-Origin: *, etc.)
  2. OAuth well-known endpoint rule (/.well-known/oauth-protected-resource)

The controller-managed mcp-gateway-route (created in internal/controller/broker_router.go) is a plain route with no filters and only a /mcp path match.

Users who need CORS headers are already directed to set spec.httpRouteManagement: Disabled on MCPGatewayExtension and create a custom HTTPRoute (documented in docs/guides/configure-mcp-gateway-listener-and-router.md). The static mcp-route essentially serves as that custom route example but is deployed by default, which causes duplication.

Questions to resolve

  • Can mcp-route be removed from config/mcp-gateway/base/ entirely, relying on the controller-managed route plus documented custom route instructions?
  • Should the controller-managed mcp-gateway-route gain support for CORS filters and/or the /.well-known/oauth-protected-resource path? That would remove the need for the static route in more scenarios.
  • Is the /.well-known/oauth-protected-resource route needed by any current flow, or is it only relevant for specific auth setups?
  • Is the CORS workaround in authentication.md (Keycloak EnvoyFilter) related to this static route, or independent?

Relevant files

  • config/mcp-gateway/base/httproute.yaml — the static mcp-route
  • internal/controller/broker_router.go — creates mcp-gateway-route
  • docs/guides/configure-mcp-gateway-listener-and-router.md — custom HTTPRoute with CORS docs
  • docs/guides/authentication.md — Keycloak CORS workaround

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage/needs-triageIssues that need review and decisions about their milestones and priority

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions