An MCP gateway sits between your AI agent and the MCP servers it talks to. It centralizes routing, access control, and (depending on the gateway) content inspection. Some gateways only handle routing and auth. Others also scan tool calls and responses for security threats. The term covers a range of products with different depth.

Without one, your agent talks directly to MCP servers with no inspection. Tool descriptions could contain hidden instructions. Tool arguments could carry your API keys. Responses could inject new prompts into your agent’s context. No log, no scan, no enforcement point.

What an MCP gateway actually does

MCP servers expose tools, resources, and prompts to AI agents. The agent calls tools/list to discover what’s available, then invokes tools by name with JSON arguments. The server responds with results.

A gateway intercepts this entire conversation:

Outbound (agent to server):

Inbound (server to agent):

Discovery (tools/list):

MCP gateway vs MCP proxy

These terms overlap. The industry hasn’t settled on standard definitions yet. Here’s how they tend to differ in practice:

MCP GatewayMCP Proxy
Primary jobRouting, access control, policyContent inspection, DLP, injection scanning
Multi-serverRoutes to multiple backendsUsually wraps a single server
ExamplesDocker MCP Gateway, agentgateway, RunlayerPipelock MCP proxy, Promptfoo MCP proxy

Pipelock does both. It routes MCP traffic through a scanning proxy that handles tool description inspection, argument DLP, response injection scanning, and access control in one binary. The distinction between “gateway” and “proxy” matters less than what the tool actually scans.

What to look for

Not all MCP gateways inspect the same things. Some only do access control (allow/deny tool calls). Some only do routing. Here’s what actually matters for security:

Tool description scanning: Does it check tools/list responses for embedded instructions? This is the tool poisoning attack surface. Hidden instructions in tool descriptions, parameter names, default values, and enum options can hijack agent behavior before any tool is called.

Bidirectional content inspection: Does it scan both directions? Outbound (arguments) for secrets, inbound (responses) for injection. Many gateways only inspect one direction.

Encoding evasion: Does it handle base64, hex, URL encoding, Unicode tricks? Attackers encode payloads to bypass pattern matching. A gateway that only scans plaintext misses encoded secrets.

Session awareness: Does it track changes across a session? A rug-pull attack sends clean descriptions initially, then swaps in poisoned versions after the agent trusts the tool. Session-aware gateways detect this.

Protocol coverage: Does it only handle MCP, or does it also cover HTTP and WebSocket? Agents don’t just use MCP. They make HTTP requests, fetch web pages, call REST APIs. An MCP-only gateway leaves HTTP traffic unscanned.

How Pipelock handles MCP

Pipelock wraps MCP servers with a scanning proxy. One command:

pipelock mcp proxy --config pipelock.yaml -- npx @modelcontextprotocol/server-filesystem /tmp

This starts the MCP server and routes all stdio traffic through Pipelock’s scanner. The scanner checks:

For HTTP-based MCP servers (SSE/Streamable HTTP):

pipelock mcp proxy --config pipelock.yaml --upstream http://localhost:3000/mcp

Same scanning, different transport. The config file controls domain allowlists, DLP sensitivity, and block/warn behavior.

MCP gateways in the market

The space is moving fast. As of April 2026:

For a detailed comparison of scanning depth vs container isolation, see Pipelock vs Docker MCP Gateway.

Further reading

Ready to validate your deployment?