Securing, Observing, and Governing MCP Servers with Kong AI Gateway | Kong Inc.

We're Entering the Age of AI Connectivity

Products & Agents:

Greg Peranich
Staff Product Manager, Kong

The explosion of AI-native applications is upon us. With each new week, massive innovations are being made in how AI-centric applications are being built. There are a variety of tools developers need to consider, be it supplying live contextual data via the Model Context Protocol (MCP) or leveraging the new Agent2Agent Protocol (A2A) to standardize how their agentic applications will communicate.

Securing AI Connections with Kong AI Gateway

With Kong AI Gateway, we can securely expose agentic applications, MCP servers, and LLMs alike. Kong provides many different policies that cover a wide array of functionality, enabling developers to easily configure access control for their use cases.

Authentication plugins like OpenID Connect or Key Authentication can be used to standardize the authentication patterns at the edge. The authentication plugins can be extended to support fine-grained Authorization models via JWT claims or declarative Access Control Lists (ACLs).

After establishing consumer identity, Kong AI Gateway supports flexible policies for managing consumer quotas. The AI Rate Limiting Advanced plugin can be used to apply token-usage quotas, while the vanilla Rate Limiting Advanced plugin can support the more typical API request-based quotas.

The AI Gateway also provides the ability to apply flexible guardrails to centralize content moderation, using the AI Prompt Guard plugin for regex-based policies or the AI Semantic Prompt Guard plugin to enable smart guardrails with semantic reasoning. The AI Gateway also provides the ability to integrate with third-party services (see Azure Content Safety or the PII Sanitizer), giving ultimate control over how platform teams can ensure that all interactions will conform to the appropriate governance policies.

Finally, we want to ensure that the AI Gateway provides real-time visibility into model behavior, request flows, and performance bottlenecks — enabling faster debugging, improved reliability, and safer AI outcomes. Kong provides the tools necessary to achieve a robust security posture, leveraging log aggregation and modern standards like OpenTelemetry.

Example use case: Building an MCP-enabled chatbot

Kong recently announced the launch of an MCP Server for Kong Konnect — a unified SaaS platform for managing APIs, events, and LLMs across hybrid and multi-cloud environments. This empowers customers to integrate AI agents and query LLMs to discover and request details around APIs, services, and their associated traffic analytics.

In the diagram below, we can see how leveraging the Kong AI Gateway as the central connectivity point for the application will help ensure that the developers can securely roll out the application.

Let’s apply the above flow to a real user prompt: “Give me an overview of the services in the Shared_Services control plane that have the highest 4xx and 5xx error rates over the past 24 hours”.

plugins:
- name: openid-connect
  config:
    issuer: https://konghq.okta.com/oauth2/default
    auth_methods:
    - bearer
    consumer_claim:
    - sub
    groups_claim:
    - groups
    groups_required:
    - konnect-mcp-users

Conclusion

While we have gotten into the weeds on how to securely expose a single chatbot application, we can see that many moving parts need to be accounted for, secured, and monitored, in the development stack for AI applications. Kong AI Gateway is not just a proxy: it’s a trust layer for all generative AI applications. Combined with the Kong Konnect platform, organizations will have the tools to build a developer-centric AI platform that will allow the best and brightest to operate efficiently.