Deleting an MCP server from MCP Hub
Note
This feature is at the Preview stage.
To delete an MCP server from MCP Hub:
- In the management console
, select the folder for which your account has theserverless.mcpGateways.editorrole or higher. - Go to AI Studio.
- In the left-hand panel, select MCP servers.
- In the list that opens, next to the MCP server you want to delete, click
and select Delete. - In the window that opens, confirm the deletion.
-
Get an IAM token, which is required for authentication.
-
Save the IAM token to an environment variable:
export IAM_TOKEN="<IAM_token_contents>" -
Use this REST API McpGateway.List method to get the list of MCP servers in the folder:
curl \ --request GET \ --header "Authorization: Bearer $IAM_TOKEN" \ "https://serverless-mcp-gateway.api.cloud.yandex.net/mcpgateway/v1/mcpGateways?folderId=<folder_ID>"Where
folderIdis the query parameter containing the ID of the folder you want to view the list of MCP servers for.Result
{ "gateways": [ { "logOptions": { "disabled": true }, "public": true, "id": "db82gpat2rsc********", "folderId": "b1gt6g8ht345********", "createdAt": "2025-12-18T14:00:39.911359Z", "name": "search-api-mcp", "status": "ACTIVE", "baseDomain": "https://db82gpat2rsc********.58zke0qh.mcpgw.serverless.yandexcloud.net", "serviceAccountId": "ajegtlf2q28a********" }, ... { "logOptions": { "disabled": false, "minLevel": "INFO", "folderId": "b1gt6g8ht345********" }, "public": true, "id": "db85571bpn4k********", "folderId": "b1gt6g8ht345********", "createdAt": "2025-12-18T14:25:37.272591Z", "name": "amocrm-mcp", "status": "ACTIVE", "baseDomain": "https://db85571bpn4k********.gs2td6d8.mcpgw.serverless.yandexcloud.net", "networkId": "enpcfncr6uld********", "serviceAccountId": "ajegtlf2q28a********" } ] }Save the MCP server's
id. You will need it to send a deletion request. -
Use the McpGateway.Delete REST API method to delete the selected MCP server by specifying its ID:
Note
To delete an MCP server, your account must have the
serverless.mcpGateways.editorrole or higher for the folder containing the MCP server.curl \ --request DELETE \ --header "Authorization: Bearer $IAM_TOKEN" \ "https://serverless-mcp-gateway.api.cloud.yandex.net/mcpgateway/v1/mcpGateways/<MCP_server_ID>"Result
{ "done": false, "metadata": { "@type": "type.googleapis.com/yandex.cloud.serverless.mcpgateway.v1.DeleteMcpGatewayMetadata", "mcpGatewayId": "db82gpat2rsc********" }, "id": "db8p2dihieai********", "description": "Delete MCP Gateway", "createdAt": "2025-12-24T12:05:59.101410969Z", "createdBy": "ajeol2afu1js********", "modifiedAt": "2025-12-24T12:05:59.101410969Z" } -
Use the McpGateway.List REST API method again to make sure the MCP server has been deleted.