# What Is an MCP Gateway? Definition and When You Need One

> **Answer.** An MCP gateway is a single control point that sits between your AI clients and every MCP server they call. It handles authentication, access control, and logging once, centrally, instead of once per tool and per client. You need one when more than one team or more than one AI client needs the same integrations.

- Question: what is an MCP gateway
- Canonical: https://metorial.com/answers/what-is-an-mcp-gateway
- Last updated: 2026-08-25
- Reviewed by: Karim Rahme, Metorial

---

The [Model Context Protocol](https://modelcontextprotocol.io) standardizes how an AI client calls a tool. It does not say who is allowed to make the call, whose credentials it runs under, or where the record of it goes. A gateway is the layer that answers those three questions for every server at once.

| If your situation is | Then |
| --- | --- |
| One developer, one AI client, two or three MCP servers | You do not need a gateway. Configure the servers directly. |
| A team sharing servers, each on a different AI client | You need a gateway for one shared configuration. |
| Non-engineers need tool access | You need a gateway with identity-based access, not config files. |
| Security has to approve AI tool use | You need a gateway that records every call and who it ran as. |
| Data residency or on-prem requirements | You need a gateway you can self-host. |

## What does an MCP gateway actually do?

Four jobs, all of which you would otherwise build once per integration.

**Authentication.** Each MCP server needs credentials for the system behind it. A gateway runs the OAuth flow per user, stores and refreshes the tokens, and injects them at call time, so no API key ends up in a config file on a laptop.

**Access control.** Policies decide which users and which agents can reach which tools. Bound to your identity provider, this means a new hire gets the right tools on day one and loses them on their last, without anyone editing a server list.

**A stable endpoint.** Clients point at one URL instead of a list of servers. Adding a server or moving one does not require reconfiguring every client, and switching from Claude to Cursor does not mean rebuilding the setup.

**Records.** Every tool call is logged with its arguments, its result, and the identity it ran as. This is the artifact a security review asks for, and it is also what you read when an agent does the wrong thing.

## How is a gateway different from an MCP server?

An MCP server exposes one system: a GitHub server exposes issues and pull requests, a Salesforce server exposes records. A gateway sits above many servers and handles what all of them have in common.

The distinction matters because the two are often confused in vendor material. If a product connects to one system, it is a server. If it sits in front of servers and applies policy to them, it is a gateway.

## When do you actually need one?

The threshold is not a company size, it is a second of something. A second AI client, a second team, or a second person who needs the same integration.

Up to that point, direct configuration is genuinely simpler. Past it, every integration has to be set up once per person and per client, credentials get copied between people to save time, and no single place can answer which agent did what. Those three problems arrive together, and they are what a gateway exists to prevent.

## Can you build a gateway yourself?

Yes, and the first version is not hard. The cost is in what follows: token refresh for every provider, per-user credential isolation, policy evaluation on the call path, an audit log that holds up under review, and keeping pace with MCP as it changes.

Build it if agent infrastructure is your product. Buy it if agent infrastructure is what your product needs in order to work.

## What should you compare when picking one?

- **Deployment model.** Hosted, VPC, on-prem, or air-gapped. If you are in a regulated industry, this decides the shortlist before anything else does.
- **Identity integration.** Does it bind to your SSO and groups, or does it maintain its own user list that someone has to keep in sync?
- **Who can use it.** Engineers only, or can someone in support or operations get access without a code repository? This is the difference between AI reaching twenty people and two hundred.
- **What is recorded.** Whether the log captures arguments and results, and whether it names the user identity the call ran as.
- **Catalog.** How many integrations exist already, and how hard it is to add one that does not.

## Where does Metorial fit?

[Metorial](https://metorial.com/) is an MCP gateway built around the case where AI has to reach past engineering. Employees sign in through your existing identity provider and get the tools the company approved, with no API key to copy. [Magic MCP](https://metorial.com/magic-mcp) gives every integration one URL that works the same in Claude, Cursor, Codex, or Copilot. [Access control](https://metorial.com/access-control) binds tools to roles and groups, [Tracing](https://metorial.com/tracing) records every session, and [Protoguard](https://metorial.com/protoguard) checks calls for prompt injection. It is [SOC 2 Type II and GDPR compliant](https://metorial.com/security), open core, and available on-prem.

Where it is weaker: for a security-only rollout that never leaves engineering, a gateway specialized in agent authorization will go deeper on that one axis. If cutting model spend is the main goal, a cost-routing gateway will beat it on that number. We compare those tradeoffs honestly in [Best Enterprise MCP Gateways](https://metorial.com/comparisons/best-enterprise-ai-gateways-2026).

## Next step

Browse the [1,000+ integrations](https://metorial.com/integrations) available as MCP servers, or connect your first one from the command line:

```sh
npm install -g @metorial/cli
metorial login
metorial integrations setup github
```

The [Dev plan](https://metorial.com/pricing) is free and needs no sales conversation.

## Frequently asked questions

### Is an MCP gateway the same as an API gateway?

They solve the same class of problem at different layers. An API gateway fronts HTTP endpoints and routes by path and method. An MCP gateway fronts tools that a model chooses at runtime, so it also has to handle per-user credentials and record which identity a call ran as.

### Do I need an MCP gateway for a single AI client?

Usually not. One developer with one client and a few servers is better off configuring them directly. The gateway earns its place when a second client or a second person needs the same integrations, because that is when per-person setup and shared credentials start.

### Can an MCP gateway be self-hosted?

Depending on the vendor. Metorial is open core and can run on your own infrastructure or on-prem. If data residency is a hard requirement, confirm hosted, VPC, on-prem, and air-gapped options before shortlisting anything.

### Does an MCP gateway slow down tool calls?

It adds one network hop plus policy evaluation, typically a few milliseconds. That is small next to the model inference and the upstream API call in the same request, and it removes the per-client credential lookups a direct setup repeats.

### What happens to my existing MCP servers?

They keep working. A gateway registers servers you already run, including custom and remote ones, and puts authentication, policy, and logging in front of them. You do not rewrite a server to put it behind a gateway.

## Sources

1. [Model Context Protocol specification](https://modelcontextprotocol.io)
2. [Metorial documentation: Concepts, Providers](https://metorial.com/docs/concepts-providers)
3. [Metorial open source core on GitHub](https://github.com/metorial/metorial)

---

Other Metorial answers: https://metorial.com/answers/llms.txt
Every answer in one document: https://metorial.com/answers/llms-full.txt
