Do you know what your AI agents did last night? Our Grok Bot research shows why identity matters

What Is MCP Gateway Security? A Guide to Securing AI Agent Access

NewCore logo
Identity Security, NewCore · November 2026

An MCP gateway is a policy enforcement point placed between AI agents and the Model Context Protocol (MCP) servers that expose enterprise tools to those agents. Securing one means making that chokepoint identify the calling agent, authorize each tool call, and record who did what. A gateway that skips those three jobs still moves traffic. It produces a log that names a connection rather than an actor.

Most security teams meet the problem in the same order. Someone stands up an MCP server so an agent can query an internal reporting database. A second team connects its own agent to the same server because the endpoint is reachable and the setup details are already in the company wiki.

By the time anyone asks which agents hold access, the answer sits in a connection log full of source addresses. You cannot write policy for tool calls you cannot attribute. For networked MCP traffic, the gateway is the practical place where those calls become countable.

That shifts the evaluation question. The useful thing to ask of a gateway is not how much traffic it handles, but what it can resolve the caller into.

What Is an MCP Gateway?

An MCP gateway sits between an AI application and the MCP servers it calls. MCP is an open standard for connecting AI applications to systems such as databases, ticketing platforms, code repositories, and internal APIs. Servers expose the tools; the gateway gives security teams one place to inspect, authorize, and log how agents use them.

One detail matters. The MCP specification defines hosts, clients, and servers. It does not define the gateway as a separate participant. The gateway is a deployment pattern built around the protocol, and most of its security value comes from the product and policies an organization puts there.

The 2026-07-28 revision makes that enforcement easier. For Streamable HTTP, Mcp-Method and Mcp-Name headers tell an intermediary which operation and tool an agent requested without forcing it to parse the body. Selected arguments may also be exposed through parameter headers. Broader gateway and proxy behavior remains an active area on the protocol roadmap.

Securing the gateway means giving the box in the middle three real jobs: identify the agent, authorize the specific tool call, and preserve enough context to explain the action later.

That is the difference between an API gateway and an MCP gateway. Both apply policy and write logs, and much of established API security practice still applies. But an API gateway sees a request to an endpoint. An MCP gateway must answer a harder question: which agent, acting for whom, called which tool, under what authority?

Why MCP Gateways Are Becoming Critical for Enterprise AI Security

MCP made tool integration cheap, and cheap integration multiplies access paths. Every MCP server creates a new route into a system that already had an access model, often with its own credential and no shared inventory.

OWASP describes the older version of this problem as API9:2023 Improper Inventory Management: forgotten and undocumented endpoints remain live because nobody maintains a complete inventory. MCP adds an autonomous caller choosing from a tool list, so an inventory gap can become an authorization gap as soon as an agent finds the server.

The pattern is easy to recognize. One team approves an agent against an MCP server fronting a reporting replica. Three months later, agents from another business unit, a contractor's laptop, and an abandoned proof of concept are using the same endpoint.

No control visibly failed. There was simply nowhere that could answer, "Who is calling this server?"

That is why MCP gateway security has become more than network policy. The gateway creates a practical enforcement point, but its value depends entirely on what it can identify when a call arrives.

How AI Agents Use MCP to Access Enterprise Systems

A tool call through MCP follows a predictable path. The AI application discovers a server's capabilities, receives its tool names and argument schemas, and sends a tools/call request containing the tool and arguments the model selected.

The identity problem appears behind the server. Imagine an MCP server exposing run_report_query against a Postgres replica. The server connects to Postgres using a service account. When an agent invokes the tool, Postgres sees that account. It does not see the agent, its owner, or the task behind the request. The same collapse happens when a repository server holds a personal access token or a ticketing server holds an integration key.

For remote connections, MCP authorization is optional, but HTTP implementations should follow the authorization specification. It builds on OAuth, requires the client to identify the target MCP server, and requires the server to validate that the token was issued for it.

The Enterprise-Managed Authorization extension adds a centralized path for organizations that want their identity provider involved in the decision. It became stable in June 2026, but support still depends on the participating client, identity provider, and MCP server.

The gateway sees the request, tool, arguments, and result. That is more context than a conventional API gateway receives, but it still does not automatically know which agent stands behind the credential.

The Identity Risks Created by MCP-Based Agent Access

The core risk is that MCP-based access can collapse many callers into one credential. If a server uses one service account for every agent behind it, attribution disappears at the server boundary. OWASP's description of API2:2023 Broken Authentication captures the consequence: when a system cannot reliably identify its client, the rest of its access controls lose their foundation.

Three failures follow.

  1. 1.Over-scoped standing credentials. An MCP server is often given enough access to support every tool it exposes, leaving it with the combined reach of the entire toolset. NewCore's analysis of the Hugging Face breach and agent identity exposure shows how long-lived, over-privileged machine credentials can turn one compromise into a much wider incident.
  2. 2.Replayable bearer tokens. Agents commonly receive credentials through configuration files, environment variables, and orchestration secrets. Anyone who steals one can replay it as ordinary token theft, with traffic that may resemble legitimate agent activity.
  3. 3.Missing authentication between components. CVE-2025-49596 affected MCP Inspector versions before 0.14.1, allowing unauthenticated requests to launch MCP commands through its proxy. The vulnerability was classified as missing authentication for a critical function and received a critical CVSS 4.0 score.

A gateway cannot preserve an agent's identity inside every downstream system simply by sitting in the path. What it can do is prevent anonymous or shared access from passing through the front door unquestioned.

Common MCP Gateway Security Challenges

Teams comparing MCP gateway security tools tend to meet four problems.

  1. 1.The gateway sees a connection, not necessarily a principal. On the current stateless revision, each request is self-contained and, when authorization is used, carries its own credential. Turning that into "agent X, owned by the payments team, running task Y" requires an identity the gateway can verify.
  2. 2.The approved toolset keeps changing. MCP servers can add or change tools after the first review. Tool descriptions and annotations also reach the model as content and should be treated as untrusted unless the server itself is trusted. A gateway inspecting that inventory is inspecting an attack surface, not static configuration.
  3. 3.Some paths bypass the gateway. Servers using the stdio transport run locally beside the AI application and never cross a network control point. Local filesystem and database servers therefore require endpoint controls and explicit governance outside the gateway.
  4. 4.Records may identify endpoints rather than actors. A log that answers "which host?" when the real question is "which agent, and who owns it?" is technically complete and operationally useless.

Securing AI Agent Actions With Identity-Based Controls

Identity-based controls close the gap by moving the decision from the connection to the caller. Four controls carry most of the weight.

Authenticate the agent as its own principal. The thing being identified should be the agent itself, rather than the host process it runs in or the MCP server it calls. That gives every downstream record a subject worth writing down.

Scope the credential to the task rather than the role. Short-lived credentials bound to a specific agent, connection, scope, and time window stop an agent from accumulating standing access it keeps between jobs. This is just-in-time access applied to a caller that works in bursts.

Authorize each call at the operation level. OWASP separates two authorization failures that map cleanly onto MCP. API5:2023 Broken Function Level Authorization asks whether the caller may invoke this function, and API1:2023 Broken Object Level Authorization asks whether it may touch this particular object. In a tool call, the tool name is the function and the arguments carry the object identifiers, so checking only the first enforces half the policy.

Keep a cut path narrower than the account. Terminating one agent's session or one access path, without disabling a shared account and breaking unrelated workflows, is what makes response proportional.

Speed is why these controls belong in the call path rather than in a review queue. Agents issue calls in bursts, at machine speed, so a control that depends on someone reading a ticket applies after the action instead of during it. The case for enterprise-managed authorization makes the same argument from the authorization side: centralized decisions belong where the grant is issued rather than in a downstream cleanup pass.

Decision rule. If the MCP server holds a standing credential to the system behind it, put the identity control in front of the tool call rather than inside the server. Narrowing what the server can reach affects every caller at once. Narrowing what a specific agent may invoke affects exactly one, which is usually the change you wanted. Start by checking what AI agent authorization your environment can express today.

The Role of Identity Governance in MCP Gateway Security

Enforcement answers what happens during a call. Governance answers who approved the agent's access and when that decision should end. A gateway handles the first job; it does not replace the second.

Governance over MCP access needs three records: an owner for every agent and server, an approved mapping between agents and tools, and a removal path when an agent retires or a project ends. Those records belong in the identity governance program, extended to identities that never appear in an HR feed.

For compliance, the practical question is whether the gateway can show who invoked a tool and under whose authority. The joint guide Best Practices for Event Logging and Threat Detection ties retention to system risk and applicable obligations rather than prescribing one universal period. Its logging baseline includes timestamps, transaction identifiers, user identifiers, executed commands, and unique event identifiers.

A gateway usually sees the tool and its arguments. It may not see the agent and accountable owner. Audit logging that captures the command but cannot identify the actor stops one question short of useful evidence.

Decision rule: if reviewers cannot answer "Which agent invoked this tool, and who owns it?" from the record, treat that as an identity gap. Keeping an unresolved log for longer does not make it more informative.

How NewCore Helps Govern Human and AI Agent Identities

A gateway enforces policy only as precisely as it can identify the caller. That identity is established somewhere else, and the seam between the two is where NewCore works. Discovery comes before governance, and a tool call must become attributable before policy written over it means anything.

  • Agent Guardian brings agents, humans, applications, and MCP servers into one governed registry, then gives agents controlled execution across tools, apps, and APIs. It mints short-lived, scoped credentials on demand, evaluates policy per call, routes sensitive actions for human approval, and ties the decision to the agent, accountable owner, and policy. The agent never receives the service provider's standing credential.
  • Task-Scoped Tokens bind access to a specific agent, connection, scope, and time window. Permissions follow the job in front of the agent rather than accumulating into a permanent role.
  • Identity Discovery finds agentic identities across connected identity, cloud, SaaS, developer, data, and AI platforms. Governance can then connect each agent to an owner, authority source, systems, and policy ceiling, turning disconnected records into a population somebody can review.
  • Agentic SSO gives an agent a governed path to tools through scoped, time-bound credentials tied to its identity, owner, policy, and task.

NewCore works alongside the gateway, identity provider, and IGA stack already in place. Agent Guardian governs brokered agent-to-MCP-server traffic directly and can support compatible enterprise-managed authorization paths. The point is not to own every path. It is to make the caller on each governed path resolve to an identity you can name.

Where agent traffic is brokered, controlled agent execution across MCP servers applies the same model to every governed call. A log that cannot name the caller is not evidence. It is storage.

The agentic era runs on tool calls. Make every one of them attributable. Request a Demo →

Frequently Asked Questions

Can we use our existing API gateway as an MCP gateway?

Sometimes, and it depends on what you expect it to enforce. An API gateway can terminate the transport, apply rate limits, and log each request. It can do more than that on the current specification: every tools/call over Streamable HTTP using the 2026-07-28 revision must carry Mcp-Method and Mcp-Name headers, and selected tool arguments may be mirrored into Mcp-Param-{Name} headers. That allows a conventional gateway to route and enforce policy on the tool name without parsing the body. What it does not provide automatically is attribution to a named agent with an accountable owner. Whether it can close that gap depends on the identity context carried in the request and the policies it can enforce.

Is MCP safe to run against internal systems?

The protocol is not the deciding factor. Risk comes from which tools a server exposes, what credential that server holds, and who can reach it. A server exposing three read-only queries against a replica is a different proposition from one exposing write operations against production with an administrative credential. Scope the server before evaluating the transport.

Who should own the MCP gateway inside the organization?

Ownership is worth splitting explicitly and early. Put the gateway itself with the platform or infrastructure team. The identity team owns the principals flowing through it, and the application team owns the tools each server exposes. Disputes surface during incident response, when nobody is sure who can approve cutting an agent's access.

Do local MCP servers on developer machines pass through the gateway?

Servers using the stdio transport run as local processes alongside the AI application, so they do not cross a network control point. Most organizations handle these through endpoint policy and by restricting what local servers may expose, rather than by trying to route them. Treat the boundary as a deliberate scoping decision and write it down.

Does putting a gateway in the path slow agents down?

It adds a hop, and the cost depends on what the gateway does with the call. Transport termination and logging are cheap. Per-call authorization against an external policy decision point costs more, especially for agents that issue many small calls. The usual lever is caching authorization decisions within a bounded window rather than removing the check.

Discover every agent acting in your business.

Book a Demo

About the Author

NewCore logo
The NewCore Team

Identity Security, NewCore

The team behind NewCore's Identity 101 guides, covering agent security, identity security, workforce security, identity governance, and identity discovery. These guides draw on NewCore's own product and security work, translated into practical, vendor-neutral guidance for security and IT teams managing identity across people, software, and AI agents.

View all articles

Cite this guide

The NewCore Team. (2026, November 24). What is MCP gateway security? a guide to securing AI agent access. NewCore. https://newcore.com/identity-101/mcp-gateway-security

See Every Identity in Your Environment

NewCore discovers the human & non-human identities across your stack and shows you which access to fix first.