MCP gateway

Last checked · 2 min read

An MCP gateway is a proxy between AI clients and Model Context Protocol servers. Clients connect to the gateway instead of each server; it routes each tool call, decides who may call what, and usually logs the calls. Most gateways see the call and its reply, not what the downstream system committed.

What a gateway does

The Model Context Protocol lets a client such as Claude Code or Cursor start or connect to servers that expose tools. Without a gateway, every client config names every server, and every server keeps its own credentials. A gateway puts one process in the middle. Its usual jobs:

  • Routing. Clients see one endpoint. The gateway forwards each tools/call to the right server and can merge several servers’ tool lists into one.
  • Access rules. Which person, agent or team may call which tool, usually decided by tool name and identity, sometimes by the arguments too.
  • Credentials. The gateway, or the platform behind it, holds each server’s secrets, so they stay out of client config files that get copied around.
  • Isolation. Docker’s MCP Gateway, for example, runs each server in an isolated container with restricted privileges, injects credentials, and logs and traces calls.2
  • Logs. Who called which tool, with which arguments, and what came back.

There are a lot of them: one public list names more than 40 MCP gateway products.3

Gateway, API gateway, MCP server

An API gateway fronts HTTP APIs for any kind of client and deals in routes, keys and rate limits. An MCP gateway speaks the Model Context Protocol, so it sees tool names and the arguments a model chose, which is what a rule about agents needs to read. An MCP server is the process behind both: it holds a credential and does the work.

A gateway doesn’t shrink the server’s credential. A Postgres server that connects as the table owner can still do anything the owner can, whatever the gateway logged on the way in. The credential is the agent’s real permission set; see blast radius.

What a gateway can’t see

A gateway sits on the wire. It sees the request and the reply the server sends back, and nothing after that. If an UPDATE … WHERE id = 42 fires a trigger that changes 300 other rows, the server reports one row, the gateway logs one row, and the database holds 301 changed rows. Reading the system of record afterwards is a separate step.

The MCP specification also says clients must treat tool annotations, such as a hint that a tool only reads, as untrusted unless they come from trusted servers.1 A gateway rule that relies on a server’s own “read-only” label inherits that weakness.

Questions to ask of any gateway

  • Does it decide per call, with the arguments, or only per tool name?
  • When a rule can’t be evaluated, does the call run or stop?
  • Can a person approve one call, and is that approval recorded?
  • Are its logs stored where the agent’s credentials can’t edit them?
  • Does anything compare the result with the system of record?

An example

Put an existing MCP server behind Deedglass's rulessh
deedglass mcp wrap --connector <name> -- <server command>

How Deedglass uses it

Deedglass works as a gateway for the servers you wrap: tools a rule denies are hidden from the client, each call is decided by your rules before it runs, and writes to Postgres are checked against what the database committed, then sealed into a record you can check offline.4

Related on this site

Sources & Reference Citations (4)

Citations
  1. 1MCP specification 2026-07-28: Tools · modelcontextprotocol.io · checked 18 October 2026
  2. 2Docker documentation: MCP Gateway · docs.docker.com · checked 13 October 2026
  3. 3e2b-dev/awesome-mcp-gateways · github.com · checked 13 October 2026
  4. 4Deedglass docs: Govern an MCP server · docs.deedglass.com · checked 14 October 2026

Last checked 18 October 2026. We re-check the glossary every month. If something here is wrong, write to hello@deedglass.com.