이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 1. Troubleshooting and support for MCP gateway
You can troubleshoot common issues with solutions when working with the MCP gateway across installation, configuration, and operation.
1.1. MCP gateway pods not starting 링크 복사링크가 클립보드에 복사되었습니다!
After installation, if your MCP gateway pods are stuck in one of several states that indicate that they are not starting as expected, you can take several steps to diagnose the problem.
Common causes include the following states and indicate an associated action:
-
ImagePullBackOff: Check image repository access and credentials. -
CrashLoopBackOff: Check the logs for application errors. -
Pending: Check resource availability and node capacity. -
Init Container Failure: Check RBAC permissions.
Prerequisites
- You installed MCP gateway.
-
You installed the OpenShift CLI (
oc). -
You configured a
Gatewayobject. -
You configured an
HTTPRouteobject for the gateway.
Procedure
Check the pod status by running the following command:
$ oc get pods -n <mcp_system>Replace
<mcp_system>with the name of the MCP gateway deployment that you are checking.Describe problem pods by running the following command:
$ oc describe pod -n <mcp_system> <pod_name>-
Replace
<mcp_system>with the name of the MCP gateway deployment that you are checking. -
Replace
<pod_name>with the name of the pod that you are checking.
-
Replace
Check the pod logs by running the following command:
$ oc logs -n <mcp_system> <pod_name>-
Replace
<mcp_system>with the name of the MCP gateway deployment that you are checking. -
Replace
<pod_name>with the name of the pod that you are checking.
-
Replace
1.2. Gateway and routing troubleshooting 링크 복사링크가 클립보드에 복사되었습니다!
When traffic is not flowing after you installed MCP gateway, you can investigate each component of the gateway routing to check system health. Depending on the errors you are receiving, you can troubleshoot at several layers. Breaks can occur at the gateway, route, or policy levels.
If you have a Connection Refused/Timeout error and your client cannot reach the IP address, the cause might be the listener. In this case, one of the following situations likely applies:
- The port is not open.
- The load balancer has not assigned an IP address.
- The TLS handshake is failing.
When you have this type of error, check the listener first.
If you can connect to the Gateway object, but you get an HTTP error, such as 404, the cause can be a problem with the HTTPRoute custom resource (CR). The route exists, but the Gateway object has rejected it or the connection has failed. When you get these types of codes, check the HTTPRoute CR first.
If requests either fail with a 503 error or bypass the router, this means that the route is recognized, but the connection to the backend failed or was not authorized properly. In this case, start with API-level checks and narrow your investigation to Envoy filters as needed.
If the EnvoyFilter CR is not present, it usually means one of the following situations has occurred:
-
The
GatewayCR status is notProgrammed. -
There is a
labelsmismatch, and theEnvoyFilterCR is not injected into the pods. - The MCP controller component is crashing or stuck.
1.2.1. Troubleshooting the gateway listener 링크 복사링크가 클립보드에 복사되었습니다!
If your MCP gateway cannot reach an MCP endpoint at the configured hostname, the Listener custom resource (CR) you configured might not be working. You can troubleshoot this situation by using a few commands and some insight.
Use the following concepts with the commands that follow to solve a non-functioning Listener CR:
-
Ensure that your
Gatewayobject hasAcceptedandProgrammedconditions set toTrue. -
Verify that the
hostnameparameter value in theListenerCR matches your DNS or hosts configuration.
Prerequisites
- You installed MCP gateway.
-
You installed the OpenShift CLI (
oc). -
You configured a
Gatewayobject. -
You configured an
HTTPRouteobject for the gateway.
Procedure
Check the general
Gatewayobject configuration by running the following command:$ oc get gateway -AThis command returns general information about all
Gatewayobjects in the cluster. If theGatewayobject you are troubleshooting exists, the command returns the following information:-
The
gatewayClassNameis it using, whether or not it has an IP address or hostname assigned -
The
status, such asReady,Programmed, orPending
-
The
Check the full metadata and status history for a specific
Gatewayobject that is stuck inPendingby running the following command:$ oc describe gateway <gateway_name> -n <gateway_system>-
Replace
<gateway_name>with the name of theGatewayobject. -
Replace
<gateway_system>with the namespace where theGatewayobject is applied.
-
Replace
-
Check for port conflicts and verify that the
SSL/TLScertificates are correctly attached toListenerCRs. Verify the
ListenerCR configuration by running the following command:$ oc get gateway <gateway_name> -n <gateway_system> -o yaml | grep -A 10 listeners-
Replace
<gateway_name>with the name of theGatewayobject. -
Replace
<gateway_system>with the namespace where theGatewayobject is applied.
-
Replace
Check all of your
ListenerCR configurations at the same time by running the following command:$ oc get gateway <gateway_name> -n <gateway_system> -o jsonpath='{range .spec.listeners[*]}{.name}{"\t"}{.hostname}{"\t"}{.port}{"\n"}{end}'-
Replace
<gateway_name>with the name of theGatewayobject. -
Replace
<gateway_system>with the namespace where theGatewayobject is applied.
-
Replace
Check that the Istio gateway pod is running by using the following command:
$ oc get pods -n <gateway_system> -l gateway.istio.io/managed=istio.io-gateway-controller-
Replace
<gateway_system>with the name of yourGatewayobject deployment. - This command checks the status of Envoy-proxy pods and returns pod, traffic flow, and policy errors.
-
Replace
Verify that the port you are trying to use is not already in use by running the following command:
$ oc get gateway -A -o yaml | grep "port:"
1.2.2. Troubleshooting traffic not reaching the backend MCP server 링크 복사링크가 클립보드에 복사되었습니다!
When you are certain that an HTTPRoute custom resource (CR) exists for your application, but traffic is not reaching your backend MCP servers, you can take several steps to troubleshoot the problem.
On the client side, errors such as 401, 403, and 404 can indicate this situation.
Prerequisites
- You installed MCP gateway.
-
You installed the OpenShift CLI (
oc). -
You configured a
Gatewayobject. -
You configured an
HTTPRouteobject for the gateway. - You registered an MCP server.
Procedure
Check the
HTTPRoutegeneral custom resource (CR) status by running the following command:$ oc get httproute -A-
This command returns general information about all
HTTPRouteobjects in the cluster.
-
This command returns general information about all
-
Check for the
Acceptedcondition in theHTTPRouteCRstatusfields. Check the full metadata and status history for one specific
HTTPRouteobject by running the following command:$ oc describe httproute <route_name> -n <namespace>-
Replace
<route_name>with the name of theHTTPRouteobject. -
Replace
<namespace>with the namespace where theHTTPRouteobject is applied.
-
Replace
-
Verify that the
hostnamesvalue in theHTTPRouteCR matches the gatewayListenerCRhostname. -
If the
HTTPRoutestatus showsAccepted: False, then theGatewayobject is not using the route. -
If the condition is
ResolvedRefs: False:, the route is accepted through theGatewayobject, but it cannot find the backend MCP service. There might be either a mismatch in the CRmetadata.name:field, or the MCP service is in a namespace theGatewayobject cannot access. Verify the parent reference by running the following command:
$ oc get httproute <route_name> -n <namespace> -o yaml | grep -A 5 parentRefs-
Replace
<route_name>with the name of theHTTPRouteobject. -
Replace
<namespace>with the namespace where theHTTPRouteobject is applied.
-
Replace
-
Ensure that the retrieved
parentRefsvalue matches yourGatewayCR name and namespace exactly. Check that the
allowedRoutes.namespacesvalue in theGatewayCR allows theHTTPRoutenamespace by running the following command:$ oc get gateway <gateway_name> -n <gateway_namespace> -o jsonpath='{range .spec.listeners[*]}{.name}{": "}{.allowedRoutes.namespaces.from}{"\n"}{end}'-
Replace
<gateway_name>with the name of theGatewayobject. -
Replace
<gateway_namespace>with the namespace where theGatewayobject is applied.
-
Replace
1.2.3. Troubleshooting requests failing or bypassing the router 링크 복사링크가 클립보드에 복사되었습니다!
When you are certain that an MCPGatewayExtension custom resource (CR) exists for your MCP server, but requests either fail or bypass the router, it might mean that the EnvoyFilter CR is not applied properly. You can take several steps to troubleshoot the problem.
The EnvoyFilter CR is automatically created in the Gateway CR namespace by the MCP gateway controller component when an MCPGatewayExtension CR is Ready.
You can look closely at the EnvoyFilter CR during deep troubleshooting, but do not manually edit or delete the CR.
Prerequisites
- You installed MCP gateway.
-
You installed the OpenShift CLI (
oc). -
You configured a
Gatewayobject. -
You configured an
HTTPRouteobject for the gateway. - You registered an MCP server.
Procedure
Ensure that the
Gatewayobject exists and is in the expected namespace by checking the generalGatewayobject configuration by running the following command:$ oc get gateway -AThis command returns general information about all
Gatewayobjects in the cluster. If theGatewayobject you are troubleshooting exists, the command returns thegatewayClassNameis it using, whether or not it has an IP address or hostname assigned, and astatus, such asReady,Programmed, orPending.Verify that the
MCPGatewayExtensionCR isReadyby running the following command:$ oc get mcpgatewayextension -AVerify that a
ReferenceGrantCR exists if theMCPGatewayExtensionCR is in a different namespace than theGatewayobject by running the following command:$ oc get referencegrant <referencegrant_name> -n <gateway_system> -o yaml-
Replace
<referencegrant_name>with the names of theReferenceGrantCR. -
Replace
<gateway_system>with the namespace where theGatewayobject is applied.
-
Replace
Check the
HTTPRouteCR by running the following command:$ oc describe httproute <httproute_name> -n <httproute_namespace>-
Replace
<httproute_namespace>with the namespace where theHTTPRouteCR is applied. -
Replace
<httproute_name>with the names of theHTTPRouteCR. -
If the
HTTPRouteCR is notAcceptedby theGatewayobject, the route is not programmed into Envoy, causing a404. -
The conditions
Status.Parents.Conditions: Accepted: TrueandProgrammed: Trueshow that the route is correct.
-
Replace
If any of the CRs you just checked are not
Ready, check the controller logs forEnvoyFiltercreation errors by running the following command:$ oc logs -n <mcp_system> deployment/mcp-gateway-controller-
Replace
<mcp_system>with the name of your MCP gateway deployment. - This step verifies that the MCP controller is successfully generating the underlying Istio configurations.
-
Replace
Check that the
EnvoyFilterexists in theGatewaynamespace by running the following command:$ oc get envoyfilter -n <gateway_namespace> -l app.kubernetes.io/managed-by=mcp-gateway-controller-
Replace
<gateway_namespace>with the namespace where theGatewayobject is applied.
-
Replace
Verify the
EnvoyFilterconfiguration by running the following command:$ oc describe envoyfilter -n <gateway_namespace> -l app.kubernetes.io/managed-by=mcp-gateway-controller-
Replace
<gateway_namespace>with the namespace where theGatewayobject is applied. -
The
workloadSelectorlabels must match yourGatewaypods, or your policies are bypassed.
-
Replace
Compare the
EnvoyFilterlabels against your pod labels by running the following command:$ oc get pods -n <gateway_namespace> --show-labels-
Replace
<gateway_namespace>with the namespace where theGatewayobject is applied.
-
Replace
Identify the port that the
Gatewayobject is configured to use by running the following command:$ oc get gateway <gateway_name> -n <gateway_namespace> -o jsonpath='{range .spec.listeners[*]}{.name}{": "}{.port}{"\n"}{end}'-
Replace
<gateway_name>with the name of theGatewayobject. -
Replace
<gateway_namespace>with the namespace where theGatewayobject is applied.
-
Replace
Use the following commands to verify the
EnvoyFilterchain binding:Create a secure tunnel between a port on your computer and a port on the pod by running the following command:
$ oc port-forward deploy/<gateway_deployment_name> -n <gateway_system> 15000:15000-
Replace
<gateway_deployment_name>with the name of the Deployment related to the Gateway object. Typically this value is either<<gateway_name>-istioor<gateway_name>-openshift-default, depending on the ingress you used. Replace
<gateway_system>with the namespace where the Gateway object is applied.From a different terminal window, access localhost:15000 by running the following command:
$ curl -s localhost:15000/listeners
-
If this command returns empty, the
EnvoyFilterCR is not active on this pod. Traffic is bypassing your policies.
-
Replace
Restart the Istio gateway to force a configuration reload by running the following command:
$ oc rollout restart deployment/<gateway_name>-istio -n <gateway_namespace>-
Replace
<gateway_namespace>with the namespace where theGatewayobject is applied. -
Replace
<gateway_name>with the names of theGatewayobject.
-
Replace
1.3. Troubleshooting an MCPGatewayExtension status of not ready 링크 복사링크가 클립보드에 복사되었습니다!
You can troubleshoot when your MCPGatewayExtension custom resource (CR) shows a Ready: False state by running a few commands.
Common causes include the following errors and indicate an associated action:
-
InvalidMCPGatewayExtension: This often means that thetargetRefpoints to a Gateway object that does not exist, or you have a typing error in thekindorgroup. -
ReferenceGrantRequired: This occurs if your extension is in one namespace but is trying to target aGatewayobject in another. To fix this, you must apply aReferenceGrantin theGatewayobject namespace. -
Conflict: Only oneMCPGatewayExtensioncan target a specificGatewayobject. If another extension is already pointing to theGatewayobject you configured with a new extension, the new one fails.
Prerequisites
- You installed MCP gateway.
- You installed Connectivity Link.
-
You configured a
Gatewayobject. -
You configured an
HTTPRouteobject for the gateway. -
You installed the OpenShift CLI (
oc). - You registered an MCP server.
Procedure
Check the status of the specific
MCPGatewayExtensionCR by running the following command:$ oc get mcpgatewayextension -n <namespace>Replace
<namespace>with the namespace where yourMCPGatewayExtensionCR is applied.Check for conflicting
MCPGatewayExtensionCRs by running the following command:$ oc get mcpgatewayextension -AThere must be only one extension per namespace.
Verify that the target Gateway object exists by running the following command:
$ oc get gateway -n <gateway_namespace>Replace
<gateway_namespace>with the namespace where yourGatewayobject is applied.Check the
MCPServerRegistrationCR namespace and route status by running the following command:$ oc describe mcpsr <mcpsr_name> -n <mcpsr_namespace>-
Replace
<mcpsr_name>with the name of yourMCPServerRegistrationCR. -
Replace
<mcpsr_namespace>with the namespace where yourMCPServerRegistrationCR is applied.
-
Replace
-
Ensure that the
MCPGatewayExtensionCR targets theGatewayobject that theHTTPRouteCR is attached to.
1.4. Troubleshooting on-premise MCP server registration issues 링크 복사링크가 클립보드에 복사되었습니다!
When your on-premise MCP server is not discovered by your MCP gateway after you registered the server, or if you are having trouble with your tools, you can troubleshoot by checking for common problems. Basic steps include making sure that your backend server is available, that routing is applied correctly, and that tool prefix headers are labeled correctly.
Prerequisites
- You installed MCP gateway.
- You installed Connectivity Link.
-
You configured a
Gatewayobject. -
You configured an
HTTPRouteobject for the gateway. -
You installed the OpenShift CLI (
oc). - You registered an MCP server.
Procedure
If tools from your on-premise MCP server do not display in
tools/list, check that the MCP server is properly discovered by MCP gateway components by running the following command:List the
MCPServerRegistrationCRs by running the following command:$ oc get mcpsr -AGet the detailed status and configuration of your
MCPServerRegistrationCR by running the following command:$ oc describe mcpserverregistration <mcpsr_name> -n <mcpsr_namespace>-
Replace
<mcpsr_name>with thenameof your MCP server. -
Replace
<mcpsr_namespace>with the namespace where yourMCPServerRegistrationCR is applied.
-
Replace
Verify that the
MCPServerRegistrationCRtargetRefpoints to correctHTTPRoutename and namespace by running the following commands:Get the
nameandnamespaceof theHTTPRouteCR that theMCPServerRegistrationCR is attempting to attach to by running the following command:$ oc get mcpserverregistration <mcpsr_name> -n <mcpsr_namespace> -o jsonpath='{.spec.targetRef.name}{"\n"}{.spec.targetRef.namespace}{"\n"}'-
Replace
<mcpsr_name>with thenameof your MCP server. -
Replace
<mcpsr_namespace>with the namespace where yourMCPServerRegistrationCR is applied.
-
Replace
-
If the
MCPServerRegistrationCR targets theHTTPRouteCR that is applied in the same namespace,the.spec.targetRef.namespaceis not needed. No output is expected. Cross-reference the
HTTPRoutedetails from of the previous command with yourHTTPRouteCRs by verifying that a route actually exists with those exact details by running the following command:$ oc get httproute <httproute_name> -n <httproute_namespace>-
Replace
<httproute_name>with the value from the output of the earlier step. -
Replace
<httproute_namespace>with the value from the output of the earlier step.
-
Replace
-
If you get a
NotFoundserverErrorfrom the earlier step, correct yourMCPServerRegistrationCR.
Verify that the MCP gateway controller component successfully bound the extension and route together by checking the status with the following command:
$ oc get mcpserverregistration <mcpsr_name> -n <mcpsr_namespace> -o jsonpath='{.status.conditions[?(@.type=="Accepted")]}'-
Replace
<mcpsr_name>with the name of your MCP server. Replace
<mcpsr_namespace>with the namespace where yourMCPServerRegistrationCR is applied.-
If you get a
status: Falseoutput, the MCP gateway controller component found the route but could not use it. Check that you created aReferenceGrantCR if theMCPGatewayExtensionandHTTPRouteCRs are in different namespaces.
-
If you get a
-
Replace
Check that the backend MCP server is running by entering the following command:
$ oc get pods -n <mcpsr_namespace>Replace
<mcpsr_namespace>with the namespace where yourMCPServerRegistrationCR is applied.If your MCP server pods are crashing, check for the following conditions:
-
CrashLoopBackOff: This generally means that your MCP server is starting but then crashing. This problem can be caused by a missing environment variable or by permission issues. -
Pending: This might mean that the pod has not started because of a resource issue in the cluster. -
ErrImagePull: Either the cluster cannot reach the registry, or you do not have permission to pull the image. Check your OpenShift Container Platform settings and network configuration. -
If your pod has a
Runningstatus with a high restart count, your MCP server might be unstable because of memory constraints or connectivity issues. Check your OpenShift Container Platform settings and network configuration.
-
Verify that the targeted application of your
MCPServerRegistrationCR actually exists and has a valid entry point by running the following command:$ oc get svc -n <namespace> <service_name>-
Replace
<namespace>with the namespace where your application runs. -
Replace
<service_name>with the name of your application.
-
Replace
-
Check that your application has a standard
ClusterIPassigned to handle load balancing across pods. -
Compare the ports to your
MCPServerRegistrationCR to make sure that they match and that either theTCPorSCTPprotocol is used. Check that the selectors on the
ServiceCR for your application match the labels on your pods by running the following command:$ oc get endpoints <service_name> -n <namespace>-
Replace
<service_name>with the name of your application. -
Replace
<namespace>with the namespace where your application runs.
-
Replace
Check that the attached
HTTPRouteCR has valid backend reference by running the following command:$ oc describe httproute <route_name>If your
MCPServerRegistrationCR is active, but tools are missing, test the backend server directly by running the following commands:Start a debug session based on your existing MCP server deployment by running the following command:
$ oc debug deployment/<mcpsr_name> -itReplace
<mcpsr_name>with the name of your MCP server.Test whether your backend MCP server is functional by running the following command:
sh-4.4# curl -X POST https://localhost:<port>/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'If the command returns a list of tools, your backend is healthy.
If your backend is healthy but tools are missing in the
GatewayCR, yourMCPServerRegistrationCR is not correctly mapping the service. Check the logs to see why the backend rejected the request by running the following command:$ oc logs -l app=<mcp_server_label>Replace
<mcp_server_label>with the application defined in themetadata.labels.app:section of your MCP serverPodorDeploymentCR.If you created an
MCPServerRegistrationCR, but your tools are not displaying, check the MCP broker component router logs for errors by running the following command:$ oc logs -n <mcp_system> -l app.kubernetes.io/name=<mcp_gateway>-
Replace
<mcp_system>with the namespace of your MCP gateway deployment. Replace
<mcp_gateway>with the name of your MCP gateway deployment.-
If you see errors, check for typos in the
targetRefparameter value and ensure that you are pointing to an existingServiceCR.
-
If you see errors, check for typos in the
-
Replace
-
Verify that the backend MCP server is implementing the
tools/listmethod correctly. Using the MCP Inspector is the easiest way to check. - Check your backend MCP server logs for errors.
- Ensure that your backend MCP server is returning valid MCP protocol responses. Using the MCP Conformance Test Framework is the easiest way to catch protocol errors.
-
Verify that the
toolPrefixentry in theMCPServerRegistrationCR is valid, meaning that there are no spaces or special characters. If tools appear without the configured prefix, check the
MCPServerRegistrationCR by running the following command:$ oc get mcpsr <mcpsr_name> -n <mcpsr_namespace> -o yaml | grep toolPrefix-
Replace
<mcpsr_name>with the name of your MCP server. Replace
<mcpsr_namespace>with the namespace where yourMCPServerRegistrationCR is applied.-
Ensure that a
toolPrefixis set correctly inMCPServerRegistrationCR.
-
Ensure that a
-
Replace
Check the MCP gateway controller component logs for problems with your
MCPServerRegistrationCR by running the following command:$ oc logs -n <mcp_system> deployment/mcp-gateway-controller | grep prefixReplace
<mcp_system>with the namespace of your MCP gateway deployment.-
If you see
failed to generate prefix, then there is an error in yourMCPServerRegistrationCRmetadataor there is a conflict. -
If there is no output at all, then either the controller is not detecting your
MCPServerRegistrationCR, or the request is failing before it gets to the routing stage.
-
If you see
Ensure that you restart the MCP gateway broker component after
MCPServerRegistrationCR changes by running the following command:$ oc rollout restart deployment/<mcp_gateway> -n <mcp_system>-
* Replace
<mcp_gateway>with the name of your MCP gateway deployment. -
Replace
<mcp_system>with the namespace of your MCP gateway deployment.
-
* Replace
1.5. Troubleshooting external MCP server connectivity issues 링크 복사링크가 클립보드에 복사되었습니다!
If your external MCP server cannot connect, or if tools are not displaying, you can troubleshoot by checking custom resources (CRs) and network settings.
Prerequisites
- You installed MCP gateway.
- You installed Connectivity Link.
-
You installed the OpenShift CLI (
oc). -
You configured a
Gatewayobject. -
You configured an
HTTPRouteobject for the gateway. - You registered an external MCP server.
-
You created a
SecretCR for authentication.
Procedure
If you are seeing errors such as
502 Bad Gatewayand403 Forbidden, check theServiceEntryCR by running the following command:$ oc get serviceentry -n <namespace>Replace with the
<namespace>where theServiceEntryCR is applied.-
If the command returns an empty list, create a
ServiceEntryCR to allow egress.
-
If the command returns an empty list, create a
For detailed troubleshooting, such as to checks ports and the TLS setting, examine the
ServiceEntryCR activity by running the following command:$ oc describe serviceentry <se_name> -n <namespace>-
Replace with the
<se_name>with the name theServiceEntryCR. -
Replace with the
<namespace>where theServiceEntryCR is applied.
-
Replace with the
-
Verify that
ServiceEntryCRhostsvalues are exact matches externalhostnamevalues. If you are seeing
TLSerrors, verify that aDestinationRuleCR exists by running the following command:$ oc get destinationrule -n <namespace>Replace with the
<namespace>where theDestinationRuleCR is applied.-
If the previous command returns
No resources found in <namespace> namespace, create aDestinationRuleCR. -
Ensure that
DestinationRuleCRhostvalues exactly matchServiceEntryCR host values. -
Check the
TLSconfiguration inDestinationRuleCR.
-
If the previous command returns
For detailed troubleshooting of actual connection details, such as encryption, load balancing, and connection pooling, examine the
DestinationRuleCR by running the following command:$ oc describe destinationrule <dr_name> -n <namespace>-
Replace with the
<dr_name>with the name theDestinationRuleCR. Replace with the
<namespace>where theDestinationRuleCR is applied.- Ensure that your network egress policies allow external traffic from the pod.
-
Replace with the
Test the DNS resolution by running the following command:
$ oc run -it --rm debug --image=<image_path/name> --restart=Never -- \ nslookup <external_hostname>-
Replace
<image_path/name>with the path to your application image. -
Replace
<external_hostname>with your external MCP serverhostnameparameter value.
-
Replace
Test the external connectivity by running the following command:
$ oc run -it --rm debug --image=<image_path/name> --restart=Never -- \ curl -v https://<external_hostname_url>-
Replace
<image_path/name>with the path to your application image. -
Replace
<external_hostname_url>with your external MCP server URL.
-
Replace
-
Verify that the
HTTPRouteCRbackendRefvalue is configured with the correct external hostname. -
Ensure that the
HTTPRouteCR has theURLRewritefilter applied to rewrite to the external hostname.
1.6. Troubleshooting external MCP server authentication issues 링크 복사링크가 클립보드에 복사되었습니다!
If your registered external MCP server fails authentication and returns 401 or 403 errors, troubleshoot by checking the credentials and the logs.
Prerequisites
- You installed MCP gateway.
- You installed Connectivity Link.
-
You installed the OpenShift CLI (
oc). -
You configured a
Gatewayobject. -
You configured an
HTTPRouteobject for the gateway. - You registered an external MCP server.
-
You created a
SecretCR for authentication.
Procedure
Check that a Secret custom resource (CR) exists and that it has the correct
labelby running the following command:$ oc get secret <secret_name> -n <namespace> --show-labels-
Replace
<secret_name>with the name of yourSecretCR. -
Replace
<namespace>with the namespace where yourSecretCR is applied.
-
Replace
Verify the
SecretCR contents by running the following command:$ oc get secret <secret_name> -n <namespace> -o yaml-
Replace
<secret_name>with the name of yourSecretCR. -
Replace
<namespace>with the namespace where yourSecretCR is applied.
-
Replace
Check the
MCPServerRegistrationCRcredentialRefparameter value by running the following command:$ oc get mcpsr <mcpsr_name> -n <namespace> -o yaml | grep -A 3 credentialRef-
Replace
<mcpsr_name>with the name of yourMCPServerRegistrationCR. -
Replace
<namespace>with the namespace where yourMCPServerRegistrationCR is applied.
-
Replace
-
Ensure that the
SecretCR has the labelmcp.kuadrant.io/secret: "true". -
Verify that the
SecretCR data key matches thecredentialRef.keyin theMCPServerRegistrationCR. - Check the credential format.
- Verify that the credential you are using has the necessary permissions for the external service.
Check the MCP gateway broker component logs for credential errors by running the following command:
$ oc logs -n <mcp_system> deployment/mcp-gateway | grep -i authReplace
<mcp_system>with the name of your MCP gateway deployment.
1.7. Troubleshooting MCP gateway authentication issues 링크 복사링크가 클립보드에 복사되었습니다!
Authentication errors can happen in a variety of ways, including silent failures, broken sessions, and tool-access denials, depending on your backend MCP server setup. You can troubleshoot common problems by checking your connections and custom resource (CR) configurations.
Prerequisites
- You installed MCP gateway.
- You installed Connectivity Link.
-
You installed the OpenShift CLI (
oc). -
You configured a
Gatewayobject. -
You configured an
HTTPRouteobject for the gateway. - You registered an MCP server.
-
You created a
SecretCR for authentication.
Procedure
When your clients cannot discover OAuth configuration, discovery is not working. Use the following steps to troubleshoot this situation:
Retrieve the JSON object that lists the security requirements for your backend MCP server by running the following command:
$ curl https://<mcp_hostname>/.well-known/oauth-protected-resourceReplace
<mcp_hostname>with the name of the host for your MCP server.Example output
{ "resource_name": "MCP Server", "resource": "https://mcp.example.com/mcp", "authorization_servers": [ "https://auth.provider.com/realms/mcp" ], "bearer_methods_supported": ["header"], "scopes_supported": [ "basic", "groups", "roles", "profile" ] }
Check that your associated
HTTPRouteCR includes a path for/.well-known/oauth-protected-resourceby running the following command:$ oc get httproute <route_name> -n <mcp_system> -o json | jq -r '.spec.rules[].matches[].path.value | select(. == "/.well-known/oauth-protected-resource")'-
Replace
<route_name>with the associatedHTTPRouteCR. -
Replace
<mcp_system>with the name of your MCP gateway deployment.
-
Replace
-
If there is no output, your
HTTPRouteCR does not have a path for/.well-known/oauth-protected-resource. You must add one. Check the specific
AuthPolicyCR configuration by running the following command:$ oc describe authpolicy <authn_name> -n <namespace>-
Replace
<authn_name>with the name of yourAuthPolicyCR. -
Replace
<namespace>with the namespace where yourAuthPolicyCR is applied.
-
Replace
Check that you excluded all
/.well-known/paths from yourAuthPolicyCR by trying to reach the endpoint without any credentials by using the following command:$ curl -o /dev/null -s -w "%{https_code}\n" https://<mcp_hostname>/.well-known/oauth-protected-resourceReplace
<mcp_hostname>with the name of the host for your MCP server.NoteThe following codes are examples of possible outputs:
-
200: Means that the exclusion exists and matches. -
401: Means that yourAuthPolicyCR is still demanding a token for this path. The exclusion is either not present or not working. -
404: The exclusion might be present and working, but theHTTPRouteCR does not point to that path or to a valid backend.
-
Optional. Check all MCP broker component environment variables by running the following command:
$ oc get deployment <mcp_gateway> -n <mcp_system> -o yaml | grep -A 10 env-
Replace
<mcp_gateway>with the name of your MCP gateway deployment. -
Replace
<mcp_system>with the namespace where your MCP gateway deployment is applied.
-
Replace
- Verify that the MCP broker component pod restarted after any environment variable changes.
If your valid tokens are being rejected with
401errors, your JWT token validation is failing. Use the following steps to troubleshoot this situation:List the
AuthPolicyCRs by running the following command:$ oc get authpolicy -ACheck the specific
AuthPolicyCR configuration by running the following command:$ oc describe authpolicy <authn_name> -n <namespace>-
Replace
<authn_name>with the name of yourAuthPolicyCR. -
Replace
<namespace>with the namespace where yourAuthPolicyCR is applied.
-
Replace
-
Verify that the
issuerUrlin theAuthPolicyCR matches your identity provider’srealm. Check the Authorino Operator logs by running the following command:
$ oc logs -n <kuadrant_system> -l authorino-resource=authorinoReplace
<kuadrant_system>with the namespace where Connectivity Link is installed.Decode JWT to verify claims by running the following command:
$ echo "<example_token>" | cut -d. -f2 | base64 -d | jqReplace
<example_token>with your token.Ensure that your issuer URL is reachable from the cluster by running the following command:
$ oc exec -n <kuadrant_system> deployment/authorino -- curl -s https://auth.provider.com/realms/mcp/.well-known/openid-configuration-
Replace
<kuadrant_system>with the name of your Connectivity Link deployment.
-
Replace
-
Check the token expiration time by examining the
expclaim. -
Verify the audience, if required, by using an
audclaim. -
Ensure that the token includes all required claims such as
groups,email, and so on.
If your
401 Unauthorizedresponses do not include OAuth discovery information, theWWW-Authenticateheader is missing. This usually means that yourAuthPolicyCR is not properly configured. Use the following steps to troubleshoot this situation:Isolate the failure point by using verbose output which lists the TLS handshake, the HTTP headers, and the server response code by running the following command:
$ curl -v https://<mcp_hostname>/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'Replace
<mcp_hostname>with the hostname for your backend MCP server.-
Verify that your
AuthPolicyCRspec.response.unauthenticated.headers:list includesresponse.unauthenticated.headers.WWW-Authenticate. -
Check that your
AuthPolicyCRresponse.unauthenticated.headers.WWW-Authenticate.valueincludes the correctmetadata. -
Ensure that your
AuthPolicyCR is applied to the correctGatewayobject and listener.
1.8. Troubleshooting MCP gateway authorization issues 링크 복사링크가 클립보드에 복사되었습니다!
Authorization errors can happen in a variety of ways, including an authenticated user getting 403 errors for all tool calls, authorization checks not enforced, or authorization failing with CEL evaluation errors. You can troubleshoot these problems by checking your configurations and troubleshooting CEL.
Prerequisites
- You installed MCP gateway.
- You installed Connectivity Link.
-
You installed the OpenShift CLI (
oc). -
You configured a
Gatewayobject. -
You configured an
HTTPRouteobject for the gateway. - You registered an MCP server.
Procedure
Check your
AuthPolicycustom resource (CR) authorization rules by running the following command:$ oc get authpolicy <policy_name> -n <namespace> -o yaml | grep -A 20 authorization-
Replace
<policy_name>with the name of yourAuthPolicyCR. -
Replace
<namespace> `with the namespace where your `AuthPolicyCR is applied.
-
Replace
Check the Authorino Operator logs for CEL evaluation by running the following command:
$ oc logs -n <kuadrant_system> -l authorino-resource=authorino | grep -i authzReplace
<kuadrant_system>with the namespace where Connectivity Link is installed.- Ensure that the Authorino Operator can communicate with your identity server.
-
Verify that your JWT token includes
resource_access[server-name].rolesclaims. When your authorization checks are not enforced, first check your
AuthPolicyCR status by running the following command:$ oc describe authpolicy <policy_name> -n <namespace>-
Replace
<policy_name>with the name of yourAuthPolicyCR. -
Replace
<namespace> `with the namespace where your `AuthPolicyCR is applied.
-
Replace
Next, verify your
AuthPolicyCR targets the correct resource by running the following command:$ oc get authpolicy <policy_name> -n <namespace> -o yaml | grep -A 5 targetRef-
Replace
<policy_name>with the name of yourAuthPolicyCR. -
Replace
<namespace> `with the namespace where your `AuthPolicyCR is applied.
-
Replace
Ensure that your
AuthPolicyCRtargetRefmatches yourGatewayobject name and namespace by running the following command:$ echo "--- AuthPolicy Targets ---" && \ oc get authpolicy -n <mcp_system> -o jsonpath='{range .items[*]}{.metadata.name}{"\t targets -> \t"}{.spec.targetRef.kind}{"/"}{.spec.targetRef.name}{"\n"}{end}' && \ echo "--- Actual Gateways ---" && \ oc get gateway -n <mcp_system> -o custom-columns=NAME:.metadata.nameReplace
<mcp_system>with the name of your MCP gateway deployment.-
If your
AuthPolicyCR and yourGatewayobject are in different namespaces, you must either move theAuthPolicyCR into the same namespace as the Gateway object, or target theHTTPRouteCR instead. Check that your
AuthPolicyCRsectionNamematches yourGatewayobject listener name.$ oc describe authpolicy <auth_policy_name> -n <mcp_system>Replace
<auth_policy_name>with the name of yourAuthPolicyCR. Replace<mcp_system>with the name of your MCP gateway deployment.-
Examine the
Statusblock for an entry about your listener. If thesectionNameis wrong, the policy shows"Accepted", but the policy does not affect the intended traffic path. Check that Kuadrant Operator is working by running the following command:
$ oc get pods -n <kuadrant_system>Replace
<kuadrant_system>with the namespace where your Connectivity Link is installed.Example output
NAME READY STATUS RESTARTS AGE authorino-78c5679f94-abc12 1/1 Running 0 5d dns-operator-controller-manager-5d4789f6-x1y2z 1/1 Running 0 5d kuadrant-operator-controller-manager-8495bc4d-98765 1/1 Running 0 5d limitador-67f89bc5d4-z9w8v 1/1 Running 0 5d-
If the
authorino-*pod showsCrashLoopBackOff, it either cannot reach your OIDC issuer or has an invalid configuration. -
If the
kuadrant-operator-controller-manager-*pod is down, any changes you make to yourAuthPolicyCR cannot be applied to the Gateway object because the controller pod does not reconcile yourAuthPolicyCR.
-
If the
- Remedy pod issues as required.
Check the Authorino Operator logs for
CELerrors by running the following command:$ oc logs -n <kuadrant_system> -l authorino-resource=authorino | grep -i celReplace
<kuadrant_system>with the namespace where your Connectivity Link is installed.-
Verify the CEL syntax in your authorization
rules. -
Check that referenced fields exist, such as
auth.identity.groups. - Verify that the JSON or data object coming back from the source matches the exact fields you referenced in your Authorino configuration.
-
Test
CELexpression syntax using online validators. -
Add persistent logging to understand the
CELevaluation context.