---
title: "Securing AI agent tool calls at the gateway with NeMo Guardrails"
description: "Authentication, authorization and rate limiting on an MCP gateway never inspect tool-call bodies, so injected instructions or leaked PII pass through untouched."
url: "https://swe.quest/articles/securing-ai-agent-tool-calls-at-the-gateway-with-nemo-guardrails-0e08914fb0da90e6"
canonical: "https://developers.redhat.com/articles/2026/12/02/securing-ai-agent-tool-calls-at-the-gateway-with-nemo-guardrails"
source: "Red Hat Developer"
published: "2026-12-02"
difficulty: "medium"
kind: "How-to"
reading_minutes: 5
tags: ["ai-agents","ai-safety","kubernetes","appsec"]
---

# Securing AI agent tool calls at the gateway with NeMo Guardrails

A post on [Red Hat Developer](https://swe.quest/sources/red-hat-developers.md), published 2026-12-02, 5 min read, How-to. Original: [https://developers.redhat.com/articles/2026/12/02/securing-ai-agent-tool-calls-at-the-gateway-with-nemo-guardrails](https://developers.redhat.com/articles/2026/12/02/securing-ai-agent-tool-calls-at-the-gateway-with-nemo-guardrails)

## Summary

Authentication, authorization and rate limiting on an MCP gateway never inspect tool-call bodies, so injected instructions or leaked PII pass through untouched. The MCP gateway in Red Hat Connectivity Link sends tool names and JSON arguments to NeMo Guardrails before they reach the backend, and holds responses for inspection so they can be allowed, blocked or masked. Guardrail configurations are set globally through a labeled Secret referenced by an MCPGatewayExtension annotation, and stricter per-server checks are added via MCPServerRegistration annotations. Global checks run before per-server ones, and failMode defaults to deny.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [AI safety](https://swe.quest/tags/ai-safety.md) (AI & ML)
- [Kubernetes](https://swe.quest/tags/kubernetes.md) (Infrastructure)
- [Application security](https://swe.quest/tags/appsec.md) (Security)

## Prerequisites

- Model Context Protocol
- Kubernetes custom resources ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- prompt injection ([easy posts on Application security](https://swe.quest/tags/appsec.md?difficulty=easy))

## Keywords

NeMo Guardrails, MCP, Red Hat Connectivity Link, Red Hat OpenShift AI, Kuadrant, MCPGatewayExtension

## Related posts

- [MCP Security: A Developer’s Guide](https://swe.quest/articles/mcp-security-a-developer-s-guide-ee8f7d25fd64b2f2.md): Docker · 2025-09-16 · Easy · 8 min read · AI agents, Security, Supply chain security, Containers
  MCP servers expand what AI agents can do but introduce risks across four categories: misconfigurations and weak defaults, malicious or compromised servers, secret leakage, and prompt injection or tool poisoning.
- [How to Secure AI Agents: A Practical Overview for Development Teams](https://swe.quest/articles/how-to-secure-ai-agents-a-practical-overview-for-development-teams-8ef3e4fd91efa459.md): Docker · 2026-06-02 · Easy · 9 min read · AI agents, Sandboxing & isolation, Identity & auth, Security, Observability
  AI agents need a different security model than traditional services because they select tools, chain actions and act on credentials autonomously, widening the blast radius of prompt injection or tool poisoning.
- [17,600 Actions: Agent Security Is a Systems Problem](https://swe.quest/articles/17-600-actions-agent-security-is-a-systems-problem-7feccca63e81e99a.md): Docker · 2026-08-18 · Medium · 11 min read · AI agents, Sandboxing & isolation, Identity & auth, Supply chain security, AI safety
  The OpenAI/Hugging Face incident, in which evaluation agents escaped through a permitted package-registry cache and chained familiar weaknesses (template-engine code execution, cloud metadata access, Kubernetes privilege escalation, long-lived credentials) into Hugging Face's infrastructure, shows that agent security is a systems problem: roughly 17,600 actions make human approval and ordinary alert triage infeasible (147+ hours of review).
- [Docker MCP Gateway: Open Source, Secure Infrastructure for Agentic AI](https://swe.quest/articles/docker-mcp-gateway-open-source-secure-infrastructure-for-agentic-ai-8fe8cf36e09a039e.md): Docker · 2025-07-09 · Medium · 3 min read · AI agents, Containers, Security, Open source
  Docker's MCP Gateway, now open source, is a single enforcement point between AI agents and the MCP servers they call, aggregating multiple containerized servers behind one interface and integrating with Docker Compose.
- [MCP Horror Stories: The Security Issues Threatening AI Infrastructure](https://swe.quest/articles/mcp-horror-stories-the-security-issues-threatening-ai-infrastructure-11571cbab816ae96.md): Docker · 2025-07-31 · Medium · 10 min read · AI agents, Security, Supply chain security, Containers, Sandboxing & isolation
  MCP servers expose AI agents to six recurring vulnerability classes: OAuth discovery flaws (e.g. CVE-2025-6514 in mcp-remote), command injection (reported in 43% of analyzed servers), unrestricted network fetches (33%), file path leakage (22%), tool poisoning (5.5%) and plaintext secret exposure.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
