MCP gateways
Create, list and revoke MCP gateways, which check every tool call to an MCP server against your policies.
Base URL: https://api.reqlo.io/v1. Send Authorization: Bearer <CLI token>. The token comes from reqlo login (or REQLO_ACCESS_TOKEN) and acts as that person, with their role in the environment. Project API keys are refused.
| Endpoint | Method and path |
|---|---|
| List MCP gateways | GET /mcp-gateways |
| Create an MCP gateway | POST /mcp-gateways |
| Revoke an MCP gateway | POST /mcp-gateways/{id}/revoke |
List MCP gateways
/v1/mcp-gatewaysPurpose and when to use
Gateways in the environment, newest first, including revoked ones. Tokens and upstream credentials are never returned. Any member.
Authentication and environment
Send Authorization: Bearer <CLI token>. The token comes from reqlo login (or REQLO_ACCESS_TOKEN) and acts as that person, with their role in the environment. Project API keys are refused.
Full URL: https://api.reqlo.io/v1/mcp-gateways.
Request contract
This endpoint has no request body. Unknown fields and query parameters are rejected with 422 parameter_invalid.
Path, query and header parameters
| Name | In | Type | Required | Validation | Description |
|---|---|---|---|---|---|
environment_id | query | string (uuid) | Yes | format uuid | Environment to act in. Copy it from the API keys page in the dashboard. |
Response 200
Gateways.
| Field | Type | Required | Nullable | Default | Validation and restrictions | Description |
|---|---|---|---|---|---|---|
data | array of object | No | No | Not specified | None specified | See the description above. |
data[].id | string | No | No | Not specified | None specified | Identifier of this object. Treat it as opaque; an identifier is not identity proof. |
data[].object | string enum | No | No | Not specified | one of mcp_gateway | Object discriminator identifying the response shape. |
data[].name | string | No | No | Not specified | None specified | Display name for this object. |
data[].server | string | No | No | Not specified | None specified | See the description above. |
data[].upstream_url | string | No | No | Not specified | None specified | See the description above. |
data[].agent_id | string,null | No | Yes | Not specified | None specified | Registered agent identifier bound to this record. Derive identity from verified backend context. |
data[].upstream_authorization | boolean | No | No | Not specified | None specified | Whether an upstream credential is stored. The credential itself is never returned. |
data[].token_prefix | string | No | No | Not specified | None specified | See the description above. |
data[].status | string enum | No | No | Not specified | one of active, revoked | Current lifecycle status. The allowed enum values are listed in validation. |
data[].created_at | string (date-time) | No | No | Not specified | format date-time | Time this object was created, as a UTC timestamp. |
data[].revoked_at | string,null (date-time) | No | Yes | Not specified | format date-time | Revocation timestamp. Null means no revocation timestamp is present. |
{
"data": [
{
"id": "MCG_xZlPLQI6ORmeiA0o",
"object": "mcp_gateway",
"name": "GitHub",
"server": "github",
"upstream_url": "https://api.githubcopilot.com/mcp/",
"agent_id": "agt_8uOplS6kg48sD4Hc",
"token_prefix": "rq_mcp_1a2b3c4d",
"status": "active"
}
]
}Response headers
| Header | Meaning |
|---|---|
Reqlo-Request-Id | Correlation ID for support. Also in every error body as request_id. |
Sample requests
IDs are placeholders. Export REQLO_ACCESS_TOKEN in your server or terminal; never put it in browser code.
curl --fail-with-body --max-time 3 "https://api.reqlo.io/v1/mcp-gateways?environment_id=6f0d3c52-8a51-4f0e-9a43-2b8f1f2a7c10" \
-H "Authorization: Bearer $REQLO_ACCESS_TOKEN"Errors and recovery
| Code | HTTP | Retry? | Meaning and recovery |
|---|---|---|---|
access_token_invalid | 401 | No, fix it first | The CLI token is invalid, expired or revoked. Run reqlo login again. |
access_denied | 403 | No, fix it first | Your role doesn't allow this operation in that environment. Ask an owner or admin. Publishing and rollback need owner or admin. |
parameter_invalid | 422 | No, fix it first | A field or query parameter is missing, unknown or invalid. Fix the request. Unknown fields are rejected. |
authentication_required | 401 | No, fix it first | No Bearer credential was sent. Send Authorization: Bearer with a project key or CLI token. |
rate_limited | 429 | Yes, with backoff | More than 120 requests in a minute for this key, token or address. Back off and retry. |
service_unavailable | 503 | Yes, with backoff | A required service is unavailable. This is never a decision. Do not run the action. Retry with backoff. |
Errors use one envelope:
{
"error": {
"code": "parameter_invalid",
"message": "Request fields are invalid or unsupported.",
"request_id": "3b2f1c9e-0d4a-4c51-9b8e-6a7d2f0e1c44"
}
}Rate limits, retries and uncertain outcomes
Each key, token and IP address can make 120 requests per minute; more return 429 rate_limited. Use a bounded timeout (the samples use 3 seconds) and retry only 429 and 5xx, with exponential backoff. This read is safe to retry. Validation errors and denials are not transient.
Security, identity and failure behavior
CLI tokens act as their person: keep them out of logs, URLs and shared machines, and revoke them under Account → CLI tokens when they're no longer needed.
Related endpoints and integration examples
- MCP gateways — Create, list and revoke MCP gateways, which check every tool call to an MCP server against your policies.
- Guides: undefined
Create an MCP gateway
/v1/mcp-gatewaysPurpose and when to use
Creates a gateway in front of an upstream MCP server. The response includes the gateway token once; clients send it as a Bearer token to the returned url. Every tool call is checked as the given agent performing mcp.<server>.<tool>. Sandbox only. Owners and admins.
Authentication and environment
Send Authorization: Bearer <CLI token>. The token comes from reqlo login (or REQLO_ACCESS_TOKEN) and acts as that person, with their role in the environment. Project API keys are refused.
Full URL: https://api.reqlo.io/v1/mcp-gateways.
Request contract
Send a JSON body with Content-Type: application/json. Unknown fields and query parameters are rejected with 422 parameter_invalid.
Every request field
| Field | Type | Required | Nullable | Default | Validation and restrictions | Description |
|---|---|---|---|---|---|---|
environment_id | string (uuid) | Yes | No | Not specified | format uuid | Environment identifier. Requests are still scoped by their authenticated API key. |
name | string | Yes | No | Not specified | max 100 chars | Display name for this object. |
server | string | Yes | No | Not specified | pattern ^[a-z][a-z0-9_]{0,31}$ | Used in action names, mcp.<server>.<tool>. One active gateway per server name. |
upstream_url | string | Yes | No | Not specified | max 2048 chars | Public HTTPS URL of the MCP server (Streamable HTTP). |
agent_id | string | Yes | No | Not specified | None specified | The agent every call is checked as. |
upstream_authorization | string | No | No | Not specified | max 4096 chars | Optional Authorization header for the upstream server. Stored encrypted and never returned. |
Response 201
The gateway, its token (shown once) and the URL to connect to.
| Field | Type | Required | Nullable | Default | Validation and restrictions | Description |
|---|---|---|---|---|---|---|
id | string | No | No | Not specified | None specified | Identifier of this object. Treat it as opaque; an identifier is not identity proof. |
object | string enum | No | No | Not specified | one of mcp_gateway | Object discriminator identifying the response shape. |
name | string | No | No | Not specified | None specified | Display name for this object. |
server | string | No | No | Not specified | None specified | See the description above. |
upstream_url | string | No | No | Not specified | None specified | See the description above. |
agent_id | string,null | No | Yes | Not specified | None specified | Registered agent identifier bound to this record. Derive identity from verified backend context. |
upstream_authorization | boolean | No | No | Not specified | None specified | Whether an upstream credential is stored. The credential itself is never returned. |
token_prefix | string | No | No | Not specified | None specified | See the description above. |
status | string enum | No | No | Not specified | one of active, revoked | Current lifecycle status. The allowed enum values are listed in validation. |
created_at | string (date-time) | No | No | Not specified | format date-time | Time this object was created, as a UTC timestamp. |
revoked_at | string,null (date-time) | No | Yes | Not specified | format date-time | Revocation timestamp. Null means no revocation timestamp is present. |
token | string | No | No | Not specified | None specified | Gateway token. Shown once. |
url | string | No | No | Not specified | None specified | Destination HTTPS URL for event delivery; use an endpoint you control and verify signatures. |
{
"id": "MCG_xZlPLQI6ORmeiA0o",
"object": "mcp_gateway",
"name": "GitHub",
"server": "github",
"upstream_url": "https://api.githubcopilot.com/mcp/",
"agent_id": "agt_8uOplS6kg48sD4Hc",
"token_prefix": "rq_mcp_1a2b3c4d",
"status": "active",
"token": "rq_mcp_...",
"url": "https://api.reqlo.io/mcp"
}Response headers
| Header | Meaning |
|---|---|
Reqlo-Request-Id | Correlation ID for support. Also in every error body as request_id. |
Sample requests
IDs are placeholders. Export REQLO_ACCESS_TOKEN in your server or terminal; never put it in browser code.
curl --fail-with-body --max-time 3 -X POST "https://api.reqlo.io/v1/mcp-gateways" \
-H "Authorization: Bearer $REQLO_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"environment_id": "6f0d3c52-8a51-4f0e-9a43-2b8f1f2a7c10",
"name": "GitHub",
"server": "github",
"upstream_url": "https://api.githubcopilot.com/mcp/",
"agent_id": "agt_8uOplS6kg48sD4Hc",
"upstream_authorization": "Bearer ghp_..."
}'Errors and recovery
| Code | HTTP | Retry? | Meaning and recovery |
|---|---|---|---|
access_token_invalid | 401 | No, fix it first | The CLI token is invalid, expired or revoked. Run reqlo login again. |
access_denied | 403 | No, fix it first | Your role doesn't allow this operation in that environment. Ask an owner or admin. Publishing and rollback need owner or admin. |
resource_missing | 404 | No, fix it first | The object doesn't exist in this environment. Check the ID and that you are using the right key or environment. |
catalog_conflict | 409 | No, fix it first | That name is already registered or archived in this environment. Choose another name. Archived names can't be reused. |
upstream_url_invalid | 422 | No, fix it first | The upstream MCP server URL isn't allowed. Use a public HTTPS URL on port 443, without credentials, query or fragment. |
parameter_invalid | 422 | No, fix it first | A field or query parameter is missing, unknown or invalid. Fix the request. Unknown fields are rejected. |
authentication_required | 401 | No, fix it first | No Bearer credential was sent. Send Authorization: Bearer with a project key or CLI token. |
rate_limited | 429 | Yes, with backoff | More than 120 requests in a minute for this key, token or address. Back off and retry. |
service_unavailable | 503 | Yes, with backoff | A required service is unavailable. This is never a decision. Do not run the action. Retry with backoff. |
Errors use one envelope:
{
"error": {
"code": "parameter_invalid",
"message": "Request fields are invalid or unsupported.",
"request_id": "3b2f1c9e-0d4a-4c51-9b8e-6a7d2f0e1c44"
}
}Rate limits, retries and uncertain outcomes
Each key, token and IP address can make 120 requests per minute; more return 429 rate_limited. Use a bounded timeout (the samples use 3 seconds) and retry only 429 and 5xx, with exponential backoff. Don't automatically replay this change after a timeout: read the current state first. Validation errors and denials are not transient.
Security, identity and failure behavior
CLI tokens act as their person: keep them out of logs, URLs and shared machines, and revoke them under Account → CLI tokens when they're no longer needed.
Related endpoints and integration examples
- MCP gateways — Create, list and revoke MCP gateways, which check every tool call to an MCP server against your policies.
- Guides: undefined
Revoke an MCP gateway
/v1/mcp-gateways/{id}/revokePurpose and when to use
Stops the gateway's token working immediately. Owners and admins.
Authentication and environment
Send Authorization: Bearer <CLI token>. The token comes from reqlo login (or REQLO_ACCESS_TOKEN) and acts as that person, with their role in the environment. Project API keys are refused.
Full URL: https://api.reqlo.io/v1/mcp-gateways/{id}/revoke.
Request contract
Send a JSON body with Content-Type: application/json. Unknown fields and query parameters are rejected with 422 parameter_invalid.
Path, query and header parameters
| Name | In | Type | Required | Validation | Description |
|---|---|---|---|---|---|
id | path | string | Yes | pattern ^MCG_[0-9A-Za-z]{16}$ | Gateway ID. |
Every request field
| Field | Type | Required | Nullable | Default | Validation and restrictions | Description |
|---|---|---|---|---|---|---|
environment_id | string (uuid) | Yes | No | Not specified | format uuid | Environment identifier. Requests are still scoped by their authenticated API key. |
Response 200
The revoked gateway.
| Field | Type | Required | Nullable | Default | Validation and restrictions | Description |
|---|---|---|---|---|---|---|
id | string | No | No | Not specified | None specified | Identifier of this object. Treat it as opaque; an identifier is not identity proof. |
object | string enum | No | No | Not specified | one of mcp_gateway | Object discriminator identifying the response shape. |
name | string | No | No | Not specified | None specified | Display name for this object. |
server | string | No | No | Not specified | None specified | See the description above. |
upstream_url | string | No | No | Not specified | None specified | See the description above. |
agent_id | string,null | No | Yes | Not specified | None specified | Registered agent identifier bound to this record. Derive identity from verified backend context. |
upstream_authorization | boolean | No | No | Not specified | None specified | Whether an upstream credential is stored. The credential itself is never returned. |
token_prefix | string | No | No | Not specified | None specified | See the description above. |
status | string enum | No | No | Not specified | one of active, revoked | Current lifecycle status. The allowed enum values are listed in validation. |
created_at | string (date-time) | No | No | Not specified | format date-time | Time this object was created, as a UTC timestamp. |
revoked_at | string,null (date-time) | No | Yes | Not specified | format date-time | Revocation timestamp. Null means no revocation timestamp is present. |
{
"id": "MCG_xZlPLQI6ORmeiA0o",
"object": "mcp_gateway",
"name": "GitHub",
"server": "github",
"upstream_url": "https://api.githubcopilot.com/mcp/",
"agent_id": "agt_8uOplS6kg48sD4Hc",
"token_prefix": "rq_mcp_1a2b3c4d",
"status": "active"
}Response headers
| Header | Meaning |
|---|---|
Reqlo-Request-Id | Correlation ID for support. Also in every error body as request_id. |
Sample requests
IDs are placeholders. Export REQLO_ACCESS_TOKEN in your server or terminal; never put it in browser code.
curl --fail-with-body --max-time 3 -X POST "https://api.reqlo.io/v1/mcp-gateways/MCG_xZlPLQI6ORmeiA0o/revoke" \
-H "Authorization: Bearer $REQLO_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"environment_id": "6f0d3c52-8a51-4f0e-9a43-2b8f1f2a7c10"
}'Errors and recovery
| Code | HTTP | Retry? | Meaning and recovery |
|---|---|---|---|
access_token_invalid | 401 | No, fix it first | The CLI token is invalid, expired or revoked. Run reqlo login again. |
access_denied | 403 | No, fix it first | Your role doesn't allow this operation in that environment. Ask an owner or admin. Publishing and rollback need owner or admin. |
resource_missing | 404 | No, fix it first | The object doesn't exist in this environment. Check the ID and that you are using the right key or environment. |
parameter_invalid | 422 | No, fix it first | A field or query parameter is missing, unknown or invalid. Fix the request. Unknown fields are rejected. |
authentication_required | 401 | No, fix it first | No Bearer credential was sent. Send Authorization: Bearer with a project key or CLI token. |
rate_limited | 429 | Yes, with backoff | More than 120 requests in a minute for this key, token or address. Back off and retry. |
service_unavailable | 503 | Yes, with backoff | A required service is unavailable. This is never a decision. Do not run the action. Retry with backoff. |
Errors use one envelope:
{
"error": {
"code": "parameter_invalid",
"message": "Request fields are invalid or unsupported.",
"request_id": "3b2f1c9e-0d4a-4c51-9b8e-6a7d2f0e1c44"
}
}Rate limits, retries and uncertain outcomes
Each key, token and IP address can make 120 requests per minute; more return 429 rate_limited. Use a bounded timeout (the samples use 3 seconds) and retry only 429 and 5xx, with exponential backoff. Don't automatically replay this change after a timeout: read the current state first. Validation errors and denials are not transient.
Security, identity and failure behavior
CLI tokens act as their person: keep them out of logs, URLs and shared machines, and revoke them under Account → CLI tokens when they're no longer needed.
Related endpoints and integration examples
- MCP gateways — Create, list and revoke MCP gateways, which check every tool call to an MCP server against your policies.
- Guides: undefined
Something wrong or unclear? Report an issue with this page.