Skip to content

Latest commit

 

History

History

gateway-integration

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Gateway Integration Example

This example demonstrates exposing an MCP server through a gateway using the built-in httproute provider, which creates a Gateway API HTTPRoute.

Prerequisites

  • Kubernetes cluster
  • Gateway API CRDs installed before the operator starts (the operator checks for HTTPRoute at startup and skips the controller if the CRD is absent)
  • MCP Lifecycle Operator installed (install or restart after the Gateway API CRDs are in place)
  • A Gateway resource deployed and managed by a gateway controller (e.g., Envoy Gateway, Istio, Cilium)

Deploy

  1. Create the gateway configuration ConfigMap:
kubectl apply -f gateway-config.yaml
  1. Deploy the MCPServer with gateway integration:
kubectl apply -f mcpserver-with-gateway.yaml

Verify

# Check the MCPGatewayBinding is registered
kubectl get mcpgatewaybindings -n default

# Check the HTTPRoute was created
kubectl get httproutes -n default

# Verify the MCPServer address reflects the gateway URL
kubectl get mcpserver kubernetes-mcp-server -n default -o jsonpath='{.status.address.url}'

Configuration

Edit gateway-config.yaml to match your environment:

Key Description
gateway-name Name of your Gateway resource
gateway-namespace Namespace where the Gateway lives
route-hostname Hostname to set on the HTTPRoute (optional)
public-hostname Public hostname for the status URL (optional)

Cleanup

kubectl delete -f mcpserver-with-gateway.yaml
kubectl delete -f gateway-config.yaml