Model Context Protocol
MCP gateway
An MCP gateway is a single MCP endpoint that sits between AI agents and many systems, holding the credentials and enforcing permissions, limits and logging on every tool call that passes through it.
What it is
An MCP gateway is an intermediary. Agents connect to the gateway as one MCP server; the gateway reaches the systems behind it. The MCP security guidance uses the term "MCP proxy server" for a server that connects clients to third-party APIs, and the OWASP MCP cheat sheet recommends using an MCP proxy or gateway to enforce isolation policies between servers.
Gateways come in two broad shapes. Some aggregate other MCP servers and relay their tools. Others call the vendors' own APIs directly and present them as tools.
Why it matters
Without a gateway, every agent connects to every system separately. Each connection has its own credential, its own idea of permissions and its own log, and nobody can answer "what did our agents do yesterday, and what did it cost?" A gateway gives one place to hold secrets, decide what each agent may do, stop runaway spending and keep the record.
How it works
- The agent authenticates to the gateway with its own credential, never a vendor's.
- For each call, the gateway resolves who is calling and checks the call against that caller's policy.
- It uses its own stored credential for the vendor; the MCP specification forbids passing the client's token through to the upstream API.
- It applies rate limits and budgets, sends the request, records the outcome and returns the result.
Example
A managed service provider gives its triage agent one gateway URL. Behind it are the PSA, the RMM, Microsoft 365 and the accounting system. The agent's key may read everything and create tickets, but resetting a password waits for an engineer's approval.
Common pitfalls
- A relay with no policy. A gateway that only multiplexes tools hands the agent hundreds of definitions and every permission of every credential behind it.
- One shared credential. If every agent uses the same upstream token, there is no least privilege and no per-agent record.
- The confused deputy. A proxy that uses a static OAuth client ID with a third-party authorisation server must get the person's consent for each dynamically registered client, as the MCP security guidance requires.
- Tool overload. Relaying every tool of every server recreates the problem the gateway was meant to solve. See tool overload.
How actionlake handles it
As an MCP gateway, actionlake calls each vendor's API directly through a signed service file. An agent holds an actionlake key, never a vendor token; the credentials sit in a vault. Every call passes the same checks: the key's scope, its spending cap (refused before the request is sent), any approval rule, then the vendor's rate limit. The outcome goes into a hash-chained ledger with the agent's stated reason. The agent sees eight tools whether one system is connected or a hundred, and ask can join across systems in one call. See the platform and the trust page.
Questions
What is the difference between an MCP server and an MCP gateway?
An MCP server usually fronts one system. An MCP gateway is an MCP server that fronts many systems and adds central credentials, policy, limits and logging across all of them.
Does an MCP gateway add latency?
It adds one hop, and a cache can remove whole calls. Whether the net effect is faster or slower depends on how often agents repeat the same reads.
Is an MCP gateway the same as an API gateway?
They overlap. An API gateway routes and limits HTTP traffic for services you own. An MCP gateway speaks MCP to agents, holds credentials for vendors you do not own, and decides per tool call what an agent may do.
Related terms
- MCP serverAn MCP server is a program that offers tools, resources and prompts to AI applications over the Model Context Protocol, usually by wrapping one system's API, such as a ticket desk or an accounting ledger.
- Remote MCP serverA remote MCP server runs on the internet rather than on your computer, and AI clients reach it over HTTPS using the Streamable HTTP transport, usually after an OAuth sign-in.
- Credential vaultA credential vault for AI agents stores the API keys and OAuth tokens for business systems encrypted outside the agent, and uses them on the agent's behalf only at the moment of each call, so the model, its prompt and its logs never contain a vendor secret.
- AI agent permissionsAI agent permissions are the rules that decide which systems, actions and data an agent's credential may reach, and least privilege for agents means granting only the actions a task needs and enforcing that limit outside the model.
- AI agent audit logAn AI agent audit log is a record of every action an agent took: which credential ran it, what it did, in which system, with what outcome and cost, and why, kept so a person can reconstruct and verify events later.
- Tool overloadTool overload is the loss of accuracy and context space that happens when an AI model is given more tool definitions than it can reliably choose between; Anthropic's documentation says Claude's tool selection degrades once more than 30 to 50 tools are available.
Sources
Connect an agent. Start free.
100,000 calls free every month. No card. Hard caps on every key.