News

Why MCP Gateways are a Bad Idea (and What to Do Instead)

  • Lidan Hazout--securityboulevard.com
  • published date: 2026-03-20 00:00:00 UTC

None

<p><span data-contrast="auto">We all love MCP.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto"><a href="https://securityboulevard.com/2026/03/introducing-the-mcp-security-gateway-the-next-generation-of-agentic-security/" target="_blank" rel="noopener">Model Context Protocol is open, simple, and powerful</a>, making it much easier to plug tools into AI agents in a consistent way. It has quickly become a core building block for many agentic architectures.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">We all understand the risks.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">When you give an agent access to powerful tools, you also give them the power to break things, leak data, or generate unexpected costs. So naturally, the industry started thinking: </span><i><span data-contrast="auto">“We need a way to control MCP usage.”</span></i><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">That is where </span><b><span data-contrast="auto">MCP Gateways</span></b><span data-contrast="auto"> come in.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">The idea is attractive: Put a gateway in front of all MCP servers, and you can monitor tool calls, approve or deny specific actions, and enforce policies at a central control point. It sounds good at first. In practice, MCP Gateways are the </span><b><span data-contrast="auto">wrong abstraction</span></b><span data-contrast="auto"> for securing modern agents.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Let’s look at why.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><h3 aria-level="2"><span data-contrast="auto">Why MCP Gateways are a Bad Idea</span><span data-ccp-props='{"134245418":false,"134245529":false,"335559738":360,"335559739":120}'> </span></h3><p><span data-contrast="auto">The instinct to put a gateway in front of MCP servers is understandable. It’s the same thinking that gave us firewalls, DMZs, and perimeter security. Put everything behind a checkpoint, monitor what flows through, and enforce policies from one central place.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">We know how that story ends. Perimeter security creates a hard shell with a soft center. Once you’re past the gate, you’re trusted. And in modern systems with APIs, microservices, and distributed agents, there are too many ways past the gate.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">MCP Gateways repeat this mistake at the protocol level. They try to solve a runtime problem with a network control, and that mismatch creates more issues than it solves. </span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Here’s why they fall short:</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><b><span data-contrast="auto">1. They only cover MCP, not everything your agent can do</span></b><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Gateways only see what goes through MCP. Most real-world agent systems use much more than that. They execute shell commands and scripts, call native SDKs and libraries, connect directly to databases, and use framework-specific connectors for tools like Slack, GitHub, Jira, or cloud providers. A risky or buggy workflow does not care whether it uses MCP, a shell, or a built-in connector. From a security perspective, shell access is often far more dangerous than a typical MCP tool.</span><span data-ccp-props='{"335559685":720,"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">If your security model only protects MCP, you are left with big blind spots. You are securing one door while the windows, back door, and garage are wide open.</span><span data-ccp-props='{"335559685":720,"335559738":240,"335559739":240}'> </span></p><p><b><span data-contrast="auto">2. They introduce a new secret management risk</span></b><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">To work, many gateways require you to route requests, and often credentials, through them. API keys, OAuth tokens, service accounts, and other sensitive secrets may now live in or pass through a third-party system.</span><span data-ccp-props='{"335559685":720,"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Instead of reducing risk, you have just increased the number of places where your secrets exist, the number of systems that could be compromised, and the number of new vendors or services in your threat model. You tried to solve one problem, uncontrolled tool use, and created another, centralized secret exposure.</span><span data-ccp-props='{"335559685":720,"335559738":240,"335559739":240}'> </span></p><p><b><span data-contrast="auto">3. They lack full agent context</span></b><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Security is all about context. To decide whether a tool call is safe, you need to know the user prompt, the agent goal, the session history, what other tools were called before, and whether this call is part of a larger workflow or just a strange one-off. A gateway usually sees something like “Call tool X with arguments Y from client Z.” That is useful but incomplete.</span><span data-ccp-props='{"335559685":720,"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Without full session context, advanced detection is almost impossible. You cannot reliably flag suspicious sequences of actions, distinguish benign calls from data exfiltration, or enforce nuanced, context-aware policies like “only allow this if the user is in group A and the data is tagged B.” You end up with either overly permissive rules or very basic, noisy ones.</span><span data-ccp-props='{"335559685":720,"335559738":240,"335559739":240}'> </span></p><p><b><span data-contrast="auto">4. They are a single point of failure</span></b><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Most MCP Gateways are built as proxies or reverse proxies. If the gateway is down, misconfigured, rate-limited, or suffering from network issues, your agents are effectively offline.</span><span data-ccp-props='{"335559685":720,"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Instead of building resilient systems, you centralize everything behind one piece of infrastructure that now has to be highly available, low-latency, secure, and correctly configured across all environments. That is a lot of operational overhead for something that is supposed to “just” add security.</span><span data-ccp-props='{"335559685":720,"335559738":240,"335559739":240}'> </span></p><p><b><span data-contrast="auto">5. They are hard to enforce across all clients</span></b><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Even with a perfect design, you still face a major practical problem. How do you force every client and every agent to use the gateway? Agents can run in local developer environments, CI pipelines, different services or microservices, IDEs and notebooks, and on machines you do not fully control. If a client can talk directly to an MCP server, it can bypass the gateway unless you apply strict network and configuration controls everywhere.</span><span data-ccp-props='{"335559685":720,"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">In practice, this often results in some traffic passing through the gateway and some not. You think you have control, but you do not have full coverage. Partial security can be worse than no security because it creates a false sense of safety.</span><span data-ccp-props='{"335559685":720,"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">The good news is that there’s a better approach, one that actually addresses these fundamental problems instead of working around them. If MCP Gateways are the wrong layer, what is the right one?</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><h3 aria-level="2"><span data-contrast="auto">Runtime Hooks – Securing the Entire Layer, Not Just the Protocol</span><span data-ccp-props='{"134245418":true,"134245529":true,"335559738":240,"335559739":240}'> </span></h3><p><span data-contrast="auto">The best place to secure agents is inside the agent runtime itself, not at the edge of a single protocol. That is where runtime hooks come in.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Hooks are built into the agent framework and trigger whenever tools are used.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto"> Runtime hooks solve the core limitations with gateways as a security guardrail:</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><ul><li aria-setsize="-1" data-leveltext="●" data-font="" data-listid="2" data-list-defn-props='{"335552541":1,"335559685":720,"335559991":360,"469769242":[8226],"469777803":"left","469777804":"●","469777815":"multilevel"}' data-aria-posinset="1" data-aria-level="1"><span data-contrast="auto">Full coverage across all tooling, not just MCP</span><span data-ccp-props='{"335559738":240}'> </span></li></ul><ul><li aria-setsize="-1" data-leveltext="●" data-font="" data-listid="2" data-list-defn-props='{"335552541":1,"335559685":720,"335559991":360,"469769242":[8226],"469777803":"left","469777804":"●","469777815":"multilevel"}' data-aria-posinset="2" data-aria-level="1"><span data-contrast="auto">No credential exposure to third parties</span><span data-ccp-props="{}"> </span></li></ul><ul><li aria-setsize="-1" data-leveltext="●" data-font="" data-listid="2" data-list-defn-props='{"335552541":1,"335559685":720,"335559991":360,"469769242":[8226],"469777803":"left","469777804":"●","469777815":"multilevel"}' data-aria-posinset="3" data-aria-level="1"><span data-contrast="auto">Access to full session and prompt context</span><span data-ccp-props="{}"> </span></li></ul><ul><li aria-setsize="-1" data-leveltext="●" data-font="" data-listid="2" data-list-defn-props='{"335552541":1,"335559685":720,"335559991":360,"469769242":[8226],"469777803":"left","469777804":"●","469777815":"multilevel"}' data-aria-posinset="4" data-aria-level="1"><span data-contrast="auto">No single point of failure</span><span data-ccp-props="{}"> </span></li></ul><ul><li aria-setsize="-1" data-leveltext="●" data-font="" data-listid="2" data-list-defn-props='{"335552541":1,"335559685":720,"335559991":360,"469769242":[8226],"469777803":"left","469777804":"●","469777815":"multilevel"}' data-aria-posinset="5" data-aria-level="1"><span data-contrast="auto">Easy configuration and rollout</span><span data-ccp-props='{"335559739":240}'> </span></li></ul><p><span data-contrast="auto">Because hooks live at the agent layer, they can see MCP tools, shell commands, native SDK calls, HTTP requests, and framework-specific connectors. If the agent invokes something, a hook can catch it. You are not limited to monitoring just one protocol while everything else runs unobserved.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">In addition, to avoid credential exposure, hooks run inside your environment and inside your agent code. They do not require you to send your secrets to a third party. Secrets remain in your existing systems, no extra proxy or gateway needs to store API keys, and you keep complete control over secret management. Hooks can inspect metadata and arguments without becoming a new storage location for credentials.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Running inside your code and environment provides additional value, where hooks can see the full conversation history, the current prompt, the agent state or plan, and previous tool calls in the same session. Your security logic can be truly context-aware. You can write policies like “block this call if the user is external and the data is marked internal only” or “alert if the agent chains several export-style tools suspiciously.” This is extremely hard to do from a protocol-level gateway that only sees isolated tool call requests.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Because hooks are typically implemented as part of the agent SDK or runtime, they avoid creating a single point of failure. If a hook fails, you can design it to fail safely, denying only the risky call, or to degrade gracefully while the agent continues to run. You are not routing all traffic through one central network bottleneck. You are adding behavioral controls inside each agent process.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Finally, hooks are easier to deploy and manage. Instead of managing complex network paths and proxies, you enable hooks in your agent framework, configure policies in one place, and ship that configuration with your agents. This is far easier to standardize across teams and environments than enforcing gateways for every client. On top of that, no code changes are required if hooks are integrated at the framework or platform level. Teams can adopt security controls by configuration alone, without modifying each agent implementation.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><h3 aria-level="3"><span data-contrast="none">MCP Registries: Control at the Source</span><span data-ccp-props='{"134245418":true,"134245529":true,"335559738":240,"335559739":240}'> </span></h3><p><span data-contrast="auto">Runtime hooks secure how tools are used, but decades of security practice have taught us that good hygiene requires defense in depth. You need controls at multiple layers, and one of the most effective is controlling what exists in your environment in the first place.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">This is not a new or novel idea. </span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">We learned this lesson with package managers, container registries, and API gateways. Allowlists and approved registries prevent unauthorized code and tools from entering your systems, and the same principles should be applied to MCP servers.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">An MCP Registry lets you maintain an allowlist of approved MCP servers in your organization, define which tools are available to which teams or environments, and prevent agents from discovering or using unapproved MCPs.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Combined with runtime hooks, this gives you a strong two-layer model. The registry controls what is allowed, which MCPs and tools exist in your environment, while the hooks control how those tools are used, including policies, context checks, and detections. This applies years of proven runtime security principles to a new attack surface, rather than trying to retrofit network-layer controls that were never designed for this problem.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><h3 aria-level="2"><span data-contrast="auto">Beyond MCP Security – Securing the Entire Agentic Attack Surface</span><span data-ccp-props='{"134245418":true,"134245529":true,"335559738":240,"335559739":240}'> </span></h3><p><span data-contrast="auto">MCP is powerful and here to stay. It deserves a security model that actually matches how agents work in practice.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">MCP Gateways repeat the mistakes of perimeter security by focusing on a single protocol, while agents are not limited to a single use case.  They employ shell commands, native SDKs, database connections, and framework-specific tools. This introduces secret management risks through centralized credential handling, a lack of the full agent and session context needed for effective policy decisions, and creates both a single point of failure and enforcement challenges across distributed environments.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">We do not need to reinvent security models to secure agentic systems in production. Decades of running complex, distributed systems have already taught us what works and which layers are most critical to secure. </span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">Runtime hooks combined with MCP registries. Hooks give you full coverage across all tooling, complete session context for policy decisions, no credential exposure to third parties, no central bottleneck, and easy rollout with no code changes when integrated at the framework level. </span><br><span data-contrast="auto">This, combined with well-maintained registries give you governance and control over which MCPs exist in your environment in the first place.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><p><span data-contrast="auto">The agentic world is evolving too fast to bet on protocol-level controls – secure the agent where it actually runs, not just the protocol it happens to use today.</span><span data-ccp-props='{"335559738":240,"335559739":240}'> </span></p><div class="spu-placeholder" style="display:none"></div><div class="addtoany_share_save_container addtoany_content addtoany_content_bottom"><div class="a2a_kit a2a_kit_size_20 addtoany_list" data-a2a-url="https://securityboulevard.com/2026/03/why-mcp-gateways-are-a-bad-idea-and-what-to-do-instead/" data-a2a-title="Why MCP Gateways are a Bad Idea (and What to Do Instead)   "><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fsecurityboulevard.com%2F2026%2F03%2Fwhy-mcp-gateways-are-a-bad-idea-and-what-to-do-instead%2F&amp;linkname=Why%20MCP%20Gateways%20are%20a%20Bad%20Idea%20%28and%20What%20to%20Do%20Instead%29%C2%A0%20%20%C2%A0" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fsecurityboulevard.com%2F2026%2F03%2Fwhy-mcp-gateways-are-a-bad-idea-and-what-to-do-instead%2F&amp;linkname=Why%20MCP%20Gateways%20are%20a%20Bad%20Idea%20%28and%20What%20to%20Do%20Instead%29%C2%A0%20%20%C2%A0" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fsecurityboulevard.com%2F2026%2F03%2Fwhy-mcp-gateways-are-a-bad-idea-and-what-to-do-instead%2F&amp;linkname=Why%20MCP%20Gateways%20are%20a%20Bad%20Idea%20%28and%20What%20to%20Do%20Instead%29%C2%A0%20%20%C2%A0" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fsecurityboulevard.com%2F2026%2F03%2Fwhy-mcp-gateways-are-a-bad-idea-and-what-to-do-instead%2F&amp;linkname=Why%20MCP%20Gateways%20are%20a%20Bad%20Idea%20%28and%20What%20to%20Do%20Instead%29%C2%A0%20%20%C2%A0" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fsecurityboulevard.com%2F2026%2F03%2Fwhy-mcp-gateways-are-a-bad-idea-and-what-to-do-instead%2F&amp;linkname=Why%20MCP%20Gateways%20are%20a%20Bad%20Idea%20%28and%20What%20to%20Do%20Instead%29%C2%A0%20%20%C2%A0" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share"></a></div></div>