An MCP gateway is a runtime control point in front of one or more MCP servers: clients connect to the gateway, then the gateway lists, routes, authorizes and logs tool calls. You need one when multiple agents, teams or upstream systems need the same governed integration surface. If you have one trusted local server and no shared permission or audit requirement, a direct MCP connection is usually simpler.
The Runtime Boundary
The useful definition is request-path based. A gateway is the MCP server your agent actually connects to, even if the work is performed by another MCP server, a database connector, a REST adapter or a file-system integration behind it. The client sends normal MCP messages such as tools/list and tools/call; the gateway decides what to return, where to route the call, which credential to use upstream, and what to record for later review.
That makes it different from a catalog. A registry can help a developer discover that a server exists, but it is not sitting between the agent and the tool invocation. The comparison article on aggregators, gateways and registries is the deeper taxonomy. For this question, the practical test is simpler: if it can deny or rewrite a tool call at execution time, it is acting as a gateway.
MCP makes this boundary visible. Tool-capable servers answer tools/list with tool names, descriptions and input schemas, then accept tools/call with a selected name and arguments. A gateway can keep those protocol messages unchanged for the client while changing the operational reality behind them: many upstreams, one URL, central policy.
What A Gateway Actually Does
At minimum, the gateway owns routing. The client might call github/search_issues, linear/list_projects or postgres/select_orders, but it sends each call to the same MCP endpoint. The gateway maps the source prefix or internal tool identifier to the upstream server or generated connector. That map is also where it can avoid name collisions, because the MCP tools specification notes that tool names are only unique within a single server.
The second job is authorization. A gateway can decide that one API key may list GitHub and Linear tools but not Stripe tools, or that it may call only tools marked read-only. This is more precise than putting a broad upstream token into every developer's local MCP config. With HTTP MCP servers, authorization also has a formal protocol home: protected MCP servers use OAuth-style bearer tokens, discovery metadata and per-request authorization, so a central endpoint can align with the same model instead of inventing a side channel.
The third job is observability. A direct client-to-server setup scatters failures and logs across laptops, agents and vendor dashboards. A gateway can log the caller, source, tool name, arguments shape, duration, result status and upstream error class in one place. That is the foundation for the related audit trail described in audit logging for AI agent tool calls.
Direct Connection Or Gateway
| Situation | Use direct MCP | Use a gateway |
|---|---|---|
| One developer testing a local tool | Yes, a stdio server is fast to add and easy to remove. | Usually unnecessary. |
| Several agents need the same systems | Config drift becomes likely. | One endpoint keeps the client setup stable. |
| Upstream credentials must stay off laptops | Risky unless the server does its own brokered auth. | The gateway can hold or broker upstream credentials. |
| Different keys need different sources | Hard to enforce consistently across clients. | Policy can run before tools/list and tools/call. |
| Tool count is hurting model behavior | Every client needs its own filtering discipline. | The gateway can expose a smaller catalog and reveal more on demand. |
The dividing line is not company size. A two-person team may need a gateway if the agent can refund customers or read private repositories. A larger engineering org may not need one for a throwaway local docs-search server. The question is whether runtime policy, credential custody and repeatable client setup are worth another network hop.
There is also a negative test. If the gateway would only forward one upstream server to one user with the same credential and no additional logging, it is just extra machinery. Keep the direct connection until the operational burden appears.
Client Config Tells The Story
Without a gateway, every client gets a list of individual servers. With a gateway, each client gets one remote MCP server and the gateway expands that into the allowed workspace surface. Claude Code's remote HTTP setup is a good example of the intended shape:
claude mcp add --transport http workspace-tools https://api.example.com/mcp --header "Authorization: Bearer $WORKSPACE_MCP_KEY"Cursor can express the same idea in .cursor/mcp.json or ~/.cursor/mcp.json:
{
"mcpServers": {
"workspace-tools": {
"url": "https://api.example.com/mcp",
"headers": {
"Authorization": "Bearer ${env:WORKSPACE_MCP_KEY}"
}
}
}
}VS Code also supports MCP configuration files. A workspace .vscode/mcp.json uses a top-level servers object, while the portable root .mcp.json format uses mcpServers. A remote endpoint in the VS Code shape looks like this:
{
"servers": {
"workspace-tools": {
"type": "http",
"url": "https://api.example.com/mcp"
}
}
}The important architectural property is that switching clients should not mean rebuilding integrations. If the team moves from Claude Code to Cursor or another MCP-capable client, the target URL and credential model move, while upstream connections remain behind the gateway. The sibling guide on switching agents without rebuilding integrations follows that consequence.
Protocol Details That Matter
The gateway still has to behave like a correct MCP server. For tool discovery, it should return deterministic, caller-appropriate results to tools/list. For invocation, it should accept tools/call with a tool name and arguments, route the call, and return a normal MCP tool result or a clear error. A minimal call path looks like this:
{
"jsonrpc": "2.0",
"id": 10,
"method": "tools/call",
"params": {
"name": "github/search_issues",
"arguments": {
"query": "repo:acme/api is:open label:customer"
}
}
}The transport choice matters because gateways usually want a stable remote URL. MCP defines stdio for a client-launched subprocess and Streamable HTTP where messages are posted to a single endpoint and responses come back as JSON or request-scoped server-sent events. The 2026 stateless core pushes this further: requests carry their own protocol metadata, and HTTP headers can carry method and tool names for routing, metering and authorization.
Those details are why a gateway is more than a reverse proxy. It must understand the tool list, preserve enough source identity for policy, handle upstream timeouts, and avoid lying to the model. If an upstream server is unreachable, the gateway should surface that condition rather than silently dropping the tools or returning an unrelated failure.
Where SPYN3 fits
SPYN3 is an MCP aggregator you do not have to run. Systems that speak MCP are federated through it, and Postgres, REST APIs and Google Drive get read-only tools generated from their connectors. All of it reaches the agent through one endpoint per workspace, foldered by source. Whether you need one is the question this article answers. If you only ever use one MCP server from one client, you probably do not.
A Short Adoption Checklist
- Inventory the MCP servers and non-MCP systems the agent needs, then group them by source owner rather than by client.
- Decide which calls must be read-only, which may write, and which sources each key should see.
- Choose a namespacing rule before connecting duplicate tool names such as
search,getorlist. - Define failure behavior for unreachable upstreams, authorization denials and upstream tool errors.
- Put the gateway URL into one client first, compare the resulting
tools/listagainst the intended policy, then add the same endpoint to the next client.
The payoff is not that every MCP deployment needs a middle layer. The payoff is that when you do need shared governance, the gateway becomes the one place to change policy, rotate credentials, shorten the tool list and inspect what agents actually did.
Built for the next step
Put the policy at the endpoint
Use one MCP endpoint per workspace instead of distributing credentials and tool policy across every agent.
Why one endpointSPYN3 is a consolidated MCP layer: one hosted endpoint in front of every system you connect — MCP servers, Postgres, REST APIs, Google Drive — with tools foldered by source and read/write permissions per key. Switching agents means moving one URL. Free plan available; current capabilities are documented on the product facts page.
Sources
- MCP specification: tools — tool discovery, invocation and security considerations. Verified 14 Oct 2026
- MCP specification: transports — stdio and Streamable HTTP transport boundaries. Verified 14 Oct 2026
- MCP specification: authorization — OAuth-based authorization for HTTP MCP servers. Verified 14 Oct 2026
- MCP project: 2026-07-28 release — stateless core, discovery, authorization and transition guidance. Verified 14 Oct 2026
- Anthropic docs: Claude Code MCP setup — Claude Code MCP commands, scopes, transports and JSON configuration. Verified 14 Oct 2026
- Cursor documentation: Model Context Protocol — Cursor MCP transports, OAuth and configuration locations. Verified 14 Oct 2026
- VS Code documentation: add and manage MCP servers — VS Code MCP configuration, trust and logging behavior. Verified 14 Oct 2026
