MCP gateway
Put ReQlo in front of an MCP server, so tool calls are checked even when they don't pass through your code: OpenAI-hosted MCP tools, Claude Desktop, Cursor.
Most agents run tools through your own code, so you put a ReQlo check inside the tool (see How ReQlo fits). But some MCP tool calls never pass through your code:
- You give OpenAI or Anthropic a remote MCP server URL, and their servers call it.
- A desktop app like Claude Desktop or Cursor connects to an MCP server directly.
There's nowhere in your code to put a check. The MCP gateway fixes that by making ReQlo the server they connect to.
Checkout availability: tool discovery, selected-tool import, per-tool draft rules and full-argument approval binding are implemented in this repository. They require the updated dashboard and API to be deployed; this entry is not a deployment announcement. MCP clients do not need TypeScript SDK 0.4.0. That SDK is a separate, unpublished checkout version for applications that execute tools in their own code.
How it works
OpenAI / Claude Desktop / Cursor / your agent
│ holds only a ReQlo gateway token
▼
ReQlo MCP gateway
│ tools/call "create_issue"
│ → may agent X do mcp.github.create_issue?
│ allow: forward deny: refuse approval: hold
▼ only on allow, with a credential only ReQlo holds
The real MCP server (GitHub, Linear, your own…)- The client never sees the real server's credential. You store it in ReQlo once, encrypted. The client gets a gateway token that only works through ReQlo. Keep upstream credentials and alternate execution routes away from the agent; ReQlo enforces calls routed through the gateway.
- Every tool call is a normal ReQlo decision. It's checked against your published policies, can require approval, and appears in Observability like any other decision.
- Only tools you register are visible. The gateway hides every tool whose action isn't registered, so a new tool added to the upstream server stays hidden until you register it. Registration makes it visible; a published policy must still permit execution.
- It fails closed. If ReQlo can't decide, the call isn't forwarded.
Set it up
Create the gateway
In the dashboard, open MCP gateways and select Add gateway:
| Field | Example | What it's for |
|---|---|---|
| Name | GitHub | Your label |
| Server name | github | Becomes part of every action name: mcp.github.<tool> |
| Upstream MCP server URL | https://api.githubcopilot.com/mcp/ | The real server. Public HTTPS, Streamable HTTP transport |
| Agent | Support assistant | Every call through this gateway is checked as this agent |
| Upstream Authorization header | Bearer ghp_… | Optional. Stored encrypted; sent only to the upstream server |
Choose an existing active agent, or create its identity in Agents first. Creating an agent does not issue a project API key. Gateway creation requires an owner or admin.
Before selecting Add gateway, use Discover tools in the form:
- ReQlo initializes the connection and lists tools without executing any of them.
- Review each proposed action name, inferred policy fields and warnings. Select only the tools you want to register.
- Choose Require approval, Allow or Deny for each selected tool. The default is Require approval.
- Select Add gateway. ReQlo registers the selected actions and prepares an agent-scoped policy draft.
Discovery does not grant live access or publish the draft. Existing action definitions and policies are preserved; conflicting definitions or different existing setup rules stop creation and ask you to review them. A failed multi-step import can leave completed catalog entries or a draft, so inspect them before retrying.
You'll see a server URL and a gateway token once. Copy both. Keep the upstream credential in ReQlo and give your MCP client only the gateway token.
Or create it from a script or CI with your CLI token (from reqlo login). See the
MCP gateways API:
curl -X POST https://api.reqlo.io/v1/mcp-gateways \
-H "Authorization: Bearer $REQLO_ACCESS_TOKEN" -H "Content-Type: application/json" \
-d '{"environment_id":"<ENV_ID>","name":"GitHub","server":"github",
"upstream_url":"https://api.githubcopilot.com/mcp/","agent_id":"<YOUR_AGENT_ID>",
"upstream_authorization":"Bearer ghp_..."}'Review the discovered actions
Each MCP tool maps to an action named mcp.<server>.<tool>. Tool names are lowercased, and any character other
than a letter, digit or underscore becomes _, so Delete-Repo becomes mcp.github.delete_repo.
The selected tools are registered on the mcp_server resource type when you create the gateway. Discovery infers
string, integer, boolean and string-array policy fields. Unsupported or nested fields are identified in warnings;
review the catalog manually when you need additional conditions. Credential-like field names default to sensitive,
but review field sensitivity yourself before publishing.
Discovery refuses ambiguous action-name collisions. It supports up to 500 tools across 10 pages, with a 20-second overall connection budget. Import up to 100 selected tools within the form's 18 KB selection limit. If the selection is too large, select fewer tools and register remaining actions separately.
Without dashboard discovery, register the actions manually in Actions & resources, or use the CLI:
resource_types:
mcp_server:
description: An MCP server behind a ReQlo gateway.
actions:
mcp.github.list_issues:
resource_type: mcp_server
mcp.github.create_issue:
resource_type: mcp_server
context_schema:
repo: { type: string, required: true }npx @reqlo/cli schema pushTool arguments become context, but only the ones you declare in the action's context_schema. Above, the
repo argument of create_issue is available to policies as context.repo. Other arguments are still received by
the gateway and forwarded to the upstream server, but are not available in policy conditions.
Approval binding includes a digest of all original arguments, including nested and unregistered fields, together with the gateway and original tool name. Changing any of those values cannot reuse the original approval. Raw unregistered arguments are not added to the approval summary.
Argument names are converted to ReQlo's snake_case: a tool argument repoName is declared as repo_name and read
as context.repo_name.
Test and publish the policy
If you used discovery, open the prepared policy in Policies and review its selected tool rules. Open Policies → Test a decision, select that draft and submit a request shaped like the gateway's request:
{
"agent": { "id": "<YOUR_AGENT_ID>" },
"action": "mcp.github.create_issue",
"resource": { "type": "mcp_server", "id": "github" },
"context": { "repo": "acme/website" }
}Use the actual action name and required context fields from your imported catalog. Gateway requests have no per-user subject. Preview substitutes the selected draft alongside other published policies and explains the outcome. It never calls the upstream server, creates an approval or redeems one. Test approval resumption through the actual MCP client after publishing.
An owner or admin can publish the reviewed draft. For manual setup, this example allows reads and selected writes, and requires approval for writes to other repositories:
id: POL_0123456789abcdef
name: GitHub tools
rules:
- id: read-issues
effect: allow
actions: ["mcp.github.list_issues"]
agents: { ids: [<YOUR_AGENT_ID>] }
- id: create-issues-in-public-repos
effect: allow
actions: ["mcp.github.create_issue"]
agents: { ids: [<YOUR_AGENT_ID>] }
condition: context.repo in ["acme/website", "acme/docs"]
- id: other-repositories-need-review
effect: require_approval
actions: ["mcp.github.create_issue"]
agents: { ids: [<YOUR_AGENT_ID>] }
condition: '!(context.repo in ["acme/website", "acme/docs"])'npx @reqlo/cli policies validate
npx @reqlo/cli policies push --publishOther registered tools remain denied unless a published policy allows them. An unconditional require_approval
rule for mcp.github.* would also match read actions and require approval for those reads.
Connect your client
Use the server URL and send the gateway token as a Bearer token.
response = client.responses.create(
model="gpt-4.1",
tools=[{
"type": "mcp",
"server_label": "github",
"server_url": "https://api.reqlo.io/mcp",
"headers": {"Authorization": f"Bearer {os.environ['REQLO_MCP_TOKEN']}"},
"require_approval": "never", # ReQlo makes the decision
}],
input="Open an issue in acme/website about the broken footer link.",
)If a client can't send headers, put the token in the path instead: https://api.reqlo.io/mcp/rq_mcp_…. URLs can
end up in logs, so prefer the header whenever the client supports it.
What the model sees
| ReQlo decision | What the client gets |
|---|---|
allow | The real server's result |
deny | A tool error: Not allowed by policy (policy_denied). The model can explain it to the user |
| Tool not registered | Hidden from tools/list. If called anyway: the tool isn't enabled |
approval_required | A tool error with the approval ID. After a reviewer approves it in Approvals, retrying the same tool with the same complete arguments redeems the approval and forwards only if current policy permits. Calling again while it's pending doesn't open another request |
| ReQlo unavailable | An error. Nothing is forwarded |
Errors
These are HTTP errors, returned before any tool call is checked or forwarded.
| HTTP | Code | Meaning |
|---|---|---|
| 401 | gateway_token_invalid | The token is wrong, revoked, or the gateway's environment isn't sandbox |
| 405 | GET streams aren't supported. Use POST (and DELETE to end a session) | |
| 400 / 413 | Not one JSON-RPC 2.0 message, or larger than 1 MB | |
| 429 | rate_limited | More than 300 requests a minute through one gateway |
| 502 | upstream_unavailable, upstream_blocked, upstream_too_large | The upstream server couldn't be reached, resolves to a private address, or replied with more than 4 MB |
| 503 | service_unavailable | ReQlo couldn't decide. Nothing was forwarded |
Decisions themselves (deny, approval needed, tool not enabled) come back as a normal tool result with isError: true,
so the model can read the reason and explain it.
Limits in this beta
- Sandbox only.
- Tools only.
tools/listandtools/callare supported, plusinitialize,pingand notifications. Resources, prompts, sampling and server-initiated streams are refused, so nothing reaches the server unchecked. - Request/response only. Responses are buffered (up to 4 MB, 25 seconds). Long-running streamed tool calls aren't supported yet.
- No subject. Calls are checked as the gateway's agent, without a per-user subject, because a provider or desktop app doesn't pass you a verified user. Use a separate gateway (and agent) per trust level.
- Upstream URLs must be public HTTPS on port 443, without query parameters. Private addresses are blocked.
- Up to 20 active gateways per environment, one per server name.
Revoking
Click the gateway row, name or Manage gear icon to inspect its details, including after revocation. For an active gateway, select Revoke inside its details. Its token stops working immediately. To rotate a token, create a new gateway with the same server name after revoking the old one.
Something wrong or unclear? Report an issue with this page.