Est.

Securing AI Agent Access to Internal APIs and SaaS Systems

Agents act through tool calls that old API gateways can't govern.

· 11 min read · Updated
Cover illustration for “Securing AI Agent Access to Internal APIs and SaaS Systems”
AI Security & Threat Detection · September 30, 2026 · 11 min read · 2,389 words

Enterprise API security was built for deterministic app-to-app traffic, static credentials, predictable request paths, and human-bounded intent, a world that no longer describes how AI agents actually operate. A traditional API gateway asks one question, and it's a simple one: is this client authorized to hit this endpoint? An AI agent needs a harder question answered, live, every time: is this specific agent authorized to execute this specific tool call, with these specific parameters, on behalf of this user, right now? Okta's AI Agents at Work 2026 report found that only 34% of organizations apply the same security controls to AI agents that they apply to human employees, which is a strange gap given that agents can now read databases and write to production systems without a human clicking anything.

Snowflake's enterprise MCP gateway guide lays the contrast out: static API keys and fixed URL endpoints cover the traditional case, while agent traffic runs on dynamic short-lived tokens, user-delegated OAuth, tool parameters, live prompt context, and a full trajectory log of intent, tool choices, and blocked attempts. The unit of control itself has moved. It used to be the URL endpoint. Now it's the individual tool call, something a traditional gateway has no way to inspect, interpret, or govern.

Agent behavior has four properties, and they explain why patching the old model doesn't close the gap. Agents choose which tools to invoke at runtime based on what's in the prompt, not a fixed call graph, so their behavior is nondeterministic by design. They chain calls across systems, each one feeding the next, so a single prompt that looks harmless can cascade into an export, a write, or a deletion before anyone notices. They act under delegated identity, so they carry a human user's scope and consent into every downstream call they make. And they run asynchronously: continuously, spawning sub-agents, operating across activation surfaces that have nothing to do with a bounded human session. None of these four properties is new in isolated form. Together, applied to systems that can read and write enterprise data, they add up to an access pattern the old gateway model was never asked to handle.

MCP: The Connector Standard Behind the Governance Gap

The Model Context Protocol gave AI agents a single, universal way to connect to enterprise systems, and as adoption climbed, it turned a quiet governance gap into an urgent one. MCP works like a USB-C port for AI: one abstraction layer, and any MCP-compatible agent plugs into any MCP-compatible server, whether that server sits in front of a database, a SaaS app, or an internal API. Anthropic handed stewardship of the protocol to the Agentic AI Foundation, a directed fund under the Linux Foundation, in December 2025, and the protocol now moves through a formal requirements process there. That move settles a question enterprise buyers were right to ask: MCP is infrastructure, built and governed like one, not a single vendor's side project.

By April 2026, MCP was running on enterprise servers across the industry, with SDK downloads reaching the tens of millions each month, and Anthropic, OpenAI, Google, Microsoft, and AWS had all adopted it. Earnings calls from the second and third quarters of 2026 turned that adoption into hard numbers. Datadog reported MCP tool calls multiplying dramatically since the fourth quarter of 2025, then quadrupling again the following quarter. Atlassian reported MCP calls up 400% in a single quarter, and Salesforce reported sixfold growth in agentic use of its apps through MCP and CLI calls. The pattern across all these: agents have become a parallel, high-volume, largely invisible access channel running alongside human users.

The protocol itself is catching up to what it enabled. The June 2026 Enterprise-Managed Authorization extension to the MCP spec formalizes a new identity model, one where enterprise identity providers become the authoritative gatekeeper for MCP server access, marking a governance model that is still maturing. Atlassian's own description of its growth curve says the rest: the 400% jump in MCP calls arrived "with barely a blip in people actually using the applications through the web or through a mobile client". Traffic to the front door stayed flat while a side door saw traffic multiply fivefold. Most security teams haven't noticed yet.

Diagram: The Side Door Problem: MCP Traffic vs. Human Traffic. Visualizes: Show a stark before/after or dual-channel contrast: front-door human traffic stayed essentially flat while MCP agent traffic multiplied fivefold in the same period.

The shadow agent problem inside enterprise systems

Shadow AI agents running over MCP are what the governance gap looks like once it takes organizational form, and the fallout runs deeper than anything shadow IT produced. A developer wires up a local MCP server to connect an AI coding assistant to a staging database or a production API, and the productivity gain shows up immediately. The security gap that opens alongside it goes undetected, because nobody's looking. Security teams typically have no inventory of which MCP servers are even running, what credentials those servers hold, which systems they can reach, or what data passes through them, a blind spot that lines up with the broader finding that 98% of organizations report some form of unsanctioned AI use.

The mechanics of that blindness are specific. Hardcoded tokens sit in local configuration files, and an agent acts with whatever access it was handed at setup; you rarely see it reviewed afterward, and almost never scoped down to what it actually needs. Security researchers have documented what grows out of that setup: malicious MCP servers that manipulate agent behavior through forged tool descriptions, a technique known as tool poisoning; agents that leak data across session boundaries, known as context leakage; and servers that override trusted tools inside an agent's own toolchain, known as tool shadowing. The security firm Knostic scanned the open internet for exposed MCP servers, and it found hundreds of them. Every server in the sample it examined handed back a full listing of its internal tools to a request that was never authenticated.

Shadow AI has its own headaches, but it brings three risks you never got with shadow IT. The first is prompt-level data leakage: teams drop API keys, database credentials, or other secrets straight into system prompts, and a prompt-engineering attack can pull those secrets back out, turning a chat interface into a credential exfiltration pipeline. The second is opacity around the AI vendor itself: it often sits in the role of data processor, and nobody outside the vendor can fully see its retention and training practices, so sensitive prompt content may already have left the building. The third, and the sharpest of the three, is that prompt content is the leak vector that ordinary network tools are built to miss. An MCP gateway operating at the application layer can read MCP messages well enough to know what data an agent is asking for and what it intends to do with it. A network-level proxy sees none of that, because all it sees is encrypted traffic.

Legacy identity and access management was built to answer one question, who, and AI agents now force enterprises to also secure intent and the lifespan of a given grant of access, problems the legacy architecture was not designed to handle. Agents run continuously, spawn sub-agents, chain tools together, and operate across activation surfaces that have no relationship to a bounded human login session, which breaks the core assumption SSO and Conditional Access were built on: that intent is bounded and identity volume is manageable. 70% of organizations are scaling agent deployments right now on top of a governance foundation built for a different era.

Role-Based Access Control, the workhorse of enterprise identity for two decades, is too blunt an instrument for the decisions AI-driven systems need made. An agent holding a "viewer" relationship to a project should be able to summarize its documents. It should not be able to export that same data to an external API, and a coarse role-based model alone can't draw that line. Relationship-based and attribute-based access control models can, because they enforce distinctions like this one at the level of the individual tool call, in real time, rather than at the level of a role assigned once and forgotten.

Identity platforms moved on this through 2026, and three implementations illustrate where the category is headed. Microsoft's Entra Agent ID, which reached general availability in April 2026, extends Microsoft's existing Zero Trust stack, Conditional Access, Identity Governance, Identity Protection, to non-human identities, treating an agent as a specialized service principal that pulls short-lived tokens through its blueprint rather than holding credentials of its own. It speaks OAuth 2.0, MCP, and A2A natively, and it can onboard third-party agents built on AWS Bedrock or n8n through a sidecar SDK or workload identity federation. Okta for AI Agents, which reached general availability on April 30, 2026, pairs Cross App Access, an enterprise implementation of MCP that issues short-lived scoped tokens for cross-application and agent-to-agent delegation, with Fine-Grained Authorization, which evaluates relationship-based permissions at the individual tool-call level in real time. Okta's version is built to run alongside other identity providers, so an enterprise can keep Entra ID or Ping as the system of record for human users while Okta handles identity security across the full agent lifecycle.

For the highest-risk actions, a mechanism called Client-Initiated Backchannel Authentication, part of the OIDC specification set, lets an authorization server request approval from a human on a separate device without blocking the agent's session, a decoupled flow built for exactly the human-in-the-loop oversight that high-risk agent actions call for. The June 2026 EMA extension to MCP ties the identity layer back to the protocol itself: enterprise identity providers become the authoritative source for MCP server provisioning, so a user authenticates once through the identity system already in place, and that system automatically grants access to whatever MCP servers that user is cleared to use. The protocol is being rebuilt to assume an identity layer exists underneath it, rather than bolting one on after the fact.

What an MCP Gateway Does Differently

An MCP gateway is a different category of infrastructure from an API gateway retrofitted for agent traffic; it's built to govern execution, not merely connection. Most API gateways answer whether a connection is allowed. Few of them answer whether the action behind that connection should be allowed, and that distinction decides whether a compromised agent can only knock on a door or actually walk through it and start taking things.

An MCP gateway is at the application layer, reading MCP messages closely enough to know what an agent is asking for and what it plans to do with the answer. A network-level proxy can't make that call, because encryption hides the content from it entirely, leaving it able to see that traffic moved but not what it meant. If an agent operates at enterprise scale, you can't hardcode static service tokens into its local configuration file; the risk is unacceptable. Modern gateway designs instead intercept each tool execution as it happens and inject the right credential at runtime, so the agent carries the authority it's been granted but never holds the underlying secret, and that closes off an entire category of credential leak.

Snowflake's enterprise MCP gateway guide lays out five technical pillars, and they define a complete implementation. Zero-secret exposure keeps credentials out of the agent's hands and out of the LLM's context window entirely, injecting them only at the moment of execution. Tool-level authorization moves control down to individual tool calls with specific parameters, so it doesn't stop at the level of the endpoint. Context narrowing addresses something most security teams don't expect: an agent handed an entire database schema or a full API specification doesn't just carry a bigger attack surface, it performs worse, because excess context measurably increases hallucination rates. A gateway that trims tool definitions down to what a given user's intent and session actually require cuts risk and improves accuracy in the same stroke, which makes this one of the rare security controls that's also a performance upgrade, a useful argument for any security leader trying to get budget approved. Policy enforcement lets rules run centrally instead of being configured agent by agent, so you can restrict production database access to business hours, or require a security scan before you grant API access. And full trajectory audit logging captures intent, tool choices, parameter values, and blocked attempts, not just the request and response metadata an HTTP log would show, giving compliance teams the evidence they need without instrumenting every agent by hand.

A production MCP gateway architecture runs on three planes. An inbound plane authenticates the agent. A policy plane filters which tools are visible, and it enforces budget and rate limits. An outbound plane connects to the actual MCP servers using the correct injected credentials. Every tool call has to pass through all three, and that's what turns the gateway into a single point of control and a single point of audit rather than one more log source to reconcile later.

Diagram: Inside a Three-Plane MCP Gateway. Visualizes: Illustrate the three sequential planes every tool call must pass through in a production MCP gateway: (1) Inbound Plane — authenticates the agent; (2) Policy Plane — filters visible tools…

How production MCP gateway implementations differ across enterprise environments

The MCP gateway category has already moved past the whitepaper stage and into production across enterprise platforms, but what a given implementation governs, and where it sits in the stack, varies enough that the choice is far from a commodity decision. Some gateways are built as an extension of an existing cloud platform's control plane, tying tool-call governance to infrastructure a company has already standardized on. Others are built as network and traffic infrastructure first, with MCP governance as a layer on top of request routing and observability the company already runs. Others still are open-source and self-hosted, so you trade the convenience of a managed service for full control over where credentials live and how the gateway integrates with your own identity provider.

None of these approaches is wrong, and the right one depends on what an enterprise already has in place: which identity provider is the system of record, which cloud platform hosts the majority of internal APIs, and how much the security team is willing to operate itself versus hand off to a vendor. What stays constant across every implementation is the five-pillar bar Snowflake's guide lays out and the three-plane architecture that makes tool-call governance enforceable rather than aspirational. A gateway that skips context narrowing, or that logs HTTP metadata instead of full agent trajectories, is missing the part of the job that was the point of building an MCP gateway in the first place.

Sources

  1. AI agent identity governance: the 2026 build list
  2. How ID-JAG helps AI agents authenticate | Nango Blog
  3. MCP Gateway Architecture: Securing Tool Calls, Agents, and APIs - API7.ai

More in AI Security & Threat Detection