---
title: "Locking down MCP at the gateway"
description: "Model Context Protocol (MCP) allows an agent to use tools across enterprise systems, but a shared MCP gateway requires a policy boundary beyond authentication. The article describes using Red Hat Connectivity Link (RHCL) AuthPolicy to validate OIDC or JWT credentials and then authorize per-tool access based on roles in the identity provider claims. NetworkPolicy controls which workloads can communicate with the gateway and MCP servers, while RateLimitPolicy limits request volume. Gateway isolation can be achieved with separate gateway instances or a shared gateway with isolated listeners, each with its own MCPGatewayExtension. These controls map to OWASP risks for LLM and agentic applications, including excessive agency, unbounded consumption, tool misuse, and identity abuse."
---

# Locking down MCP at the gateway

[Red Hat](https://yomu.fyi/company/red-hat) · David Martin, Jason Madigan · Oct 23, 2026

**Type:** Tutorial

## Summary

Model Context Protocol (MCP) allows an agent to use tools across enterprise systems, but a shared MCP gateway requires a policy boundary beyond authentication. The article describes using Red Hat Connectivity Link (RHCL) AuthPolicy to validate OIDC or JWT credentials and then authorize per-tool access based on roles in the identity provider claims. NetworkPolicy controls which workloads can communicate with the gateway and MCP servers, while RateLimitPolicy limits request volume. Gateway isolation can be achieved with separate gateway instances or a shared gateway with isolated listeners, each with its own MCPGatewayExtension. These controls map to OWASP risks for LLM and agentic applications, including excessive agency, unbounded consumption, tool misuse, and identity abuse.

## Context

Model Context Protocol (MCP) lets an agent use tools across an enterprise platform, such as a telco’s network inventory, service assurance, ticketing, and customer systems. A shared MCP gateway makes those tools available through one endpoint, but a caller authenticated to the gateway should not automatically be able to read every system or invoke every operation. The article discusses gateway isolation, network access, tool permissions, and request limits.

## Approach / What changed

Use Red Hat Connectivity Link (RHCL) AuthPolicy, NetworkPolicy, and RateLimitPolicy on an MCP gateway to enforce authentication, per-tool authorization, network isolation, and request rate limits for MCP tool calls.

## Takeaways

- Gateway isolation can be achieved with separate gateway instances or a shared gateway with isolated listeners, each with its own MCPGatewayExtension and registered MCP servers.
- The MCP router parses the JSON-RPC body and sets x-mcp-servername and x-mcp-toolname headers before AuthPolicy evaluates the request; the client cannot set those values.
- Per-tool authorization checks the requested tool against roles in the identity provider’s resource\_access claim, using the namespaced MCPServerRegistration as the key.

## FAQ

### How does the gateway know which tool is being called?

The MCP router parses the JSON-RPC body and sets the x-mcp-servername and x-mcp-toolname headers before AuthPolicy evaluates the request. The client cannot set those values to choose a more permissive policy path.

### How do I configure per-tool permissions in the identity provider?

In the identity provider, issue a claim like resource\_access with a key of the namespaced MCPServerRegistration (e.g., mcp-system/inventory) and a roles array containing the tool permission (e.g., tool:read). The authorization policy then checks if the requested tool name is in the roles for the requested server.

### What does NetworkPolicy protect that AuthPolicy does not?

NetworkPolicy controls which workloads can communicate at the network level, but it does not know the MCP user or tool name. It restricts traffic to the MCP router, broker internals, and metrics endpoint, and can be used to lock down traffic to specific MCP servers.

**Tags:** [API Gateway](https://yomu.fyi/topic/api-gateway), [Authorization](https://yomu.fyi/topic/authorization), [MCP](https://yomu.fyi/topic/mcp), [NetworkPolicy](https://yomu.fyi/topic/networkpolicy), [OpenShift](https://yomu.fyi/topic/openshift)

- Source: [Red Hat](https://developers.redhat.com/articles/2026/10/23/locking-down-mcp-at-the-gateway)
- Source URL: https://developers.redhat.com/articles/2026/10/23/locking-down-mcp-at-the-gateway
- Ingested by Yomu: 2026-10-23T15:00:17.100Z

[Read original post](https://developers.redhat.com/articles/2026/10/23/locking-down-mcp-at-the-gateway)
