MCP gateway: one connection for every MCP server your team uses
Short answer: an MCP gateway is one MCP server your agents connect to that fronts every other remote MCP server your team uses. With swarmvia, each server is an MCP source: swarmvia holds its token or OAuth connection, filters its tools, limits load, and logs every call. Agents add one URL, https://swarmvia.com/mcp.
Every remote MCP server your team adds lives in someone's harness config:
.cursor/mcp.json, Claude Code, VS Code, Codex. Each one carries its own
token or OAuth sign-in, on each laptop. Nobody can say which agents reach
Sentry or Linear, which tools they may call, or who called what.
An MCP gateway puts those servers behind one connection. With swarmvia, you add
each remote MCP server as an MCP source. Your agents add one URL,
https://swarmvia.com/mcp, and reach every server your team has approved
through it.
The gateway is one part of keeping secrets away from agents. For database passwords and API keys too, see How to stop sharing credentials with AI agents.
What does an MCP gateway do?
- Holds the credential. swarmvia is the server's MCP client. The token or OAuth connection stays in swarmvia, never in a config file or the chat.
- Filters tools. The source page lists the server's tools, grouped into Read and Write. Uncheck a tool and it is neither listed nor callable; a call to it is refused before it reaches the server.
- Decides who sees which server. Groups control who can see each source, and each agent's grant controls which sources it may use.
- Limits load. Every tool call is admitted against the source's concurrency limit, so a burst of agents cannot flood a vendor's API.
- Logs every call. The access log records each call and who made it, even when everyone shares one connection.
Set it up
1. Create an MCP source
Go to Sources → New source, choose MCP server, enter the server's URL, and choose Check. swarmvia asks the server what it needs, the way an MCP client does:
| The server answers | What happens |
|---|---|
| A result with no token | Nothing to connect. The source is ready. |
401 with OAuth metadata |
You connect once with OAuth. |
401 with no OAuth metadata |
Paste a static token on the source page. |
Some servers, such as GitHub's, need an OAuth app you register with the provider. The dialog shows the redirect URI and asks for the app's client ID and secret.
2. Choose whose account it uses
For an OAuth server, pick one:
- One shared connection. You sign in once and every caller acts as that account. The log still records who called.
- Each member's own account. Every member connects their own account from the source page, and their calls act as them.
3. Pick the tools
Uncheck anything agents should not call. Write tools only reach an agent when they are checked. You change this on the source page; nobody reinstalls a connector.
4. Connect your agents once
Claude Code:
claude mcp add --transport http swarmvia https://swarmvia.com/mcpCursor, VS Code, Codex, and Claude.ai take the same URL. See
Connect your agent. The agent finds a server with
list_sources or find_sources, lists its tools with source_list_tools, and runs
one with source_call_tool.
Move the servers you already have
Ask your assistant for the migrate_mcp prompt. It reads the harness config,
sorts servers into ones to move and ones that must stay local (stdio commands,
localhost), and moves them one at a time: create or reuse the source, give you
the link to connect it, check its tools, then remove the old entry from the
config with a backup. Tokens never pass through the chat. See
Migrating MCP servers into swarmvia.
Scripts and CI
An MCP source also answers plain HTTPS, so a script can call the same tools with the same filter, limit, and log:
curl https://sentry-team.swarmvia.cloud/tools/call \
-H "X-Swarmvia-Key: $ACCESS_KEY" \
-H "content-type: application/json" \
-d '{"name": "search_issues", "arguments": {"query": "is:unresolved"}}'GET /tools lists the tools that key may use.
What stays local
A gateway is for remote MCP servers reachable over HTTPS. Servers that run as
a local command (stdio) or on localhost stay in the harness config.
See MCP sources for the full reference.