Independent analysis by NHI Mgmt GroupSource article: Akeyless, “What Is an MCP Gateway: Architecture, Security Risks, and When You Need One” (November 13, 2026)

TL;DR: Akeyless shows MCP gateways centralise identity checks, logging, and tool allowlists for agent-to-tool traffic, but they do not see direct API calls, local config-stored credentials, or the prompt context behind a request. That leaves governance split between the gateway and the systems it cannot cover.


At a glance

What this is: NHI Mgmt Group's analysis, drawing on Akeyless's blog post: MCP gateways centralize enforcement for agent-to-tool traffic, but they leave direct API paths, local credential storage, and prompt blind spots outside coverage.

Why it matters: Identity teams have to decide where MCP gateway controls end and where brokered access, runtime authority, and direct-API governance must begin.

👉 Read Akeyless's analysis of MCP gateway governance and bypass risks


Context

An MCP gateway is a policy checkpoint for AI agents, but it does not remove the underlying credential problem. Once agents are wired to multiple tools, teams often concentrate tokens, logs, and enforcement in one place while leaving native API calls and local configuration files outside that perimeter.

That matters because the governance question is not whether a gateway exists, but whether the organisation still depends on static secrets and ungoverned tool paths. Model Context Protocol explained helps set the protocol baseline, but the real issue is how far identity and policy can follow the agent across each execution path.


Key questions

Q: How should organizations manage credentials for AI agents?

A: Organizations should transition from hard-coded credentials to runtime-fetched credentials that enhance security by ensuring that tokens are not stored permanently. Utilizing solutions like the MCP Secret Wrapper can help eliminate the risks associated with static credentials.

Q: What is the difference between a traditional API gateway and an MCP server?

A: An API gateway manages edge traffic with routing, authentication, and rate limits. An MCP server sits inside the AI runtime and translates an agent’s intent into concrete tool calls across APIs, vector stores, and internal systems. Gateways protect the perimeter. MCP servers orchestrate non human work, so they need identity, policy, and traceability at call time.

Q: How do direct API calls create risk around agent governance?

A: Direct API calls create governance risk because they let an agent or script reach tools without passing through the control point that records scope, policy checks and approvals. If someone can bypass the MCP layer, they can invoke endpoints with broader permissions, unmanaged credentials or hidden data flows, so teams lose central auditability and revocation.

Q: What should teams do first when MCP secrets appear in config files?

A: First, remove the exposed secrets from the MCP configuration file and rotate every credential found there, including API keys, tokens and certificates. Then identify who or what used them, check repository history and build pipelines for further copies, and move the secrets into a managed secret store with scoped access and rotation controls.


Technical breakdown

How MCP gateways intercept tool calls

An MCP gateway sits between the agent and the servers it calls, then rewrites many small links into one enforcement point. It authenticates the agent, filters which tools appear in the catalog, applies policy at call time, and records the request and result. In practice, this means the gateway governs the MCP conversation, not the broader application runtime. It is strongest when the tool is reached through the protocol path it actually sees, and weakest when access happens elsewhere. See the MCP Gateway and MCP Server Governance Guide.

Practical implication: Use the gateway as a protocol control, not as proof that all agent access is governed.

Why direct API calls bypass MCP governance

A gateway only sees traffic that actually passes through it. If an agent can call a cloud API, database endpoint, or SDK directly, that access path is invisible to MCP policy, identity filtering, and audit enrichment. This is why MCP control and API control are related but not interchangeable. The protocol may standardise tool access, yet the environment still has other channels that can reach the same data or actions without the gateway’s approval model. Read API Security vs MCP Security.

Practical implication: Treat direct API and SDK paths as separate governance surfaces that need their own entitlement review.

Why local config files become secret concentration points

When MCP clients store credentials locally, the laptop or developer workstation becomes part of the trust boundary. That shifts risk from many distributed secrets to one concentrated secrets store that the agent can reach during execution. The problem is not only exposure, but scope: once the credential sits near the agent, convenience often wins over separation of duties. This creates a governance model where the agent is close enough to use the secret but not sufficiently isolated from it. See the MCP Security Guide.

Practical implication: Move credentials out of agent configs and into a brokered model where the token never reaches the agent.


Threat narrative

Attacker objective: The attacker or abusing operator wants to reach target systems through a path that preserves access while obscuring attribution and broadening the blast radius.

  1. Entry occurs when an agent is connected to GitHub, a Postgres replica, and Jira through MCP, with credentials stored in a local JSON config for convenience.
  2. Credential exposure follows because the same setup places static secrets on the laptop and lets a shared database user mask which actor issued a query.
  3. Impact arrives when a gateway or local allowlist cannot explain provenance well enough to distinguish one agent’s action from another, or when a direct API path bypasses the MCP layer entirely.
  • LiteLLM MCP auth bypass 2026: An exploited LiteLLM MCP auth bypass and default sk-1234 master keys let attackers steal AI gateway master and provider API keys.
  • Schneider Electric Jira breach 2024: Credentials linked to a Lumma infostealer infection gave Hellcat access to Schneider Electric's Jira; 40GB and 400,000 user rows claimed.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

MCP gateways are useful only when governance starts at the protocol boundary. Akeyless shows the gateway can centralise identity checks, policy, and logging for tool calls, but that strength is narrow. Once agents reach systems through direct APIs or local configs, the governance model fragments and the gateway becomes one control among several rather than the control plane.

Static secrets become more dangerous when they are attached to agent convenience. The article shows the same pattern that has already defined NHI risk: credentials are stored where they are easiest to reuse, not where they are easiest to govern. That raises the question of whether the organisation is controlling the agent or merely wrapping existing secret sprawl in a new interface.

Brokered access is the real identity boundary, not the gateway alone. If the credential never reaches the agent, the control model changes from inspection to delegation. That is the more durable pattern for NHI governance because it reduces both leakage opportunity and overreach in a single design choice.

Prompt context is a governance blind spot that no gateway can fully recover. The gateway can log the call, but it does not see the model reasoning that led there. That means identity policy must be designed around observable action, not around assumptions about intent; otherwise approval and attribution remain partially inferred rather than verified.

From our research library:

What this signals

Brokered access will become the deciding control for higher-risk agent deployments. Gateways can shape the MCP path, but they do not remove the underlying secret from the environment. Once agents can reach production data or regulated systems, the control objective shifts from inspecting usage to ensuring the credential never sits inside the agent’s execution context.

Identity programmes that stop at per-tool allowlists will still miss the bypass paths that matter most. The next maturity step is to govern direct APIs, local configs, and delegated access as one access model rather than as separate technical problems.

Gateway centralisation creates a new single point of failure unless the surrounding model is designed deliberately. A central MCP enforcement layer can improve visibility, but it also concentrates access and failure impact. Organisations should assume the gateway is one layer in a broader governance stack, not the stack itself.


For practitioners

  • Inventory every MCP client and config file Search repositories, laptops, and developer profiles for files such as .cursor/mcp.json, then count the credentials and server entries they contain.
  • Separate MCP governance from API governance Map which workloads, databases, and cloud endpoints can still be reached directly by agents so those paths get explicit entitlement and logging controls.
  • Adopt brokered access for high-risk targets Move the target credential out of the agent and into a broker that performs the access on the agent’s behalf, especially for databases, SSH, Kubernetes, and cloud APIs.
  • Pin approved servers and tool descriptions Allowlist only known MCP servers and pin their approved tool descriptions by hash so hidden instruction changes are visible before the agent trusts them.
  • Put runtime authority in front of production changes Require intent-aware enforcement for any agent that can change production data so destructive or out-of-scope actions are blocked before they reach the target.

Key takeaways

  • MCP gateways help standardise agent access, but they do not govern every path an agent can use to reach systems.
  • Credentials embedded in local config files and shared accounts create attribution and exposure problems that gateway policy alone cannot solve.
  • Brokered access and runtime authority are the controls that close the gap between protocol governance and actual system reach.

Related NHI Mgmt Group resources: MCP Security Guide · MCP Gateway and MCP Server Governance Guide · AI agent runtime reference architecture · API Security vs MCP Security


Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10, OWASP Agentic AI Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageMCP client configs and local storage are exposing secrets that agents can reach.
NHI-05 — Overprivileged NHIShared broad tokens and tool access create over-privileged agent paths.
NHI-07 — Long-Lived SecretsStatic credentials in config files persist far longer than the task they support.
Recommendation — Remove secrets from agent configs and revoke any credential found in local MCP files. Scope each agent to the minimum tools and target systems it actually needs. Replace persistent agent credentials with short-lived delegated access wherever possible.
OWASP Agentic AI Top 10ASI02 — Tool MisuseAgents can misuse legitimate tools or direct API paths outside the MCP control layer.
ASI03 — Identity & Privilege AbuseThe article centers on how agent identity and privilege are enforced across tools and APIs.
Recommendation — Constrain agent tool use and monitor for actions that bypass the intended MCP path. Bind agent actions to explicit identity and limit privilege escalation paths across tool layers.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsPer-identity tool allowlists and server access need formal entitlement control.
Recommendation — Review and enforce agent entitlements wherever tools, APIs, or servers are exposed.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementThe article discusses static credentials, rotation pressure, and delegation of access.
Recommendation — Manage and rotate agent authenticators so credentials are never left embedded in configs.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementSecret exposure and broad tool reach support credential access followed by movement.
Recommendation — Map exposed MCP secrets and overbroad tool paths to credential access and lateral movement detections.

Key terms

  • MCP Gateway: The control layer that relays assistant intent to tools and data sources through the Model Context Protocol. In practice, it becomes a policy boundary, not just a transport layer. If it trusts model output too early, it can turn unverified reasoning into real-world execution or disclosure.
  • Model Context Protocol: Model Context Protocol is an open protocol that lets AI agents connect to tools and data sources. It expands what an agent can reach, so governance has to cover not only the model and its prompts, but also every system that can receive or return agent-driven data.
  • Brokered Access: Brokered access is a model where the user or workload proves identity to an intermediate control plane that issues short-lived access instead of exposing a reusable secret. For privileged operations, this shifts governance from secret storage to session control, auditability, and timely revocation.
  • Tool allowlist: An approved list of systems, APIs, or functions that an agent may use. It reduces the agent's blast radius by preventing unrestricted tool discovery and cross-environment access, which are common ways agentic workflows move from helpful automation into operational risk.

What's in the full article

Akeyless's full blog post covers the operational detail this post intentionally leaves for the source:

  • Five-step walkthrough of how an MCP gateway authenticates agents, filters tools, and records each call
  • Comparative detail on when an API gateway is enough and when an MCP gateway is still required
  • Design notes on brokered access, hash pinning, and runtime authority for higher-risk agents
  • Practical deployment guidance for mixed stdio and Streamable HTTP MCP fleets

👉 Akeyless's full blog post covers mixed-fleet deployment, brokered access, and runtime authority controls.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are responsible for identity security strategy or NHI governance in your organisation, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org