> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Gateways SDK Reference

> SDK reference for the MCP Gateways API, available in Node.js and Python.

## MCP Gateways

### List MCP Gateways

Returns a paginated list of MCP gateways in the workspace.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "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"]],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      limit?: number;
      startingAfter?: string;
      endingBefore?: string;
      search?: string;
      status?: "MCP_GATEWAY_STATUS_UNSPECIFIED" | "MCP_GATEWAY_STATUS_ACTIVE" | "MCP_GATEWAY_STATUS_DISABLED";
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "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],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      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;
    }
    ```
  </CodeGroup>
</Expandable>

### Create a MCP Gateway

Creates a client-facing MCP gateway that links one or more synced upstream servers and exposes a unified MCP endpoint.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "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],
        },
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      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;
      };
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "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],
            },
        },
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      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;
        };
      };
    }
    ```
  </CodeGroup>
</Expandable>

### List Tools

Returns the namespaced tool view for a gateway.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "gateway_id": str,  # required
        "limit": Optional[int],
        "starting_after": Optional[str],
        "ending_before": Optional[str],
        "mcp_server_id": Optional[str],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      gatewayId: string;  // required
      limit?: number;
      startingAfter?: string;
      endingBefore?: string;
      mcpServerId?: string;
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "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],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      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;
    }
    ```
  </CodeGroup>
</Expandable>

### Retrieve a MCP Gateway

Retrieves the details of an existing MCP gateway by its unique ID.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": str,  # required
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id: string;  // required
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "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],
            },
        },
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      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;
        };
      };
    }
    ```
  </CodeGroup>
</Expandable>

### Delete a MCP Gateway

Deletes an MCP gateway from the workspace. The response body is empty when the delete succeeds.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": str,  # required
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id: string;  // required
    }
    ```
  </CodeGroup>
</Expandable>

### Update a MCP Gateway

Updates mutable fields of an existing MCP gateway. Omitted optional fields keep their current values.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "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],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      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;
      };
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "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],
            },
        },
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      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;
        };
      };
    }
    ```
  </CodeGroup>
</Expandable>
