MCP Gateways
List MCP Gateways
Returns a paginated list of MCP gateways in the workspace.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_gateways.list()
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.mcpGateways.list();
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
"search": Optional[str],
"status": Optional[Literal["MCP_GATEWAY_STATUS_UNSPECIFIED", "MCP_GATEWAY_STATUS_ACTIVE", "MCP_GATEWAY_STATUS_DISABLED"]],
}
{
limit?: number;
startingAfter?: string;
endingBefore?: string;
search?: string;
status?: "MCP_GATEWAY_STATUS_UNSPECIFIED" | "MCP_GATEWAY_STATUS_ACTIVE" | "MCP_GATEWAY_STATUS_DISABLED";
}
Show Response
Show Response
{
"object": Optional[str],
"data": [{ # optional
"id": Optional[str],
"key": Optional[str],
"display_name": Optional[str],
"description": Optional[str],
"server_links": [{ # optional
"mcp_server_id": str,
"alias": str,
"enabled": Optional[bool],
"tool_exposure": {
"mode": Literal["MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED", "MCP_TOOL_EXPOSURE_MODE_ALL", "MCP_TOOL_EXPOSURE_MODE_SELECTED", "MCP_TOOL_EXPOSURE_MODE_NONE"],
"read_only": Optional[bool],
"tool_ids": List[str], # optional
},
}],
"tool_naming": Optional[Literal["MCP_TOOL_NAMING_UNSPECIFIED", "MCP_TOOL_NAMING_PREFIX_WITH_SERVER_KEY", "MCP_TOOL_NAMING_PREFIX_ON_COLLISION"]],
"status": Optional[Literal["MCP_GATEWAY_STATUS_UNSPECIFIED", "MCP_GATEWAY_STATUS_ACTIVE", "MCP_GATEWAY_STATUS_DISABLED"]],
"public_url": Optional[str],
"created": Optional[str],
"updated": Optional[str],
"exposed_tools_count": Optional[int],
"mode": Optional[Literal["MCP_GATEWAY_MODE_UNSPECIFIED", "MCP_GATEWAY_MODE_CODE", "MCP_GATEWAY_MODE_DIRECT"]],
"sharing": { # optional
"all_projects": Dict[str, Any], # optional
"selected": { # optional
"project_ids": List[str], # optional
},
"allow_version_pin": Optional[bool],
"allow_fork": Optional[bool],
"auto_grant_new_projects": Optional[bool],
},
}],
"has_more": Optional[bool],
}
{
object?: string;
data?: {
id?: string;
key?: string;
displayName?: string;
description?: string;
serverLinks?: {
mcpServerId: string;
alias: string;
enabled?: boolean;
toolExposure: {
mode: "MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED" | "MCP_TOOL_EXPOSURE_MODE_ALL" | "MCP_TOOL_EXPOSURE_MODE_SELECTED" | "MCP_TOOL_EXPOSURE_MODE_NONE";
readOnly?: boolean;
toolIds?: string[];
};
}[];
toolNaming?: "MCP_TOOL_NAMING_UNSPECIFIED" | "MCP_TOOL_NAMING_PREFIX_WITH_SERVER_KEY" | "MCP_TOOL_NAMING_PREFIX_ON_COLLISION";
status?: "MCP_GATEWAY_STATUS_UNSPECIFIED" | "MCP_GATEWAY_STATUS_ACTIVE" | "MCP_GATEWAY_STATUS_DISABLED";
publicUrl?: string;
created?: string;
updated?: string;
exposedToolsCount?: number;
mode?: "MCP_GATEWAY_MODE_UNSPECIFIED" | "MCP_GATEWAY_MODE_CODE" | "MCP_GATEWAY_MODE_DIRECT";
sharing?: {
allProjects?: Record<string, unknown>;
selected?: {
projectIds?: string[];
};
allowVersionPin?: boolean;
allowFork?: boolean;
autoGrantNewProjects?: boolean;
};
}[];
hasMore?: boolean;
}
Create a MCP Gateway
Creates a client-facing MCP gateway that links one or more synced upstream servers and exposes a unified MCP endpoint.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_gateways.create(key="<key>", display_name="Litzy_Ruecker98")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.mcpGateways.create({
key: "<key>",
displayName: "Litzy_Ruecker98",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"key": str, # required
"display_name": str, # required
"description": Optional[str],
"server_links": [{ # optional
"mcp_server_id": str, # required
"alias": str, # required
"enabled": Optional[bool],
"tool_exposure": { # required
"mode": Literal["MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED", "MCP_TOOL_EXPOSURE_MODE_ALL", "MCP_TOOL_EXPOSURE_MODE_SELECTED", "MCP_TOOL_EXPOSURE_MODE_NONE"], # required
"read_only": Optional[bool],
"tool_ids": List[str], # optional
},
}],
"tool_naming": Optional[Literal["MCP_TOOL_NAMING_UNSPECIFIED", "MCP_TOOL_NAMING_PREFIX_WITH_SERVER_KEY", "MCP_TOOL_NAMING_PREFIX_ON_COLLISION"]],
"mode": Optional[Literal["MCP_GATEWAY_MODE_UNSPECIFIED", "MCP_GATEWAY_MODE_CODE", "MCP_GATEWAY_MODE_DIRECT"]],
"sharing": { # optional
"all_projects": Dict[str, Any], # optional
"selected": { # optional
"project_ids": List[str], # optional
},
"allow_version_pin": Optional[bool],
"allow_fork": Optional[bool],
"auto_grant_new_projects": Optional[bool],
},
}
{
key: string; // required
displayName: string; // required
description?: string;
serverLinks?: {
mcpServerId: string; // required
alias: string; // required
enabled?: boolean;
toolExposure: { // required
mode: "MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED" | "MCP_TOOL_EXPOSURE_MODE_ALL" | "MCP_TOOL_EXPOSURE_MODE_SELECTED" | "MCP_TOOL_EXPOSURE_MODE_NONE"; // required
readOnly?: boolean;
toolIds?: string[];
};
}[];
toolNaming?: "MCP_TOOL_NAMING_UNSPECIFIED" | "MCP_TOOL_NAMING_PREFIX_WITH_SERVER_KEY" | "MCP_TOOL_NAMING_PREFIX_ON_COLLISION";
mode?: "MCP_GATEWAY_MODE_UNSPECIFIED" | "MCP_GATEWAY_MODE_CODE" | "MCP_GATEWAY_MODE_DIRECT";
sharing?: {
allProjects?: Record<string, unknown>;
selected?: {
projectIds?: string[];
};
allowVersionPin?: boolean;
allowFork?: boolean;
autoGrantNewProjects?: boolean;
};
}
Show Response
Show Response
{
"mcp_gateway": { # optional
"id": Optional[str],
"key": Optional[str],
"display_name": Optional[str],
"description": Optional[str],
"server_links": [{ # optional
"mcp_server_id": str,
"alias": str,
"enabled": Optional[bool],
"tool_exposure": {
"mode": Literal["MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED", "MCP_TOOL_EXPOSURE_MODE_ALL", "MCP_TOOL_EXPOSURE_MODE_SELECTED", "MCP_TOOL_EXPOSURE_MODE_NONE"],
"read_only": Optional[bool],
"tool_ids": List[str], # optional
},
}],
"tool_naming": Optional[Literal["MCP_TOOL_NAMING_UNSPECIFIED", "MCP_TOOL_NAMING_PREFIX_WITH_SERVER_KEY", "MCP_TOOL_NAMING_PREFIX_ON_COLLISION"]],
"status": Optional[Literal["MCP_GATEWAY_STATUS_UNSPECIFIED", "MCP_GATEWAY_STATUS_ACTIVE", "MCP_GATEWAY_STATUS_DISABLED"]],
"public_url": Optional[str],
"created": Optional[str],
"updated": Optional[str],
"exposed_tools_count": Optional[int],
"mode": Optional[Literal["MCP_GATEWAY_MODE_UNSPECIFIED", "MCP_GATEWAY_MODE_CODE", "MCP_GATEWAY_MODE_DIRECT"]],
"sharing": { # optional
"all_projects": Dict[str, Any], # optional
"selected": { # optional
"project_ids": List[str], # optional
},
"allow_version_pin": Optional[bool],
"allow_fork": Optional[bool],
"auto_grant_new_projects": Optional[bool],
},
},
}
{
mcpGateway?: {
id?: string;
key?: string;
displayName?: string;
description?: string;
serverLinks?: {
mcpServerId: string;
alias: string;
enabled?: boolean;
toolExposure: {
mode: "MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED" | "MCP_TOOL_EXPOSURE_MODE_ALL" | "MCP_TOOL_EXPOSURE_MODE_SELECTED" | "MCP_TOOL_EXPOSURE_MODE_NONE";
readOnly?: boolean;
toolIds?: string[];
};
}[];
toolNaming?: "MCP_TOOL_NAMING_UNSPECIFIED" | "MCP_TOOL_NAMING_PREFIX_WITH_SERVER_KEY" | "MCP_TOOL_NAMING_PREFIX_ON_COLLISION";
status?: "MCP_GATEWAY_STATUS_UNSPECIFIED" | "MCP_GATEWAY_STATUS_ACTIVE" | "MCP_GATEWAY_STATUS_DISABLED";
publicUrl?: string;
created?: string;
updated?: string;
exposedToolsCount?: number;
mode?: "MCP_GATEWAY_MODE_UNSPECIFIED" | "MCP_GATEWAY_MODE_CODE" | "MCP_GATEWAY_MODE_DIRECT";
sharing?: {
allProjects?: Record<string, unknown>;
selected?: {
projectIds?: string[];
};
allowVersionPin?: boolean;
allowFork?: boolean;
autoGrantNewProjects?: boolean;
};
};
}
List Tools
Returns the namespaced tool view for a gateway.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_gateways.list_tools(gateway_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.mcpGateways.listTools({
gatewayId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"gateway_id": str, # required
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
"mcp_server_id": Optional[str],
}
{
gatewayId: string; // required
limit?: number;
startingAfter?: string;
endingBefore?: string;
mcpServerId?: string;
}
Show Response
Show Response
{
"object": Optional[str],
"data": [{ # optional
"server_key": Optional[str],
"alias": Optional[str],
"exposed_name": Optional[str],
"description": Optional[str],
"input_schema": Dict[str, Any], # optional
"mcp_server_id": Optional[str],
"upstream_tool_name": Optional[str],
"title": Optional[str],
"annotations": { # optional
"read_only": Optional[bool],
"destructive": Optional[bool],
"idempotent": Optional[bool],
"open_world": Optional[bool],
},
}],
"has_more": Optional[bool],
}
{
object?: string;
data?: {
serverKey?: string;
alias?: string;
exposedName?: string;
description?: string;
inputSchema?: Record<string, unknown>;
mcpServerId?: string;
upstreamToolName?: string;
title?: string;
annotations?: {
readOnly?: boolean;
destructive?: boolean;
idempotent?: boolean;
openWorld?: boolean;
};
}[];
hasMore?: boolean;
}
Retrieve a MCP Gateway
Retrieves the details of an existing MCP gateway by its unique ID.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_gateways.retrieve(id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.mcpGateways.retrieve({
id: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"id": str, # required
}
{
id: string; // required
}
Show Response
Show Response
{
"mcp_gateway": { # optional
"id": Optional[str],
"key": Optional[str],
"display_name": Optional[str],
"description": Optional[str],
"server_links": [{ # optional
"mcp_server_id": str,
"alias": str,
"enabled": Optional[bool],
"tool_exposure": {
"mode": Literal["MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED", "MCP_TOOL_EXPOSURE_MODE_ALL", "MCP_TOOL_EXPOSURE_MODE_SELECTED", "MCP_TOOL_EXPOSURE_MODE_NONE"],
"read_only": Optional[bool],
"tool_ids": List[str], # optional
},
}],
"tool_naming": Optional[Literal["MCP_TOOL_NAMING_UNSPECIFIED", "MCP_TOOL_NAMING_PREFIX_WITH_SERVER_KEY", "MCP_TOOL_NAMING_PREFIX_ON_COLLISION"]],
"status": Optional[Literal["MCP_GATEWAY_STATUS_UNSPECIFIED", "MCP_GATEWAY_STATUS_ACTIVE", "MCP_GATEWAY_STATUS_DISABLED"]],
"public_url": Optional[str],
"created": Optional[str],
"updated": Optional[str],
"exposed_tools_count": Optional[int],
"mode": Optional[Literal["MCP_GATEWAY_MODE_UNSPECIFIED", "MCP_GATEWAY_MODE_CODE", "MCP_GATEWAY_MODE_DIRECT"]],
"sharing": { # optional
"all_projects": Dict[str, Any], # optional
"selected": { # optional
"project_ids": List[str], # optional
},
"allow_version_pin": Optional[bool],
"allow_fork": Optional[bool],
"auto_grant_new_projects": Optional[bool],
},
},
}
{
mcpGateway?: {
id?: string;
key?: string;
displayName?: string;
description?: string;
serverLinks?: {
mcpServerId: string;
alias: string;
enabled?: boolean;
toolExposure: {
mode: "MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED" | "MCP_TOOL_EXPOSURE_MODE_ALL" | "MCP_TOOL_EXPOSURE_MODE_SELECTED" | "MCP_TOOL_EXPOSURE_MODE_NONE";
readOnly?: boolean;
toolIds?: string[];
};
}[];
toolNaming?: "MCP_TOOL_NAMING_UNSPECIFIED" | "MCP_TOOL_NAMING_PREFIX_WITH_SERVER_KEY" | "MCP_TOOL_NAMING_PREFIX_ON_COLLISION";
status?: "MCP_GATEWAY_STATUS_UNSPECIFIED" | "MCP_GATEWAY_STATUS_ACTIVE" | "MCP_GATEWAY_STATUS_DISABLED";
publicUrl?: string;
created?: string;
updated?: string;
exposedToolsCount?: number;
mode?: "MCP_GATEWAY_MODE_UNSPECIFIED" | "MCP_GATEWAY_MODE_CODE" | "MCP_GATEWAY_MODE_DIRECT";
sharing?: {
allProjects?: Record<string, unknown>;
selected?: {
projectIds?: string[];
};
allowVersionPin?: boolean;
allowFork?: boolean;
autoGrantNewProjects?: boolean;
};
};
}
Delete a MCP Gateway
Deletes an MCP gateway from the workspace. The response body is empty when the delete succeeds.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_gateways.delete(id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.mcpGateways.delete({
id: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"id": str, # required
}
{
id: string; // required
}
Update a MCP Gateway
Updates mutable fields of an existing MCP gateway. Omitted optional fields keep their current values.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.mcp_gateways.update(id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.mcpGateways.update({
id: "<id>",
updateMcpGatewayRequest: {},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"id": str, # required
"key": Optional[str],
"display_name": Optional[str],
"description": Optional[str],
"server_links": [{ # optional
"mcp_server_id": str, # required
"alias": str, # required
"enabled": Optional[bool],
"tool_exposure": { # required
"mode": Literal["MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED", "MCP_TOOL_EXPOSURE_MODE_ALL", "MCP_TOOL_EXPOSURE_MODE_SELECTED", "MCP_TOOL_EXPOSURE_MODE_NONE"], # required
"read_only": Optional[bool],
"tool_ids": List[str], # optional
},
}],
"tool_naming": Optional[Literal["MCP_TOOL_NAMING_UNSPECIFIED", "MCP_TOOL_NAMING_PREFIX_WITH_SERVER_KEY", "MCP_TOOL_NAMING_PREFIX_ON_COLLISION"]],
"status": Optional[Literal["MCP_GATEWAY_STATUS_UNSPECIFIED", "MCP_GATEWAY_STATUS_ACTIVE", "MCP_GATEWAY_STATUS_DISABLED"]],
"mode": Optional[Literal["MCP_GATEWAY_MODE_UNSPECIFIED", "MCP_GATEWAY_MODE_CODE", "MCP_GATEWAY_MODE_DIRECT"]],
"sharing": { # optional
"all_projects": Dict[str, Any], # optional
"selected": { # optional
"project_ids": List[str], # optional
},
"allow_version_pin": Optional[bool],
"allow_fork": Optional[bool],
"auto_grant_new_projects": Optional[bool],
},
"clear_server_links": Optional[bool],
}
{
id: string; // required
updateMcpGatewayRequest: { // required
key?: string;
displayName?: string;
description?: string;
serverLinks?: {
mcpServerId: string; // required
alias: string; // required
enabled?: boolean;
toolExposure: { // required
mode: "MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED" | "MCP_TOOL_EXPOSURE_MODE_ALL" | "MCP_TOOL_EXPOSURE_MODE_SELECTED" | "MCP_TOOL_EXPOSURE_MODE_NONE"; // required
readOnly?: boolean;
toolIds?: string[];
};
}[];
toolNaming?: "MCP_TOOL_NAMING_UNSPECIFIED" | "MCP_TOOL_NAMING_PREFIX_WITH_SERVER_KEY" | "MCP_TOOL_NAMING_PREFIX_ON_COLLISION";
status?: "MCP_GATEWAY_STATUS_UNSPECIFIED" | "MCP_GATEWAY_STATUS_ACTIVE" | "MCP_GATEWAY_STATUS_DISABLED";
mode?: "MCP_GATEWAY_MODE_UNSPECIFIED" | "MCP_GATEWAY_MODE_CODE" | "MCP_GATEWAY_MODE_DIRECT";
sharing?: {
allProjects?: Record<string, unknown>;
selected?: {
projectIds?: string[];
};
allowVersionPin?: boolean;
allowFork?: boolean;
autoGrantNewProjects?: boolean;
};
clearServerLinks?: boolean;
};
}
Show Response
Show Response
{
"mcp_gateway": { # optional
"id": Optional[str],
"key": Optional[str],
"display_name": Optional[str],
"description": Optional[str],
"server_links": [{ # optional
"mcp_server_id": str,
"alias": str,
"enabled": Optional[bool],
"tool_exposure": {
"mode": Literal["MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED", "MCP_TOOL_EXPOSURE_MODE_ALL", "MCP_TOOL_EXPOSURE_MODE_SELECTED", "MCP_TOOL_EXPOSURE_MODE_NONE"],
"read_only": Optional[bool],
"tool_ids": List[str], # optional
},
}],
"tool_naming": Optional[Literal["MCP_TOOL_NAMING_UNSPECIFIED", "MCP_TOOL_NAMING_PREFIX_WITH_SERVER_KEY", "MCP_TOOL_NAMING_PREFIX_ON_COLLISION"]],
"status": Optional[Literal["MCP_GATEWAY_STATUS_UNSPECIFIED", "MCP_GATEWAY_STATUS_ACTIVE", "MCP_GATEWAY_STATUS_DISABLED"]],
"public_url": Optional[str],
"created": Optional[str],
"updated": Optional[str],
"exposed_tools_count": Optional[int],
"mode": Optional[Literal["MCP_GATEWAY_MODE_UNSPECIFIED", "MCP_GATEWAY_MODE_CODE", "MCP_GATEWAY_MODE_DIRECT"]],
"sharing": { # optional
"all_projects": Dict[str, Any], # optional
"selected": { # optional
"project_ids": List[str], # optional
},
"allow_version_pin": Optional[bool],
"allow_fork": Optional[bool],
"auto_grant_new_projects": Optional[bool],
},
},
}
{
mcpGateway?: {
id?: string;
key?: string;
displayName?: string;
description?: string;
serverLinks?: {
mcpServerId: string;
alias: string;
enabled?: boolean;
toolExposure: {
mode: "MCP_TOOL_EXPOSURE_MODE_UNSPECIFIED" | "MCP_TOOL_EXPOSURE_MODE_ALL" | "MCP_TOOL_EXPOSURE_MODE_SELECTED" | "MCP_TOOL_EXPOSURE_MODE_NONE";
readOnly?: boolean;
toolIds?: string[];
};
}[];
toolNaming?: "MCP_TOOL_NAMING_UNSPECIFIED" | "MCP_TOOL_NAMING_PREFIX_WITH_SERVER_KEY" | "MCP_TOOL_NAMING_PREFIX_ON_COLLISION";
status?: "MCP_GATEWAY_STATUS_UNSPECIFIED" | "MCP_GATEWAY_STATUS_ACTIVE" | "MCP_GATEWAY_STATUS_DISABLED";
publicUrl?: string;
created?: string;
updated?: string;
exposedToolsCount?: number;
mode?: "MCP_GATEWAY_MODE_UNSPECIFIED" | "MCP_GATEWAY_MODE_CODE" | "MCP_GATEWAY_MODE_DIRECT";
sharing?: {
allProjects?: Record<string, unknown>;
selected?: {
projectIds?: string[];
};
allowVersionPin?: boolean;
allowFork?: boolean;
autoGrantNewProjects?: boolean;
};
};
}