Skip to content

MCP gateway ​

A service that sits between MCP clientsMCP client: The part of an AI application that holds one connection to one MCP server: it negotiates the protocol version and capabilities, then sends that server's requests and receives its replies. and MCP tools and serves them through one endpoint, adding per-client credentials, access rules, limits and a log of every call.

Without a gateway, every client connects to every server directly. Each IDE, assistant and agent holds its own copy of each server's credentials, and nobody has one view of which tool was called, by whom, with what arguments. A gateway turns that many-to-many wiring into one place to govern it. To a client, the gateway is an ordinary MCP server; to the servers behind it, the gateway is the client.

What a gateway usually adds ​

  • Per-client credentials. Each client gets its own token, which can be revoked without touching the others. Upstream server secrets stay in the gateway.
  • A narrower tool list. A client sees only the tools it needs, not everything every server offers.
  • Rules on calls. Allow, deny or hold a call for approval, by tool, client or arguments.
  • Limits and records. Rate limits, spend caps and a log of each call.

Example ​

A team gives its coding agents one endpoint with search_docs, read_ticket and a deploy workflow. The deploy tool needs an approval; the agents never see the database admin tools the same server also offers.

Common confusion ​

An MCP gateway governs tool calls. An LLM gatewayLLM gateway: A service between applications and model providers that gives them one API endpoint and adds per-client keys, routing, spend limits, rate limits and checks on prompts and answers. governs model calls (prompts and completions to model providers). They often sit side by side and can share client identities, but they inspect different traffic. A gateway must also avoid acting as a confused deputyConfused deputy: A program that holds more authority than its caller and is tricked into using that authority on the caller's behalf, doing something the caller could not do directly.: the MCP security best practices forbid a server from passing a client's token through to a downstream API.

In L2M ​

The MCP gateway serves workflows and registered servers' tools in toolsetsToolset: A named, curated group of tools, drawn from several MCP servers and workflows, served at one MCP endpoint so each client sees only the tools it needs. at /mcp/<slug>, each client with its own token. Optionally, add tool policy rules, budgets and rate limits. See also Run a self-hosted MCP gateway.

Further reading ​

This website (not the L2M product) uses Google Analytics, only after you accept cookies. Cookie settings