---
title: "MCP gateway: every MCP server behind one endpoint"
canonical: https://relayswitch.io/features/mcp-gateway
generated: 2026-11-02T10:11:06.614Z
source: https://api.relayswitch.io/v1/catalog
base_url: https://api.relayswitch.io/v1
---

MCP gateway

# Every MCP server your agents use, behind one endpoint.

Register a server once with its token. Every agent adds one MCP endpoint on its own API key and gets all the tools, filtered by allowlists and the key’s tool policy, with every call logged.

[Get an agent key](https://app.relayswitch.io/console)[Code](#example)

Live

Endpoint

/mcp/org

Servers per organization

up to 20

Tool names

server\_\_tool

Web search in a request

$0.01 a search

Web fetch in a request

$0.001 a fetch

Code sandbox in a request

$0.05 a container-hour, 1-minute minimum

Remote MCP in a request

no fee, tokens only

## What it does for an agent

One endpoint per agent

Claude Code, OpenCode, Hermes Agent or any MCP client adds one URL and one header.

Tokens stored once

Server headers are sealed at rest and never returned; GET /v1/mcp-servers shows only their names.

Allowlists and tool policy

Limit a server’s tools for everyone, and each agent’s through its key’s deny and allow lists.

A call log

Time, server, tool, status and latency for every call; arguments only for keys that keep bodies.

Revoke in one place

Revoke an agent’s key and it loses every tool behind the gateway at the same moment.

Safe by address

Public https only, checked before every call, redirects never followed.

## Copy, paste, run

Register once with an admin key, then point each agent at the endpoint.

curl: register a server

bash

1`# Register a server once (admin key). Its tools appear as tickets__<tool>.`

2`curl https://api.relayswitch.io/v1/mcp-servers \`

3 `-H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" \`

4 `-d '{`

5 `"name": "tickets",`

6 `"url": "https://mcp.example.com/mcp",`

7 `"headers": {"Authorization": "Bearer TICKETS_TOKEN"},`

8 `"tool_allowlist": ["search_tickets", "get_ticket"]`

9 `}'`

Claude Code

bash

1`claude mcp add --transport http relayswitch https://api.relayswitch.io/mcp/org \`

2 `--header "Authorization: Bearer $RELAYSWITCH_API_KEY"`

OpenCode

json

1`// opencode.json`

2`{`

3 `"$schema": "https://opencode.ai/config.json",`

4 `"mcp": {`

5 `"relayswitch": {`

6 `"type": "remote",`

7 `"url": "https://api.relayswitch.io/mcp/org",`

8 `"enabled": true,`

9 `"headers": { "Authorization": "Bearer {env:RELAYSWITCH_API_KEY}" }`

10 `}`

11 `}`

12`}`

Hermes Agent

yaml

1`# ~/.hermes/config.yaml`

2`mcp_servers:`

3 `relayswitch:`

4 `url: "https://api.relayswitch.io/mcp/org"`

5 `headers:`

6 `Authorization: "Bearer sk-relay-..."`

curl: list tools, read the log

bash

1`curl https://api.relayswitch.io/mcp/org \`

2 `-H "Authorization: Bearer $RELAYSWITCH_API_KEY" \`

3 `-H "Content-Type: application/json" \`

4 `-H "Accept: application/json, text/event-stream" \`

5 `-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'`

6

7`# Recent calls: server, tool, status, latency (admin key).`

8`curl "https://api.relayswitch.io/v1/mcp-servers/calls?limit=20" -H "Authorization: Bearer $ADMIN_KEY"`

## The MCP endpoints

| Endpoint | What it does | Key |
| --- | --- | --- |
| `POST /mcp/org` | Your registered servers’ tools, as server\_\_tool | API key |
| `/v1/mcp-servers` | Register, list, change and remove servers | Admin key |
| `GET /v1/mcp-servers/calls` | Recent tool calls with status and latency | Admin key |
| `POST /mcp` | list\_models, list\_media\_models, estimate, proof and chat | None, or an API key for chat |

Agent setup guides

-   [OpenClaw](https://relayswitch.io/guides/openclaw)
-   [Hermes Agent](https://relayswitch.io/guides/hermes-agent)
-   [OpenCode](https://relayswitch.io/guides/opencode)
-   [Claude Code](https://relayswitch.io/guides/claude-code)
-   [n8n](https://relayswitch.io/guides/n8n)

More features

-   [Agent tools](https://relayswitch.io/features/agent-tools)
-   [Files and redaction](https://relayswitch.io/features/files)
-   [Routing](https://relayswitch.io/features/routing)
-   [Caching and compression](https://relayswitch.io/features/caching)
-   [Guardrails and sign-in](https://relayswitch.io/features/guardrails)
-   [Endpoints](https://relayswitch.io/features/endpoints)
-   [Key budgets](https://relayswitch.io/features/key-budgets)
-   [Observability](https://relayswitch.io/features/observability)
-   [Hosted agents](https://relayswitch.io/agents)
-   [Workflows](https://relayswitch.io/workflows)
-   [Docs](https://relayswitch.io/docs)

FAQs

## Questions

For agent builders.

Open the console

A key in under a minute

[Get a key](https://app.relayswitch.io/console)

Or email [hello@relayswitch.io](mailto:hello@relayswitch.io)

### 

### 

### 

### 

### 

### 

## One MCP endpoint for every agent

Register your servers, hand each agent its key, read every call in one log.

[All features](https://relayswitch.io/features)[Get an agent key](https://app.relayswitch.io/console)

