Glossary

MCP gateway

An MCP gateway is a proxy that sits between AI agents and the Model Context Protocol servers they use for tools and data. Agents connect to one gateway instead of to every server, and the gateway handles sign-in, permissions, logging and checks on what tools say and return. It's a deployment pattern, not a role defined in the MCP spec.

The pattern exists because MCP made tool connections easy enough that they now happen everywhere. Every agent linked to every server needs credentials, permissions and an audit trail, and the pairs add up fast. Four agents talking to ten servers means 40 separate connections to secure, and any one of them could expose a refund tool to the wrong agent.

How an MCP gateway works

An agent sends its MCP requests to the gateway as if the gateway were the server. The gateway checks who's asking, decides whether that caller may use the tool, forwards the call to the right backend and logs the result.

Agents sign in to the gateway, not to each server. Backend keys are stored in the gateway and added only when a call is forwarded, so they never sit in an agent's config file. Revoking access once revokes it everywhere.

The gateway is also a natural place to enforce token rules. The MCP security best practices explicitly forbid token passthrough, where a server accepts a token that wasn't issued to it and forwards it downstream. A gateway can check that every token was issued for the server it's being used on.

Gateways also control what each agent can see. Tools are scoped by agent, tenant or environment, and with a deny-by-default allow-list, a newly added tool can't be called until someone approves it. Per-agent rate limits stop a looping agent from hammering a backend system.

MCP gateway vs AI gateway

The two share an architecture but carry different traffic. An AI gateway fronts model calls. It routes requests across model providers, manages provider keys, handles failover and tracks token spend. An MCP gateway fronts tool calls.

One governs what the agent thinks with. The other governs what it acts on.

A single support turn can pass through both. The prompt goes through the AI gateway to a model, the model decides to look up an order, and that lookup goes through the MCP gateway to the order system. Run separately, the two produce separate logs and neither sees the whole exchange. A shared identity layer lets one trace connect the model call to the tool call it triggered.

How a gateway helps with tool poisoning and context bloat

MCP tool poisoning hides instructions inside a tool's description or metadata, where the model reads them but people rarely do. The gateway sits where tool definitions enter the system, so it can inspect them when a server registers.

It can also catch a rug pull, where a tool looks fine at approval and changes later. The OWASP MCP Security Cheat Sheet recommends pinning reviewed tool definitions with cryptographic hashes and requiring a new review when they change. It also says to treat every tool response as untrusted data, even from approved servers.

MCP context bloat is a quieter problem. Each connected server adds tool definitions to the agent's context, and an agent wired to many servers can spend a big share of it on tools it won't use. A gateway that shows each agent only the tools its task needs cuts that overhead.

Common risks with MCP gateways

A gateway adds a hop to every tool call. Each call picks up some latency, and an outage at the gateway takes down every agent behind it. It needs the same redundancy as any other production system, and voice deployments need extra care with latency.

Inspection is also weaker than it looks. Matching phrases like "ignore previous instructions" catches crude attacks and misses careful ones. A gateway that logs calls without inspecting what comes back gives you an audit trail, not a defense.

Finally, a gateway concentrates trust. It holds credentials for every backend, so breaking into it is worth more to an attacker than breaking into any single server. Tight access to the gateway itself, short-lived credentials and narrow backend scopes keep that from becoming a liability.

What an MCP gateway means for customer service

For support teams, the gateway is where tool rules become concrete. It decides which agents can issue refunds, which can only read order status, and which third-party servers are allowed at all.

A useful first step is an inventory of every MCP server agents reach today, with an owner for each and a note on whether it changes data or only reads it. Tools that write data, like refunds, cancellations and account edits, should get the tightest scopes first. Read-only lookups can follow.

As the number of agents and servers grows, the gateway is what keeps that work manageable. It's one policy surface to maintain instead of dozens of separate connections, each with its own keys and its own gaps.

For a deeper dive, download Decagon's guide to agentic AI for customer experience.

Deliver the concierge experiences your customers deserve

Get a demo