Your AI Models, AI Agents, and AI MCP Servers often need access control: some teams should reach certain AI Models, AI Agents, or AI MCP Servers and others should not, and you need a way to verify who is calling before a request consumes tokens or touches sensitive data. An AI Auth Strategy lets you declare an inbound authentication mechanism at the gateway level and attach it to specific AI Models, AI Agents, or AI MCP Servers.
Use AI Auth Strategies to:
- Authenticate API keys and map them to AI Consumers
- Authenticate enterprise users through an existing identity provider (Okta, Azure AD, Google, or any OIDC-compliant IdP) without managing keys manually
- Apply different authentication to different models, agents, or MCP servers. For example, API keys for internal automation and OIDC bearer tokens for user-facing applications.
An AI Auth Strategy manages inbound authentication, which is distinct from the outbound credentials managed by an AI Model Provider. When an AI Consumer calls an AI Model, AI Agent, or AI MCP Server, the AI Auth Strategy checks who they are. The AI Model then uses the AI Model Provider’s credentials to forward the request upstream; an AI Agent proxies the now-authenticated request directly to its upstream agent; an AI MCP Server uses the resolved identity for ACL tool control before forwarding MCP traffic.
The following diagram shows where authentication fits in the request pipeline:
flowchart LR
Client["AI Consumer"]
KeyAuth["Key Auth"]
OIDC["OpenID Connect"]
Decision{Auth?}
AnonErr["Request Terminating w/ 401"]
Select["AI Model, AI Agent, or
AI MCP Server selection"]
ACLs["ACLs"]
Allowed["AI Model A, AI Agent A,
AI MCP Server A"]
Denied["AI Model B, AI Agent B,
AI MCP Server B"]
Client-->KeyAuth
KeyAuth-->OIDC
OIDC-->Decision
Decision-->|no auth|AnonErr
Decision-->|auth|Select
Select-->|selects entity|ACLs
ACLs-->|allowed|Allowed
ACLs-->|denied|Denied
Authentication behaves like any other Kong plugin: it runs after route selection, in the context of the matched route, but before the AI Model, AI Agent, or AI MCP Server is selected. This means unauthenticated requests never reach that selection step or its policy evaluation.
This diagram shows the general
key-auth/openid-connectcheck. For an AI MCP Server withaccess.metadataset, token validation instead runs through a generated AI MCP OAuth2 configuration, which adds OAuth 2.1 resource-server checks (token audience validation, protected resource metadata serving) on top of this AI Auth Strategy.