Concept

What is an MCP gateway?

An MCP gateway is a service that sits between AI models and Model Context Protocol (MCP) tool servers. A team registers each MCP server once at the gateway, which then stores the server's credentials, discovers its tools, controls which tools models are allowed to call and records each tool call. Applications reach every registered tool through one endpoint, so they do not have to connect to each server or hold its credentials themselves.

Last updated

Key facts

  • An MCP gateway is a control point between models and MCP tool servers.
  • It centralizes credentials, tool selection, access scoping and logging for tool calls.
  • An MCP gateway is not an MCP server: servers provide the tools, the gateway governs access to them.
  • FastRouter's MCP Gateway supports Streamable HTTP and SSE transports and three authentication methods: none, static header and OAuth 2.0.

What does an MCP gateway do?

The Model Context Protocol is an open protocol that lets AI applications call external tools and data sources through servers that describe the tools they offer. An MCP gateway is a single place to register those servers, hold their credentials and decide which of their tools each model request may use.

Without a gateway, each application connects to each MCP server directly and manages that server's authentication itself. With a gateway, the application names the servers it wants on a request, and the gateway handles the connection, the credentials and the list of permitted tools.

Why put a gateway between models and MCP servers?

A gateway turns tool access into something that is configured and reviewed centrally. Tools let a model take real actions in other systems, so the credentials behind them and the set of operations a model can reach need the same controls as any other production access.

  • Credentials: secrets are stored once at the gateway and added to tool calls there, so they do not need to appear in prompts, application code or model responses.
  • Tool governance: an administrator chooses which tools are exposed and can leave destructive operations out.
  • Scoping: a server can be limited to the teams or projects that should use it.
  • Observability: tool calls pass through one place, where they can be logged and traced.

How does an MCP gateway compare with connecting to MCP servers directly?

Direct connections are simple for one application and one or two servers. As the number of applications, servers and teams grows, each direct connection repeats the same credential handling and tool configuration. A gateway moves that work to one shared layer, at the cost of adding a component to operate or buy.

Direct MCP connections compared with an MCP gateway
AspectDirect connectionsThrough an MCP gateway
CredentialsHeld and managed by each applicationStored once at the gateway and injected per call
Tool exposureDecided separately in each applicationSelected centrally for each server
Access scopingDepends on each application's own rulesSet per server, for example by project
Adding or changing a serverEach application is updatedThe server is registered or edited once
Visibility of tool callsSpread across application logsRecorded in one place

What should you check when evaluating an MCP gateway?

Check the parts that decide whether the gateway can reach your servers and whether it controls them tightly enough: supported transports, supported authentication methods, how tools are selected, how access is scoped, whether the gateway can run the tool-call loop itself and what it records about each call.

  • Transports and authentication methods that match the MCP servers you plan to connect.
  • Whether credentials are encrypted at rest and kept out of model inputs and outputs.
  • Per-tool selection, including a way to exclude destructive operations.
  • Limits on automatic tool execution, so agent loops stay bounded.

How FastRouter's MCP Gateway works

FastRouter's MCP Gateway lets you register external MCP tool servers once and expose their tools to any model routed through FastRouter. The gateway handles credential injection, tool discovery and optional auto-execution, and requests use it through an mcp object on the chat completions API.

  • Transports: Streamable HTTP, following the MCP 2025-03-26 specification, and Server-Sent Events (SSE).
  • Authentication: no authentication, a static header, or OAuth 2.0. Static headers and OAuth client secrets are encrypted and stored server-side, and OAuth access tokens are refreshed by the gateway.
  • Credentials are injected into each tool call at request time. Models receive only tool results.
  • Tool selection: FastRouter enumerates a server's tools and you choose which ones to expose.
  • Scoping: each server can be restricted to specific projects or made available to all projects.
  • Auto-execution: with auto_execute_tools set to true, the gateway runs the tool-call loop. It requires stream: false, and rounds are bounded by max_tool_rounds and hard-capped at 5.
  • Tools are namespaced as {server-name}__{tool-name}, and MCP calls appear in Logs & Traces.
  • The number of MCP servers depends on the plan: up to 3 on Starter, 20 on Pro, 100 on Business and unlimited on Enterprise, as listed on the pricing page.

Sources

Where the statements about FastRouter on this page come from.

FAQ

Common questions

No. An MCP server exposes tools, such as actions in a code host or an issue tracker. An MCP gateway sits in front of one or more MCP servers and manages how models reach them: it stores credentials, filters tools and records calls.

They should not. A gateway stores credentials and adds them to tool calls itself. In FastRouter's MCP Gateway, static headers and OAuth client secrets are encrypted server-side and injected at request time, and models only receive tool results.

It supports two Model Context Protocol transports: Streamable HTTP, which follows the MCP 2025-03-26 specification, and Server-Sent Events (SSE). The transport is chosen when a server is registered, so both kinds of server connect through the same gateway.

When auto_execute_tools is set to true, the gateway runs the tool-call loop across multiple rounds. Rounds are bounded by max_tool_rounds and hard-capped at 5, and auto-execution requires stream: false so the complete result is returned in a single response.

Try it on your own traffic

Point your existing OpenAI-compatible client at FastRouter and send a request. Free to start, no credit card required.