What is an MCP gateway?
On this page
An MCP gateway is a control point between AI agents and the MCP servers that give them tools. Every tool call passes through it. The gateway checks which agent is calling and whether that agent may use that tool with those arguments. It then allows the call, blocks it or holds it for approval. It logs each decision, which gives you one audit trail for every tool call across every MCP server.
Key takeaways
- An MCP gateway decides which agent may call which tool on your MCP servers, and with which arguments.
- Every tool call passes through it, so it is where policy checks and audit records belong.
- Agents in production usually need an AI gateway for model calls and an MCP gateway for tool calls.
- Check how a gateway handles credentials: the MCP specification forbids passing a caller's token through to the server.
An MCP gateway sits on the path of every tool call
The Model Context Protocol (MCP) lets an agent find tools on an MCP server and call them. Without a gateway, each agent connects straight to each server, and every server handles its own sign-in, logs and rules.
- Allowed by policyAllowForward to the serverUses a credential issued for that one server.
- High-impact callHoldA person approves firstDeletes and payments wait for a named approver.
- Outside policyDenyReturn an errorThe agent gets a refusal it can report.
The gateway records every decision, with the arguments and the result.
Figure 1 as text
- The agent calls a tool. The call goes to the gateway, never straight to the MCP server.
- The gateway identifies the agent and applies policy to this tool with these arguments.
- If policy allows the call, the gateway forwards it using a credential issued for that one server.
- If the call is high impact, such as a delete or a payment, it waits for a named person to approve it.
- If the call is outside policy, the gateway denies it and returns an error to the agent.
- The gateway records every decision with the arguments and the result.
A gateway gives agents one place to connect. It routes each call to the right server and applies one set of rules. On each call, a gateway typically does five things.
- Identifies the agent making the call, separately from the user it acts for.
- Checks policy on the tool and on the arguments.
- Holds high-impact calls, such as deletes and payments, for a person to approve.
- Forwards the call with a credential issued for that specific server.
- Logs the decision, the arguments and the result.
Write policy at the level of arguments. A rule that only names the database tool is too coarse. A rule such as "this agent may run read queries on the orders table" keeps a bad prompt from turning into a dropped table.
The gateway applies the same principle as a check at the agent runtime: the rule sits outside the model, so the model cannot talk its way past it.
MCP gateway vs MCP server: one exposes tools, the other decides on calls
An MCP server wraps one system, such as a ticketing tool or a database, and exposes its actions as tools. An MCP gateway sits in front of many servers and governs the traffic to all of them.
| MCP server | MCP gateway | |
|---|---|---|
| Job | Exposes tools from one system | Governs calls to many servers |
| Who runs it | The system owner or a vendor | Your platform or security team |
| Decides | What each tool can do | Which agent may call it, with which arguments |
| Logs | Calls to that one server | Every call, across every server |
The MCP specification also shapes how a gateway handles credentials. Under the current authorization specification (version 2026-07-28), an MCP server must validate that each access token was issued specifically for it, and must not accept or pass on any other token. A gateway therefore needs a credential for each downstream server, and should log both who called and which credential it used.
API, AI, LLM and MCP gateways each see different traffic
Vendors use these names loosely, so compare them by the traffic each one actually sees.
| Gateway | Sits between | Sees | Typical controls |
|---|---|---|---|
| API gateway | Clients and HTTP services | Requests, by endpoint | Sign-in, rate limits, routing |
| AI gateway or LLM gateway | Applications and model providers | Prompts and model responses | Provider keys, cost tracking, prompt filtering |
| MCP gateway | Agents and MCP servers | Tool calls and their arguments | Per-agent tool policy, approvals, audit records |
| Agent gateway | Agents, tools and other agents | Depends on the product | Check which paths it covers |
An API gateway routes an HTTP request by its endpoint. An MCP gateway reads the MCP message itself, so it knows which tool the agent asked for and with which arguments, and it can decide on that.
An agent that talks to a model and to tools crosses two of these paths. A model gateway on its own never sees the tool call that deletes a record.
Choosing an MCP gateway comes down to whose credential reaches the server
The MCP security best practices describe the failure to design against. Say a gateway forwards a user's broad token to every server behind it. An agent reads a poisoned document and calls a delete tool. The server sees a valid token, runs the delete, and logs the user as the one who acted. The specification calls this a confused deputy problem and forbids token passthrough.
So check these points when you choose or build a gateway.
- It identifies the calling agent separately from the user the agent acts for.
- It uses a credential issued for each downstream server, and never forwards the caller's token.
- Its policy checks arguments as well as tool names.
- It can hold a call until a person approves it.
- It alerts you when an approved server changes a tool's name, description or schema. Tool poisoning, where an attacker alters a tool's descriptor, sits under ASI02 in the OWASP Top 10 for Agentic Applications.
- It runs inside your own environment, so tool-call records stay with you.
Moring AI governs this path through its AI Control Plane. The control plane sets which MCP tools and servers each agent can reach, checks every call before it runs, holds high-impact calls for approval and keeps an audit record of each run.
Whichever gateway you pick, ask one question first: when an agent calls a tool, whose credential reaches the server?
Frequently asked questions
What is an MCP gateway?
An MCP gateway is a control point between AI agents and MCP servers. Every tool call passes through it, and the gateway decides whether to allow the call, block it or hold it for approval, based on the calling agent, the tool and the arguments. An MCP gateway also logs every decision, which gives one audit trail across all MCP servers.
What is the difference between an MCP server and an MCP gateway?
An MCP server wraps one system, such as a ticketing tool, and exposes its actions as tools. An MCP gateway sits in front of many MCP servers and decides which agents may call which tools, with which arguments. Teams usually run one MCP server per system and one MCP gateway in front of all of them.
How does an MCP gateway create an audit trail for every tool call?
Every tool call passes through the MCP gateway, so the gateway can write one record per call. A useful record holds the agent's identity, the user it acted for, the tool, the arguments, the policy decision, any approval and the result. Because all servers sit behind the same gateway, the records share one format and one place.
Do I need an MCP gateway if I already have an AI gateway?
Usually yes, if your agents use tools. An AI gateway in front of model providers sees prompts and model responses. It never sees the tool call an agent makes after the model answers, such as a delete or a payment. An MCP gateway covers that second path, so agents that act in production typically need both.
Is an MCP gateway the same as an API gateway?
An MCP gateway and an API gateway do different jobs. An API gateway routes HTTP requests by endpoint and handles sign-in and rate limits. An MCP gateway reads each MCP message, so it knows which tool an agent asked for and with which arguments, and can apply policy and approvals to that specific call. Many teams run both.
How do MCP gateways compare on policy enforcement and audit?
Compare MCP gateways on six points: whether each one identifies the agent separately from the user, checks arguments as well as tool names, can hold a call for approval, uses a credential per server instead of passing tokens through, records enough detail per call, and runs inside your own environment.
Should you build, buy or self-host an MCP gateway?
Build an MCP gateway only if a platform team can keep it current with the MCP specification, which has had several versions since 2025, and run it with the uptime your agents need. Otherwise adopt an existing one and judge it on credential handling, argument-level policy, approvals and tool-change alerts. Self-hosting it inside your own environment keeps tool-call records under your control.
How does Moring AI govern MCP tool calls?
Moring AI governs MCP tool calls through its AI Control Plane, deployed in your cloud alongside your existing identity and access systems. The control plane decides which MCP servers and tools each agent may reach, runs a policy check on every call before it executes, can hold high-impact calls for a person's approval, and keeps an audit record of each run.
Related reading
Sources
- Model Context Protocol: Authorization specification, version 2026-07-28. Token audience validation; servers must not accept or transit other tokens.
- Model Context Protocol: Security Best Practices, version 2026-07-28. Confused deputy and token passthrough.
- OWASP GenAI Security Project: ASI02 Tool Misuse and Exploitation, tool poisoning, updated 28 October 2026.